Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add php83 compatibility with phpunit9 #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abrahxas
Copy link

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. ⚠️

@sebastianbergmann
Copy link
Owner

From your description it is not yet clear to me what the problem is you are aiming to solve.

@sebastianbergmann
Copy link
Owner

Please note that using phpcov to merge results from different PHP / PHPUnit versions is not supported and out of scope.

@romain-jacquart
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants