How to correctly require a specific commit in Composer so that it would be available for dependent packages?

后端 未结 3 1288
臣服心动
臣服心动 2020-12-07 14:35

I have a library foo/foo-lib which requires a specific commit from GitHub:

{
    \"name\": \"foo/foo-lib\",
    \"repositories\": [         


        
3条回答
  •  情深已故
    2020-12-07 14:58

    Here is how you do it on the command line:

    composer update knplabs/gaufrette:dev-master#2633721 --with-dependencies
    

    You don't have to use the whole hash, a hash seven characters long seems to dothe trick. As mentioned above, your project will need to support dev - which it will complain about if not already set. Also, use --with-dependencies to get any dependencies of the one you are updating.

提交回复
热议问题