I've just started using the Composer feature where you tell it to look at local directories for dependencies, so that you can develop a library and something that uses that library in parallel without having to push to git to update all the time, which is awesome. e.g.
"repositories": [
{
"type": "vcs",
"url": "/documents/projects/github/guzzle"
}
],
"require":{
"guzzle/guzzle": "3.7.*@dev"
}
So when you do a composer update, Composer will pull in the version of Guzzle from the local directory, so you can test the code for a library in another application that uses that library without having to push to a repository between each code change.
However I just almost checked in the composer.json for my project with that set - which is obviously not going to work on anyone elses machine.
Is there anyway to tell composer to use a different file than composer.json, or other way to be able to tell composer to use local directories safely, without the high probability of accidentally committing a broken version of composer.json to your repository?
Use the COMPOSER
environment variable:
env COMPOSER=composer-dev.json composer install
It has actually been available since at least 2012.
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