Skip to content
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

Exceptions during code coverage driver initialization are not handled correctly #4306

Closed
williamdes opened this issue Jun 19, 2020 · 0 comments
Assignees
Labels
feature/code-coverage Issues related to code coverage (but not php-code-coverage) feature/test-runner CLI test runner type/bug Something is broken

Comments

@williamdes
Copy link

Q A
PHPUnit version 9.2.3
PHP version 8.0.0-dev
Installation Method Composer

Summary

PHP Fatal error:  Uncaught SebastianBergmann\CodeCoverage\RuntimeException: xdebug.coverage_enable=On has to be set in php.ini in /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/php-code-coverage/src/Driver/Xdebug.php:40
Stack trace:
#0 /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(904): SebastianBergmann\CodeCoverage\Driver\Xdebug->__construct()
#1 /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/php-code-coverage/src/CodeCoverage.php(147): SebastianBergmann\CodeCoverage\CodeCoverage->selectDriver()
#2 /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(529): SebastianBergmann\CodeCoverage\CodeCoverage->__construct()
#3 /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#4 /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#5 /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#6 {main}
  thrown in /home/runner/work/mariadb-mysql-kbs/mariadb-mysql-kbs/vendor/phpunit/php-code-coverage/src/Driver/Xdebug.php on line 40
Script phpunit handling the test event returned with error code 255

Current behavior

Error

How to reproduce

https://github.com/williamdes/mariadb-mysql-kbs/runs/789686134?check_suite_focus=true

Expected behavior

No error as before with exact same setup https://github.com/williamdes/mariadb-mysql-kbs/runs/774446437?check_suite_focus=true#step:7:5

@williamdes williamdes added the type/bug Something is broken label Jun 19, 2020
@sebastianbergmann sebastianbergmann added the feature/code-coverage Issues related to code coverage (but not php-code-coverage) label Jun 20, 2020
@sebastianbergmann sebastianbergmann self-assigned this Jun 20, 2020
@sebastianbergmann sebastianbergmann changed the title [php 8] Uncaught SebastianBergmann\CodeCoverage\RuntimeException: xdebug.coverage_enable=On has to be set in php.ini Exceptions during code coverage driver initialization are not handled correctly Jun 20, 2020
@sebastianbergmann sebastianbergmann added the feature/test-runner CLI test runner label Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/code-coverage Issues related to code coverage (but not php-code-coverage) feature/test-runner CLI test runner type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants