monero-integrations / monerophp

Monero PHP library + JsonRPC Client
MIT License
116 stars 76 forks source link

Fix installing composer packages #151

Closed itismadness closed 8 months ago

itismadness commented 8 months ago

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+.

recanman commented 8 months ago

Tested it, LGTM