mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 05:02:40 +00:00
Support Xdebug 3.x for coverage
This commit is contained in:
parent
ffc5579a7a
commit
b12f87e231
2 changed files with 7 additions and 3 deletions
|
@ -96,11 +96,11 @@ class RoboFile extends \Robo\Tasks {
|
|||
if (extension_loaded("pcov")) {
|
||||
return "$php -d pcov.enabled=1 -d pcov.directory=$code";
|
||||
} elseif (extension_loaded("xdebug")) {
|
||||
return $php;
|
||||
return "$php -d xdebug.mode=coverage";
|
||||
} elseif (file_exists($dir."pcov.$ext")) {
|
||||
return "$php -d extension=pcov.$ext -d pcov.enabled=1 -d pcov.directory=$code";
|
||||
} elseif (file_exists($dir."xdebug.$ext")) {
|
||||
return "$php -d zend_extension=xdebug.$ext";
|
||||
return "$php -d zend_extension=xdebug.$ext -d xdebug.mode=coverage";
|
||||
} else {
|
||||
if (IS_WIN) {
|
||||
$dbg = dirname(\PHP_BINARY)."\\phpdbg.exe";
|
||||
|
|
|
@ -16,5 +16,9 @@ error_reporting(\E_ALL);
|
|||
require_once BASE."vendor".DIRECTORY_SEPARATOR."autoload.php";
|
||||
|
||||
if (function_exists("xdebug_set_filter")) {
|
||||
xdebug_set_filter(\XDEBUG_FILTER_CODE_COVERAGE, \XDEBUG_PATH_WHITELIST, [BASE."lib/"]);
|
||||
if (defined("XDEBUG_PATH_INCLUDE")) {
|
||||
xdebug_set_filter(\XDEBUG_FILTER_CODE_COVERAGE, XDEBUG_PATH_INCLUDE, [BASE."lib/"]);
|
||||
} else {
|
||||
xdebug_set_filter(\XDEBUG_FILTER_CODE_COVERAGE, XDEBUG_PATH_WHITELIST, [BASE."lib/"]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue