Last Updated: February 25, 2016
·
14K
· 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".