Latest version of xdebug (3) no longer outputs coverage
Describe the bug
Latest version of xdebug (3) no longer outputs coverage in standard output.
Expected behavior
Previous version (2) used to output coverage in stdout as follows:
$ dophpunit ${TRACE+--debug} --coverage-text --coverage-clover=reports/clover.xml --log-junit=reports/junit.xml --colors=never $PHP_UNIT_ARGS
PHPUnit 9.4.2 by Sebastian Bergmann and contributors.
.... 4 / 4 (100%)
Time: 00:00.079, Memory: 12.00 MB
OK (4 tests, 4 assertions)
Generating code coverage report in Clover XML format ... <!DOCTYPE html>
[...]
done [00:00.054]
Code Coverage Report:
2020-11-18 14:09:35
Summary:
Classes: (0/0)
Methods: (0/0)
Lines: 7.08% (23/325)
The last line allowed to grab the coverage in GitLab.
Actual behavior
This is no longer the case with version 3, with a warning message (is it related?)
$ dophpunit ${TRACE+--debug} --coverage-text --coverage-clover=reports/clover.xml --log-junit=reports/junit.xml --colors=never $PHP_UNIT_ARGS
PHPUnit 9.4.2 by Sebastian Bergmann and contributors.
Warning: xdebug.mode=coverage has to be set in php.ini
.... 4 / 4 (100%)
Time: 00:00.004, Memory: 6.00 MB
OK (4 tests, 4 assertions)
Context & Configuration
I've tried many things without success:
- add
-d xdebug.mode=coveragecommand line options - set
XDEBUG_MODE=coverage