-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xdebug mode detection ignores CLI option (-dxdebug.mode=coverage) #1002
Comments
The code for PHPUnit 9.6 that determines whether Xdebug 3 is loaded and configured for code coverage is here. The code for PHPUnit 10 is different in that it uses Can you please investigate whether backporting the |
Hi @sebastianbergmann thank you for the answer, will look into it this week! |
Summary
Lately we have changed our docker setup that sets
XDEBUG_MODE=debug
(based on .env file) and it broke our execution of tests with code coverage in PHPStorm.Currently we are able to bypass it by using different PHPStorm run configuration that forces
XDEBUG_MODE=coverage
.Current behavior
PHPUnit outputs a warning:
PHPStorm runs the tests with
php -dxdebug.mode=coverage /app/vendor/phpunit/phpunit/phpunit
which ensures that xdebug should use coverage value but PHPUnit uses XDEBUG_MODE environment variable with higher priority.I've checked this by checking
xdebug_info
.debug.php
I was able to test this in PHPUnit 9 (don't have a project on PHP10), but the code seems same?
Is this expected behavior?
How to reproduce
Expected behavior
Code coverage should be collected.
Thank you for your time!
The text was updated successfully, but these errors were encountered: