| Q | A
| --------------------| ---------------
| PHPUnit version | 9.1.0 and above
| PHP version | 7.3.11
| Installation Method | Composer
Summary
PHPUnit 9.1.0 contains BC break and the change has been not documented in the changelog.
Before annotation:
* @covers Laminas\Hydrator\HydratorAwareTrait<extended>
worked fine, but since 9.1.0 it breaks when generating code coverage with the following message:
"@covers Laminas\Hydrator\HydratorAwareTrait<extended>" is invalid
Script phpunit --colors=always --coverage-clover clover.xml handling the test-coverage event returned with error code 2
I've checked the documentation, and using <extended>
is not recommended:
https://phpunit.readthedocs.io/en/9.1/annotations.html#covers
but even in documentation of v9.1 it does not say it is not valid.
Previous Behavior
No errors when generating code coverage.
Current Behavior
Error when generating code coverage and code coverage is not completed.
How to reproduce
Checkout repo: https://github.com/laminas/laminas-hydrator
and run:
composer install
composer test-coverage
then try downgrade PHPUnit to 9.0.2 and try again composer test-coverage
.
bug