Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CraftedRO/56fbea295590b36f5b98ccf6f3eb2ed4 to your computer and use it in GitHub Desktop.
Save CraftedRO/56fbea295590b36f5b98ccf6f3eb2ed4 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