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

PHPUnit code coverage error #558

Closed
3 of 5 tasks
SharkMachine opened this issue Jan 23, 2022 · 3 comments
Closed
3 of 5 tasks

PHPUnit code coverage error #558

SharkMachine opened this issue Jan 23, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@SharkMachine
Copy link

Describe the bug

Defining filter for code coverage gives the following error:

Fatal error: Uncaught Error: Class "SebastianBergmann\CodeCoverage\Filter" not found in Standard input code:29

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
ubuntu-latest

PHP versions
7.4, 8.0, 8.1

To Reproduce
https://github.com/SharkMachine/xmlseclibs/runs/4911038329?check_suite_focus=true

Expected behavior
Tests pass and code coverage is generated

@SharkMachine SharkMachine added the bug Something isn't working label Jan 23, 2022
@shivammathur
Copy link
Owner

Possibly an issue with PHPUnit phar.

As a workaround, you can install it using composer instead of phar by specifying the whole packagist name.

Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/1735463587/workflow

- uses: shivammathur/setup-php@v2
  with:
    php-version: ${{ matrix.php-versions }}
    tools: phpunit/phpunit:9.5

@SharkMachine
Copy link
Author

Thanks for the workaround.

@SharkMachine
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants