Last Updated: February 25, 2016
·
14.3K
· hannesg

Lock a specific git revision in composer

You need the git version of a php library because there is no official release, but the last commit in the master branch broke it? No problem with composer! You can specify the exact revision you want like this:

{
    ...
    "require": {
        "foo/bar": "dev-master#1333333333333333333333333333333333333337"
    }
    ...
}

This lock "foo/bar" to an insanely leet revision in branch "master".

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside