Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lorna Mitchell:
Handling Composer "lock file out of date" Warning
Jan 22, 2016 @ 15:48:23

Lorna Mitchell has a post on her site that wants to help you out when Composer reports a "lock file out of date" warning when you try to update your Composer dependencies. She provides three options to help resolve this issue.

Composer is dependency management for PHP, and it consists of two main files: [composer.json and composer.lock]. Crucially, the composer.lock also includes a hash of the current composer.json when it updates, so you can always tell if you've added a requirement to the composer.json file and forgotten to install it.

The post includes three different ways to correct the warning message:

  • Option one: upgrade all of the things
  • Option two: try to work out which composer.json change caused this
  • Option three: do nothing, safely

The first two options are preferable to the last one (essentially overriding the error) but it could be used in cases where you think Composer is just getting things wrong.

tagged: composer lock file outofdate warning option fix override

Link: http://www.lornajane.net/posts/2016/handling-composer-lock-file-out-of-date-warning


Trending Topics: