Closed rkeet closed 5 months ago
Hello, adding support for nikic/php-parser:^5
is in progress and can be tracked here: https://github.com/infection/infection/pull/1909
Meanwhile, you have 2 options:
infection.phar
, e.g. can be downloaded here: https://github.com/infection/infection/releases/tag/0.27.10. It's a prefixed PHAR distribution that doesn't conflict with project's dependenciesnikic/php-parser:^5
. Can be found by composer why nikic/php-parser
) or try other approaches like --with-all-dependecies
Ah, thank you! 😄 Have subscribed for updates! 👍
Problem:
Unable to install latest
infection/infection
due to non-yet upgraded support for latestnikic/php-parser
dependencyFix:
^5.0
fornikic/php-parser
incomposer.json
or allow both major versionsOut of scope of report
Because I didn't see an Issue for this I thought to create it. Unfortunately, I don't have time to fully flesh out/fix the issues or perform the upgrade and create a PR, otherwise I might look into it a bit.
General info
11.0.6
php:8.3.4-cli-alpine3.19
Docker imagenikic/php-parser
(infection dependency)Reproduce
composer install
for belowcomposer.json
composer require --dev infection/infection
composer.json
```json { "type": "project", "license": "proprietary", "minimum-stability": "stable", "prefer-stable": true, "require": { "php": ">=8.3", "ext-ctype": "*", "ext-iconv": "*", "api-platform/core": "^3.2", "doctrine/dbal": "^3", "doctrine/doctrine-bundle": "^2.11", "doctrine/doctrine-migrations-bundle": "^3.3", "doctrine/orm": "^3.1", "nelmio/cors-bundle": "^2.4", "phpdocumentor/reflection-docblock": "^5.3", "phpstan/phpdoc-parser": "^1.26", "symfony/asset": "^7.0", "symfony/console": "^7.0", "symfony/dotenv": "^7.0", "symfony/expression-language": "^7.0", "symfony/flex": "^2", "symfony/framework-bundle": "^7.0", "symfony/property-access": "^7.0", "symfony/property-info": "^7.0", "symfony/runtime": "^7.0", "symfony/security-bundle": "^7.0", "symfony/serializer": "^7.0", "symfony/twig-bundle": "^7.0", "symfony/validator": "^7.0", "symfony/yaml": "^7.0", "webonyx/graphql-php": "^15.11" }, "require-dev": { "phpunit/phpunit": "^11.0", "roave/security-advisories": "dev-latest", "squizlabs/php_codesniffer": "^3.9", "symfony/phpunit-bridge": "^7.0" }, "config": { "allow-plugins": { "php-http/discovery": true, "symfony/flex": true, "symfony/runtime": true }, "sort-packages": true }, "autoload": { "psr-4": { "App\\": "src/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "replace": { "symfony/polyfill-ctype": "*", "symfony/polyfill-iconv": "*", "symfony/polyfill-php72": "*", "symfony/polyfill-php73": "*", "symfony/polyfill-php74": "*", "symfony/polyfill-php80": "*", "symfony/polyfill-php81": "*", "symfony/polyfill-php82": "*" }, "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" ], "post-update-cmd": [ "@auto-scripts" ] }, "conflict": { "symfony/symfony": "*" }, "extra": { "symfony": { "allow-contrib": false, "require": "^7.0" } } } ```PhpUnit config - defaults minus non-working config from default template
phpunit.xml
```xmlAttempted infection installation (
composer require --dev
) outputHighlight line:
Output with issue
```shell me@my-pc: ~/api (main)$ composer require --dev infection/infection ./composer.json has been updated Running composer update infection/infection Loading composer repositories with package information Restricting packages listed in "symfony/symfony" to "^7.0" Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - infection/infection[0.1.0, ..., 0.9.3] require php ^7.0 -> your php version (8.3.4) does not satisfy that requirement. - infection/infection[0.10.0, ..., 0.11.5] require php ^7.1 -> your php version (8.3.4) does not satisfy that requirement. - infection/infection[0.12.0, ..., 0.13.6] require php ^7.1.3 -> your php version (8.3.4) does not satisfy that requirement. - infection/infection[0.14.0, ..., 0.15.3] require php ^7.2.9 -> your php version (8.3.4) does not satisfy that requirement. - infection/infection[0.16.0, ..., 0.18.1] require php ^7.3 -> your php version (8.3.4) does not satisfy that requirement. - infection/infection[0.18.2, ..., 0.20.2] require nikic/php-parser ^4.10.2 -> found nikic/php-parser[v4.10.2, ..., v4.19.1] but the package is fixed to v5.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - infection/infection[0.21.0, ..., 0.25.3] require nikic/php-parser ^4.10.3 -> found nikic/php-parser[v4.10.3, ..., v4.19.1] but the package is fixed to v5.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - infection/infection[0.25.4, ..., 0.26.3] require nikic/php-parser ^4.13 -> found nikic/php-parser[v4.13.0, ..., v4.19.1] but the package is fixed to v5.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - infection/infection[0.26.4, ..., 0.26.16] require nikic/php-parser ^4.13.2 -> found nikic/php-parser[v4.13.2, ..., v4.19.1] but the package is fixed to v5.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - infection/infection[0.26.17, ..., 0.27.10] require nikic/php-parser ^4.15.1 -> found nikic/php-parser[v4.15.1, ..., v4.19.1] but the package is fixed to v5.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - Root composer.json requires infection/infection * -> satisfiable by infection/infection[0.1.0, ..., 0.27.10]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require infection/infection:*" to figure out if any version is installable, or "composer require infection/infection:^2.1" if you know which you need. Installation failed, reverting ./composer.json and ./composer.lock to their original content. ```