sebastianbergmann / php-code-coverage

Library that provides collection, processing, and rendering functionality for PHP code coverage information.
BSD 3-Clause "New" or "Revised" License
8.76k stars 370 forks source link

CI pipeline for `9.2` is broken #1038

Closed sebastianbergmann closed 1 day ago

sebastianbergmann commented 2 weeks ago

Before c00148658dc981cc32ae6af1f861f6aee857fc1f, the composer.json file of this project configured a dependency on "phpunit/phpunit": "^9.3".

I noticed that on GitHub Actions, Composer would install PHPUnit 9.4.4 instead of PHPUnit 9.6.19 (which is the latest version that fulfills the ^9.3 version constraint. See https://github.com/sebastianbergmann/php-code-coverage/actions/runs/9722443548/job/26836345492#step:6:27.

I changed this version constraint from ^9.3 to ^9.6 in c00148658dc981cc32ae6af1f861f6aee857fc1f in order to force an error on GitHub Actions when Composer installs the dependencies and provides an error message that explains why PHPUnit 9.4.4 was installed before:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit[9.6.0, ..., 9.6.11] require phpunit/php-code-coverage ^9.2.13 -> satisfiable by phpunit/php-code-coverage[9.2.13, ..., 9.2.x-dev] from composer repo (https://repo.packagist.org) but phpunit/php-code-coverage is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.
    - phpunit/phpunit[9.6.12, ..., 9.6.19] require phpunit/php-code-coverage ^9.2.28 -> satisfiable by phpunit/php-code-coverage[9.2.28, ..., 9.2.x-dev] from composer repo (https://repo.packagist.org) but phpunit/php-code-coverage is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.
    - Root composer.json requires phpunit/phpunit ^9.6 -> satisfiable by phpunit/phpunit[9.6.0, ..., 9.6.19].

COMPOSER_ROOT_VERSION is set to 9.2-dev in the GitHub Actions configuration and a branch-alias is configured in composer.json.

This problem does not exist on the 10.1 and main branches, but I fail to see a difference between the branches where this works and the 9.2 branch where it does not work.

sebastianbergmann commented 2 weeks ago

@localheinz Can you help me? Thanks!

sebastianbergmann commented 6 days ago

I just ran into this issue on the 10.1 branch after bumping the dependencies: https://github.com/sebastianbergmann/php-code-coverage/actions/runs/9903217535

localheinz commented 1 day ago

Taking another 👀, @sebastianbergmann!

sebastianbergmann commented 1 day ago

Thank you, @localheinz!