# 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.lock
file exists, it it doesn't, it will runcomposer update
and 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.lock
to store the installed packages version