Composer update is used when we want to update all our dependencies. By using Composer update command that will convert all our old version to latest version.
So never use composer update command on production for our existing project because that may cause that our project will not accept the latest version and our project
will stop working.
Composer install is used when we want to install only new dependencies. That will not update all the dependencies which are available in composer.json. It will only install new dependencies.
Work flow of using Composer
Add composer.json with some dependencies
Run composer install
Add some more dependencies
Run composer update as you've updated your dependencies
Basic Flow diagram of Composer install vs Composer update
0 Comment(s)