# composer install vs composer update
# composer install
composer install will install all the dependencies as specified in the composer.lock file.
Note: it will check if
composer.lockfile exists, it it doesn't, it will runcomposer updateand create it.
# composer update
composer update will update our depencencies as they are specified in composer.json
It will do the following:
- Read
composer.json - Remove installed packages that are no more required in
composer.json - Check the availability of the latest versions of your required packages
- Install the latest versions of your packages
- Update
composer.lockto store the installed packages version