Skip to content

Instantly share code, notes, and snippets.

@martinboy
Created March 23, 2020 09:06
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martinboy/d98cac53fdfd1a7176609e9687345be7 to your computer and use it in GitHub Desktop.
Save martinboy/d98cac53fdfd1a7176609e9687345be7 to your computer and use it in GitHub Desktop.
composer update lock
I have just discovered a great feature of composer:
composer update --lock
It saves a lot of time when you merge branches with composer.lock file changes in both branches.
Just resolve conflict by applying --ours version of the file (or --theirs, it really doesn't matter) and then run
`composer update --lock `.
Composer will do all the dirty work for you and update composer.lock file according to composer.json changes
and install new packages. The rest of packages in composer are not changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment