composer install
is your friend, and will only install the versions specified in the lock file - which, I would argue, is a good thing to version control if you are working in a team to ensure everyone is using the same packages and dependencies. composer update
is a nasty command to run on a regular basis - it bypasses your lock, updates the lock file, and specifically updates all packages in the project to their latest version. This would likely require a round of testing to make sure nothing broke.So how do you add a new package to the lock file without running a project-wide
composer update
- i.e. without updating the other packages? From the command line:composer require "phpoffice/phpexcel":"1.8.*"
composer update --lock
This adds the new package require to the
composer.json
. Running the update --lock
command after that will literally only add the new package info to the composer.lock
file.
No comments :
Post a Comment