MantisBT - Xdebug
View Issue Details
0001200Xdebug(No Category)public2015-11-09 13:322015-11-19 23:13
trashy 
derick 
normalminoralways
closedfixed 
Fedora Linux22
2.4.0beta1 
2.4.0rc1 
7.0-dev
0001200: Differences in code coverage with php 7
I'm using atoum for our application testing, it relies on xdebug to produce its code coverage.
I've noticed than covarage is a bit lower using PHP 7 than PHP 5.6 (both with xdebug 2.4.0beta1 - all PHP packages from Remi's repository on my Fedora box).

Sounds like difference is on some syntax like:

$builder->add(
    'build_age',
    'choice',
    array([...])
);

On PHP 5.6, all code is considered as covered, on PHP 7, the build_age and choice lines are considered as not covered.

So all tests are running fine, but our global coverage amount is just lower, it's a bit disconcerting.

Details about PHP and XDebug versions:
$ php -v
PHP 5.6.15 (cli) (built: Oct 29 2015 14:56:28)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Xdebug v2.4.0beta1, Copyright (c) 2002-2015, by Derick Rethans
$ php70 -v
PHP 7.0.0RC6 (cli) (built: Oct 28 2015 09:27:16) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
    with Xdebug v2.4.0beta1, Copyright (c) 2002-2015, by Derick Rethans
No tags attached.
Issue History
2015-11-09 13:32trashyNew Issue
2015-11-19 23:13derickNote Added: 0003236
2015-11-19 23:13derickStatusnew => closed
2015-11-19 23:13derickAssigned To => derick
2015-11-19 23:13derickResolutionopen => fixed
2015-11-19 23:13derickFixed in Version => 2.4.0rc1
2016-07-31 13:35derickCategoryDebug client (console) => debugclient (debugging tool)
2016-07-31 13:35derickCategorydebugclient (debugging tool) => (No Category)

Notes
(0003236)
derick   
2015-11-19 23:13   
Fixed this - thanks for the report! Please do test code coverage more, as it is possible I have missed a few other things (for which I don't have a test)!