Skip to content

Commit

Permalink
Set XDEBUG_MODE for coverage in PHPUnit with xdebug v3
Browse files Browse the repository at this point in the history
After switching to xdebug v3 in 325974c, PHPUnit stopped creating
coverage reports and began emitting the following warning:

> XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set

We set this as an environment variable in the `smr-integration-test`
service to re-enable coverage reports.

See sebastianbergmann/php-code-coverage#834.
  • Loading branch information
hemberger committed Jan 23, 2021
1 parent 6e8116d commit de36dd1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ services:
smr-integration-test:
<<: *smr-common
command: /smr/vendor/bin/phpunit test
environment:
- XDEBUG_MODE=coverage
volumes:
- ./config/config.specific.sample.php:/smr/config/config.specific.php:ro
- ./test.env:/smr/.env:ro
Expand Down

0 comments on commit de36dd1

Please sign in to comment.