setting xdebug.coverage_enable=On on command line for PHPunit

Yes, it can but only by running it like this:

php -dxdebug.mode=coverage bin/phpunit --coverage-clover='reports/coverage/coverage.xml' --coverage-html='reports/coverage'

Note: "..Xdebug: [Config] The setting 'xdebug.coverage_enable' has been renamed,.."


In the end I discovered you cannot do what I originially wanted.

Instead the answer is to add second php.ini file which has xdebug and coverage enabled. Then in my build.xml I used the following to run it.

php -c /usr/local/lib/php-coverage.ini /usr/bin/phpunit -c app/