Recently I had to fix a broken composer.lock but without actually updating code. I have found the composer option ” nothing ” which updates the composer.lock file only.
1 |
$ composer update nothing |
Once the command ran successfully, you should see a line ” Writing lock file ” in the output.
1 2 3 4 5 6 |
$ composer update nothing Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Writing lock file Generating autoload files |
If you have issues with dependencies you can update the composer.lock file with –ignore-platform-reqs.
1 |
$ composer update nothing --ignore-platform-reqs |