Skip to content

Check for unintentionally covered code is wrong #1069

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

Closed
vdelau opened this issue Apr 3, 2025 · 1 comment
Closed

Check for unintentionally covered code is wrong #1069

vdelau opened this issue Apr 3, 2025 · 1 comment
Assignees
Labels

Comments

@vdelau
Copy link

vdelau commented Apr 3, 2025

This commit fc1ce26 introduced a bug. !empty() was replaced with === [] instead of !== []

Some background for prosperity:

PHPUnit will report the following error, without listing any files/code:

This test executed code that is not listed as code to be covered or used:

Also confirmed that this does not exist in 12.1.0 (installed PHPUnit is version 12.0.10):

    "require-dev": {
        "phpunit/phpunit": "^12.0",
        "phpunit/php-code-coverage": "!=12.1.1"
    }
@sebastianbergmann sebastianbergmann self-assigned this Apr 3, 2025
@sebastianbergmann sebastianbergmann changed the title Release 12.1.1 incorrectly evaluates unintended coverage Check for unintentionally covered code is wrong Apr 3, 2025
@vdelau
Copy link
Author

vdelau commented Apr 3, 2025

Confirmed fixed, thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants