Repository navigation
Test when the fixer writes new class names - #6934
Conversation
|
ondrej worked on fixer performance. please double check whether this PR is still improving performance after rebase |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2d5de61 to
89c716a
Compare
|
087443f makes the same change as this PR, so after the rebase no 087443f has no test for the check, so I pushed the tests alone. |
|
so do I understand correctly that this PR now contains a test which succeeds atm but fails with 087443f reverted? |
Correct, Ondrej's work made our changes no longer needed, but this PR had a test that was missing in Ondrej's work that could have value to keep |
|
thank you! |
087443f skips the traversal that writes new class names when no fix adds a name or changes a PHPDoc. It makes the same change as the first version of this PR, so this PR now adds only the tests.
NewClassNamesVisitorTestchecksNewClassNamesVisitor::hasNewNames()directly. Each branch of the check makes at least one case fail when it is removed.AddNamesRulegets an@add-doc-nametag that changes only the PHPDoc. Without it, every fix in the tests also added a name in PHP code, so no test covered the PHPDoc branch throughRuleErrorTransformer.🤖 Generated with Claude Code