I want to use pcov instead of xdebug for code coverage generation.
I'm using Docker and I have xdebug installed.
Can I be sure that xdebug won't affect test execution if I run the following command?
php -d xdebug.default_enable=0 -d pcov.enabled=1 path/to/phpunit --coverage-text
I read that pcov might be faster but as I understood xdebug has to be disabled.
Is it better do the following to achieve the fastest coverage instead of running the above command?
run tests
php -d pcov.enabled=1 path/to/phpunit --coverage-text
restore xdebug config
Xdebug and PCOV both overload the same parts of the engine, as a result they are incompatible, and there's no sense in the authors trying to make them compatible.
Xdebug must not be loaded if you want to use PCOV as the driver for php-code-coverage.
Source: I wrote pcov ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With