nunomaduro / phpinsights

🔰 Instant PHP quality checks from your console
https://phpinsights.com
MIT License
5.28k stars 281 forks source link

Can't use with PHPUnit 11 #678

Open mwikberg-virta opened 5 months ago

mwikberg-virta commented 5 months ago
Q A
Bug report? yes
Feature request? no
Library version 2.11.00

Wanted to upgrade PHPUnit in one project, but due to phpinsigts (mostly just the specified requirement ranges), it's not possible.

Simplest test case I could come up with is:

$ composer require --dev phpunit/phpunit=^11.0 nunomaduro/phpinsights
./composer.json has been created
Running composer update phpunit/phpunit nunomaduro/phpinsights
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/php-file-iterator[3.0.0, ..., 3.0.2] require php ^7.3 -> your php version (8.3.4) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ^11.0 -> satisfiable by phpunit/phpunit[11.0.0, ..., 11.1.1].
    - cmgmyr/phploc 8.0.3 requires phpunit/php-file-iterator ^3.0|^4.0 -> satisfiable by phpunit/php-file-iterator[3.0.0, ..., 3.0.6, 4.0.0, 4.0.1, 4.0.2, 4.1.0].
    - You can only install one version of a package, so only one of these can be installed: phpunit/php-file-iterator[3.0.0, ..., 3.0.6, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 5.0.0].
    - nunomaduro/phpinsights v2.11.0 requires cmgmyr/phploc ^8.0.3 -> satisfiable by cmgmyr/phploc[8.0.3].
    - phpunit/phpunit[11.0.0, ..., 11.1.1] require phpunit/php-file-iterator ^5.0 -> satisfiable by phpunit/php-file-iterator[5.0.0].
    - Root composer.json requires nunomaduro/phpinsights ^2.11 -> satisfiable by nunomaduro/phpinsights[v2.11.0].

Installation failed, deleting ./composer.json.

There is a PR open for the phploc dependency, and as far I can tell, everything else already has compatible versions, so they just need a bump.

Xor767 commented 4 months ago

Hi guys, is phpinsights dead 🪦?

timoteo7 commented 3 months ago

"Running composer update phpunit/phpunit nunomaduro/phpinsights --with-all-dependencies" Return :

Problem 1
    - Root composer.json requires nunomaduro/phpinsights * -> satisfiable by nunomaduro/phpinsights[v1.0.0, ..., v1.14.1, v2.0.0, ..., v2.11.0].
    - phpunit/phpunit[11.0.0, ..., 11.2.5] require sebastian/diff ^6.0 -> satisfiable by sebastian/diff[6.0.0, 6.0.1].
    - Conclusion: don't install sebastian/diff 6.0.1 (conflict analysis result)
    - Root composer.json requires phpunit/phpunit ^11.0 -> satisfiable by phpunit/phpunit[11.0.0, ..., 11.2.5].
jonnott commented 2 months ago

This is preventing upgrading projects to PHPUnit 11.x under Laravel 11.x. Any chance of adding PHPUnit 11.x to the list in composer.json @nunomaduro ?

nonamez commented 3 weeks ago

Same problem after upgrading to Laravel 11. Any news on the version bump?

RSickenberg commented 2 weeks ago

This should fix https://github.com/nunomaduro/phpinsights/pull/692