File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 88## Requirements
99
1010* PHP 5.3.3 is required but using the latest version of PHP is highly recommended
11- * [ Xdebug] ( http://xdebug.org/ ) 2.1.3 is required but using the latest version of Xdebug is highly recommended
11+ * [ Xdebug] ( http://xdebug.org/ ) 2.3.2 is required but using the latest version of Xdebug is highly recommended
1212
1313## Installation
1414
Original file line number Diff line number Diff line change 3030 },
3131 "require-dev" : {
3232 "phpunit/phpunit" : " ~4" ,
33- "ext-xdebug" : " >=2.1.4 "
33+ "ext-xdebug" : " >=2.3.2 "
3434 },
3535 "suggest" : {
3636 "ext-dom" : " *" ,
37- "ext-xdebug" : " >=2.3.2" ,
3837 "ext-xmlwriter" : " *"
3938 },
4039 "autoload" : {
Original file line number Diff line number Diff line change @@ -32,20 +32,22 @@ class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver
3232 */
3333 public function __construct ($ pathCoverage = true )
3434 {
35- if (!extension_loaded ('xdebug ' )) {
36- throw new PHP_CodeCoverage_Exception ('This driver requires Xdebug ' );
35+ if (!extension_loaded ('xdebug ' ) ||
36+ version_compare (phpversion ('xdebug ' ), '2.3.2 ' , '< ' )) {
37+ throw new PHP_CodeCoverage_Exception (
38+ 'This driver requires Xdebug 2.3.2 (or newer) '
39+ );
3740 }
3841
39- if (version_compare (phpversion ('xdebug ' ), '2.2.0-dev ' , '>= ' ) &&
40- !ini_get ('xdebug.coverage_enable ' )) {
42+ if (!ini_get ('xdebug.coverage_enable ' )) {
4143 throw new PHP_CodeCoverage_Exception (
4244 'xdebug.coverage_enable=On has to be set in php.ini '
4345 );
4446 }
4547
4648 $ this ->flags = XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE ;
4749
48- if ($ pathCoverage && defined ( ' XDEBUG_CC_BRANCH_CHECK ' ) ) {
50+ if ($ pathCoverage ) {
4951 $ this ->flags |= XDEBUG_CC_BRANCH_CHECK ;
5052 }
5153 }
You can’t perform that action at this time.
0 commit comments