Sobes.tech
Junior — Middle

What impact will the absence of running 'composer update' have when 'composer.lock' file is present in the project?

sobes.tech AI

Answer from AI

The composer.lock file records the specific versions of dependencies that were installed during the last run of composer update. If you do not run composer update and simply run composer install, then:

  • Dependencies will be installed exactly at the versions specified in composer.lock.
  • New versions of packages released after the creation of composer.lock will not be installed.
  • This ensures stability and reproducibility of the project build.

Therefore, not running composer update will not update dependencies, which can be a pro (stability) or a con (lack of updates and fixes).