View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001413||Xdebug||Code Coverage||public||2017-04-08 11:23||2017-04-16 00:17|
|Fixed in Version||2.5.2|
|Summary||0001413: Line is missing from code coverage|
I have two classes that are almost identical: Require and Require2. The first one inherits a constant from an interface, the second defines the constant. The line using the inherited constant appears as not covered, while the other one does:
|Steps To Reproduce|
Run the following command with the attached files:
Now check build/coverage/Required.php.html#16, the line appears as "Not executed", while build/coverage/Required2.php.html#16 is fine.
With OpCache disabled the line appears as "Not executed" in both classes.
PHP was installed with "brew".
|Tags||No tags attached.|
xdebug-bug-1.zip (11,566 bytes)
I tried reproducing this, but I can't. In both situations (opcache on, or off), both lines "16" in Required.php and Required2.php are marked as executable.
Can you please show the output of:
PHPUnit 5.7.9 by Sebastian Bergmann and contributors.
PHP 7.1.3 (cli) (built: Mar 28 2017 21:57:28) ( NTS )
OK. With PHP 7.1.3 I can reproduce this. With 7.1.4, I can not. It looks like PHP itself changed something. I am suspecting it is the fix for bug #69676 (https://bugs.php.net/bug.php?id=69676). This fix, seems to have caused some line numbers to go wrong. I can fix the symptom in Xdebug, but there is something more going wrong in PHP too I believe.
Fixed for 2.5.2.
And thanks for the excellent report!
GTK there's already a fix. Thanks for your excellent work.
|2017-04-08 11:23||olvlvl||New Issue|
|2017-04-08 11:23||olvlvl||File Added: xdebug-bug-1.zip|
|2017-04-13 17:47||derick||Note Added: 0004259|
|2017-04-13 17:47||derick||Assigned To||=> derick|
|2017-04-13 17:47||derick||Status||new => feedback|
|2017-04-13 23:46||olvlvl||Note Added: 0004260|
|2017-04-13 23:46||olvlvl||Status||feedback => assigned|
|2017-04-15 14:48||derick||Note Added: 0004263|
|2017-04-15 23:28||derick||Note Added: 0004264|
|2017-04-15 23:28||derick||Status||assigned => closed|
|2017-04-15 23:28||derick||Resolution||open => fixed|
|2017-04-15 23:28||derick||Fixed in Version||=> 2.5.2|
|2017-04-16 00:17||olvlvl||Note Added: 0004265|