Skip to content

Commit

Permalink
Prevent installation of phpunit/php-code-coverage:>9.2.17
Browse files Browse the repository at this point in the history
Fixes infection#1773

Because of sebastianbergmann/php-code-coverage#953,
the current coverage reports used by `infection/infection` are
unreliable, and we cannot reliably use them for computing covered
mutants in most codebases.

This patch introduces a temporary conflict, to be lifted after
@Slamdunk's work on sebastianbergmann/php-code-coverage#964
lands in upstream.

Quoting original issue:

 > As mentioned in the title, it would be useful to (temporarily) add `"conflict": {"phpunit/php-code-coverage": ">9.2.17"}` to the constraints of this package.
 >
 > The reason: coverage report became massively unreliable for the purposes of mutation testing starting with `phpunit/php-code-coverage:9.2.18`, as reported by @kukulich and acknowledged by @Slamdunk in sebastianbergmann/php-code-coverage#953
 >
 > This is only a temporary measure: @Slamdunk has been talking with me about it, and he's hard at work on it in sebastianbergmann/php-code-coverage#964, which should fix the problem, but which may take more time to land.
 >
 > At this moment, many mutation test suites keep going red due to invalid reduced coverage (some packages were even at 100%, and need constant adjustments when `composer.lock` gets changed).
 >
 > Therefore, it would be healthy to declare an incompatibility in a new minor release, for now.
  • Loading branch information
Ocramius committed Dec 13, 2022
1 parent 87233ff commit 09d5dc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"webmozart/assert": "^1.3"
},
"conflict": {
"phpunit/php-code-coverage": ">9 <9.1.4",
"phpunit/php-code-coverage": ">9,<9.1.4 || >9.2.17",
"dg/bypass-finals": "<1.4.1"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 09d5dc7

Please sign in to comment.