我不想为所有脚本打开 xdebug 代码覆盖,但我确实希望能够为生成代码覆盖的每日 jenkins 构建打开它。
我尝试了以下
phpunit -d xdebug.coverage_enable=1 -c phpunit-coverage.xml.dist
但是我总是收到以下错误
Configuration read from phpunit-coverage.xml.dist
Fatal error: Uncaught exception 'PHP_CodeCoverage_Exception' with message 'You need to set xdebug.coverage_enable=On in your php.ini.' in /usr/local/lib/php/PHP/CodeCoverage/Driver/Xdebug.php on line 72
PHP_CodeCoverage_Exception: You need to set xdebug.coverage_enable=On in your php.ini. in /usr/local/lib/php/PHP/CodeCoverage/Driver/Xdebug.php on line 72
Call Stack:
0.0002 627488 1. {main}() /usr/local/bin/phpunit:0
0.0050 1095880 2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:46
0.0050 1096608 3. PHPUnit_TextUI_Command->run() /usr/local/lib/php/PHPUnit/TextUI/Command.php:130
0.6419 39830848 4. PHPUnit_TextUI_TestRunner->doRun() /usr/local/lib/php/PHPUnit/TextUI/Command.php:192
0.9760 40345400 5. PHP_CodeCoverage->__construct() /usr/local/lib/php/PHPUnit/TextUI/TestRunner.php:258
0.9764 40358504 6. PHP_CodeCoverage_Driver_Xdebug->__construct() /usr/local/lib/php/PHP/CodeCoverage.php:119
关于如何让它工作的任何想法,而不必每次都更改 php.ini?