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

后端 未结 4 1513
谎友^
谎友^ 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:00

    on newer versions (I suppose 1.3+) you can run the following:

    $ composer validate --no-check-all --no-check-publish
    

    Which might output something like this (with a catchable error exit code):

    ./composer.json is valid for simple usage with composer but has
    strict errors that make it unable to be published as a package:
    See https://getcomposer.org/doc/04-schema.md for details on the 
    schema
    The lock file is not up to date with the latest changes in composer.json, it is recommended that you run `composer update`.
    

提交回复
热议问题