Closed steevanb closed 1 year ago
Thank you for your report.
Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.
Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue.
@sebastianbergmann i've created this repository, very simple to use (you just need Docker): https://github.com/steevanb/sebastianbergmann-php-code-coverage-issue-996
When i execute code coverage with PHPUnit 10.1, i have a lower covered percent than i have with exactly the same code but PHPUnit 9.5.
After some research, i've found PHPUnit 9.5 do not found files who contains only an Enum, but PHPUnit 10 found them, so i have to add coverage on my methods in Enum. That's ok.
The problem is with another difference: PHPUnit 10.1 ask me to cover "some" uses (not for all files, and i don't understand why?)
I've tried with pcov and xdebug, same behavior.
My command to execute PHPUnit (exaclty same command for PHPUnit 9.5 and 10.1):
bin/ci/phpunit.php
:config/ci/phpunit.xml
(for PHPUnit 10.1):