Skip to content

More executable lines of code counted with 9.2.21 #975

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
oliworx opened this issue Dec 23, 2022 · 5 comments
Closed

More executable lines of code counted with 9.2.21 #975

oliworx opened this issue Dec 23, 2022 · 5 comments

Comments

@oliworx
Copy link

oliworx commented Dec 23, 2022

Q A
php-code-coverage version 9.2.21
PHP version 7.4.33
Driver PCOV
PCOV version (if used) 1.0.6
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 9.5.26

I make code coverage reports for some larger projects every month, but suddenly thousends more LOC are reported and this totally breaks the statistics numbers.

Turns out now lines are counted as executable code wich where not counted before:

Old behaviour:
image

New behaviour:
image

It would be grat to have at least an option to bring back the old lines counting behaviour.

@sebastianbergmann
Copy link
Owner

CC @Slamdunk

@sebastianbergmann
Copy link
Owner

This is likely caused by the changes discussed in #959 and #964.

@Slamdunk
Copy link
Contributor

This is by design

It would be grat to have at least an option to bring back the old lines counting behaviour.

I'm sorry this is not possible, it would also bring back all the bugs the new solution fixes

@oliworx
Copy link
Author

oliworx commented Dec 24, 2022

@Slamdunk This change of measure is a breaking change and should not happen in a patch version, you should release a new major version for this!
The only job of this package is to measure something.
How can we trust the result numbers, if suddenly the methods or definitions of the measurements are changed, out of nowhere?
Even if you think the new method is more correct, you have to keep the measure consistent!.
Everything else is just unprofessional and unscientific.

@Slamdunk
Copy link
Contributor

Yes the logic changed drastically, but it had to be done in the same major becase previous results were just wrong.
Keeping consistency over erroneous results has no value.

I can assure you consistency and determinism is the core goal of the new implementation, even though it makes no sense to me to trust a metric that can be easily tricked with refactoring and code formatting.

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

No branches or pull requests

3 participants