-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Lines with ::class constant are not covered #793
Comments
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. |
Also, please test with recent versions of PHP and Xdebug. php-code-coverage no longer works around bug in Xdebug, for instance, that have been fixed in newer versions. |
This behavior always occurs when "XXX::class" is used. I checked the behavior again with PHP 7.4.9 and Xdebug 2.9.6 and the problem is still there. Here is my minimal test case: |
OK, that's gonna be the same as #794 then |
And I'm going to put money on https://github.com/sebastianbergmann/php-code-coverage/blob/master/src/StaticAnalysis/ParsingCoveredFileAnalyser.php#L216 not working the same as when the same workaround was used under PHP_Token_Stream. |
You're probably right, I'll have a look. Thanks for the pointer! |
Yeah before this construct was identified as PHP_Token_CLASS_NAME_CONSTANT so wasn't affected |
Can you please test with 081faa0? Thanks! |
I can confirm that the problem no longer occurs! Thank you very much! |
tested #794 with phpdbg, its also fixed with this commit, thank you @sebastianbergmann |
Since the Update to PHPUnit 9.3.7 the Coverage-Report does not contain all lines.
Since the update the report looks like this (line 115 is missing):

Before it looked like this (line 115 is covered):

Before the Update the PHPUnit PHAR was used in Version 9.2.6
The text was updated successfully, but these errors were encountered: