Skip to content

Emit warning when OPCache is enabled while collecting coverage #6299

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 8, 2025

because of byte-code optimizations results of coverage collection can be wrong, as the source beeing executed might no longer match the actual php script sources

closes sebastianbergmann/php-code-coverage#1022

@staabm staabm marked this pull request as ready for review August 8, 2025 18:06
@sebastianbergmann sebastianbergmann added type/enhancement A new idea that should be implemented feature/code-coverage Issues related to code coverage (but not php-code-coverage) labels Aug 9, 2025
@staabm staabm changed the base branch from 10.5 to main August 9, 2025 08:54
@staabm staabm force-pushed the opc branch 5 times, most recently from 27511be to ae7c73e Compare August 9, 2025 11:42
@staabm
Copy link
Contributor Author

staabm commented Aug 10, 2025

@sebastianbergmann any tips on how to run this test properly in the phar tests?

locally it works for me, but CI errors

@sebastianbergmann
Copy link
Owner

any tips on how to run this test properly in the phar tests?

Short answer: don't.

I do not see anything here that would be specific to the PHAR. A regular PHPT test should be all that we need here. Does that help?

@staabm
Copy link
Contributor Author

staabm commented Aug 12, 2025

I do not see anything here that would be specific to the PHAR. A regular PHPT test should be all that we need here. Does that help?

we don't currently run regular tests with opcache + coverage-driver, therefore I cannot make the new test in CI fail.
(or we need to add a new CI job)

@staabm staabm closed this Aug 12, 2025
@staabm staabm reopened this Aug 12, 2025
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) type/enhancement A new idea that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Since v10 some lines are ignores
2 participants