Freezing a composer dependency to a given commit

Published on 2020-12-23 • Modified on 2020-12-23

In this snippet, we will see how to freeze a composer dependency to a given commit. It can be useful sometimes to avoid a bug that was introduced at some point, and you want a version before it appeared. Of course, it should be an exception. Always prefer using tags if possible. So, you must specify the commit after the branch with a hash before.


{
    "foo/foo-lib": "dev-master#2633721877cae79ad461f3ca06f3f77fb4fce02e"
}

 More on Stackoverflow   Read the doc  Random snippet

  Work with me!


Call to action

Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )

Thank you for reading! And see you soon on Strangebuzz! 😉

COil