I want to make sure composer is using an exact version of a git repository by specifing the SHA1 of the commit. How can I do this?
I tried just putting the sha1 code into the version string, but this does not work:
[UnexpectedValueException]
Could not parse version constraint a93cbe224a6922f181f55c7a35bde0cf61a6a5a4
The package will not be installed unless those requirements can be met. require-dev (root-only) Lists packages required for developing this package (1), or running tests, etc. The dev requirements of the root package only will be installed if install is run with --dev or if update is run without --no-dev .
An alternative is to set your minimum-stability to dev, but tell composer you want to use stable whenever possible: "minimum-stability": "dev", "prefer-stable" : true. This basically means it will always use stable UNLESS there is no way to install a stable dependency, and therefore use dev.
Composer is a dependency management tool for PHP projects. It allows you to declare the libraries your project requires and installs/updates them for you. It is deployed as a PHAR (PHP Archive) file. Phar is already enabled by default on your DreamHost server.
metapackage: An empty package that contains requirements and will trigger their installation, but contains no files and will not write anything to the filesystem. composer-plugin: A package of type composer-plugin may provide an installer for other packages that have a custom type.
You can specify it after the version, as such (assuming you want the master branch): "dev-master#a93cbe224"
Read more about requirements in the composer docs
For Drupal stuff, you can do things like this, if you want to pin to a specific release:
composer require --dev drupal/rules:8.3.x-dev#f089923e84fdbc81f4101a684a3f1418ff1da51e
The -unstableN
style Drupal tags are not available on packagist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With