phpcov
phpcov copied to clipboard
Add php83 compatibility with phpunit9
Hello,
We have issue when merging coverage reports generated with PHPUnit 9.x, on a PHP 8.3 codebase, updating parser to bring support between PHP 8.3 and PHPUnit 9.x.
⚠️ This MR should target a 8.2 branch instead of main
but no such branch seems to exist. ⚠️
From your description it is not yet clear to me what the problem is you are aiming to solve.
Please note that using phpcov
to merge results from different PHP / PHPUnit versions is not supported and out of scope.
Hi,
Thanks for your quick reply.
We are trying to merge multiple coverage reports generated with PHPUnit 9.6.16 (and php-code-coverage
9.2.28), on a PHP 8.3 project.
We were using the 8.2.1 version of phpcov, but this particular version is not compatible with a PHP 8.3 codebase.
Fatal error: Uncaught PhpParser\Error: Syntax error, unexpected T_READONLY on line 5 in phar://.../phpcov.phar/nikic/PhpParser/ParserAbstract.php:318
Since we can't upgrade PHPUnit to v10 or v11, we have to stick with a version of phpcov which supports PHPUnit 9.x :
Using the v5.0.2 of nikic/php-parser
seems to fix the phpcov code parser and our issue.