This fixes running composer install and not getting an error. The problem was that whoever added the require-dev did so without updating the composer.lock file and currently composer issues this error message when running:
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
- Required (in require-dev) package "dealerdirect/phpcodesniffer-composer-installer" is not present in the lock file.
- Required (in require-dev) package "phpstan/extension-installer" is not present in the lock file.
- Required (in require-dev) package "squizlabs/php_codesniffer" is not present in the lock file.
- Required (in require-dev) package "brainmaestro/composer-git-hooks" is not present in the lock file.
This usually happens when composer files are incorrectly merged or the composer.json file is manually edited.
Read more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md
and prefer using the "require" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r
and exits with code 4.
The fix was in removing the entire require-dev block, and then running composer require --dev ... for the four packages.
I also bumped the minimum required version of PHP to 7.3 as kornrunner/keccak:^1.1 requires PHP 7.3+.
This fixes running
composer install
and not getting an error. The problem was that whoever added therequire-dev
did so without updating thecomposer.lock
file and currently composer issues this error message when running:and exits with code 4.
The fix was in removing the entire
require-dev
block, and then runningcomposer require --dev ...
for the four packages.I also bumped the minimum required version of PHP to 7.3 as
kornrunner/keccak:^1.1
requires PHP 7.3+.