How to test if composer.lock is up to date?

后端 未结 4 1492
谎友^
谎友^ 2021-02-20 01:46

During development (multiple people in the team) sometimes composer install returns:

Warning: The lock file is not up to date with the latest change

4条回答
  •  眼角桃花
    2021-02-20 02:05

    You can run

    composer install --dry-run
    

    --dry-run Outputs the operations but will not execute anything (implicitly enables --verbose).

    This won't change anything but will show the warning if not up to date. But it will still have to check the servers for new versions of your installed packages, so if you have many installed this might still take more than milli seconds. Anyway it's faster.

提交回复
热议问题