Skip to content

Accept all data provider arguments in OverridingMethodRuleTest::testBug3403() - #6737

Merged
staabm merged 1 commit into
phpstan:2.3.xfrom
gnutix:fix-testbug3403-signature
Oct 13, 2026
Merged

staabm merged 1 commit into
phpstan:2.3.xfrom
gnutix:fix-testbug3403-signature

Conversation

@gnutix

@gnutix gnutix commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

testBug3403(int $phpVersion) uses dataOverridingFinalMethod(), which yields three arguments. PHPUnit 12 reports the data sets as having more arguments than the test method accepts.

The visible effect is in mutation testing: Infection's per-mutant run for any mutant covered by this test file ends with "No tests executed!" and exit code 0, so those mutants are counted as escaped. That is what currently fails the "Mutation Testing" jobs on PRs touching rule or analyser code (e.g. #5976, #5977, #5979, #5980); reproduced locally with Infection 0.35.6, PHPUnit 12 and the CI coverage artifact, where removing this file from the generated config lets the existing tests kill the mutants.

Same fix as fb1506e applied to testOverridingFinalMethod().

🤖 Generated with Claude Code

https://claude.ai/code/session_01QW8VaDtn3cMdQowPSh1xGG

…ug3403()

dataOverridingFinalMethod() yields three arguments. PHPUnit 12 rejects
the data sets, and in Infection's per-mutant runs this test file makes
the run end with "No tests executed!" and exit 0, so every mutant it
covers is reported as escaped. Same fix as fb1506e applied to
testOverridingFinalMethod().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QW8VaDtn3cMdQowPSh1xGG
@VincentLanglet
VincentLanglet requested a review from staabm October 12, 2026 21:40
@staabm
staabm merged commit cdbfc45 into phpstan:2.3.x Oct 13, 2026
665 of 666 checks passed
@staabm

staabm commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

thank you!

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

Successfully merging this pull request may close these issues.

3 participants