2
Here in the company where I work we use the git
for versioning the application. They all use Composer to install dependencies.
Because it is the most correct approach, removing the vendor
generated by Composer
of the repository. That is, when someone git clone
or the git pull
should update dependencies via Composer.
But a question arose: When we are developing some dependencies are installed as require-dev
. But when we update the system in production, how do we use git to do the git pull
, we also need to rotate the composer update
in production.
However, when it is in production, I don’t want it to be included the development dependency (require-dev).
How can I rotate the composer install
or composer update
ignoring the dependencies I’ve included in require-dev
?
Example:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"laravelcollective/html": "5.2.*",
"guzzlehttp/guzzle" : "6.*",
"maatwebsite/excel": "~2.1.0",
"phplegends/pt-br-validator" : "2.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
Dependence on require-dev
cannot be installed in production.