Skip to content

[Renaming] Match constant names case-insensitively in RenameConstantRector - #9111

Merged
TomasVotruba merged 1 commit into
mainfrom
rename-case-insensitive
Dec 2, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
rename-case-insensitive

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

The keyed lookup from #8736 made RenameConstantRector match only the exact case, while the previous isName() scan matched any case. Now the map is keyed by the lowercased old name, the same as the other Renaming rules, so lower and upper case are covered the same way:

 // configured: MYSQL_ASSOC => MYSQLI_ASSOC
-return mysql_assoc;
+return MYSQLI_ASSOC;

Also updates the CLAUDE.md keyed-lookup note to match.

@TomasVotruba
TomasVotruba merged commit b746833 into main Dec 2, 2026
50 checks passed
@TomasVotruba
TomasVotruba deleted the rename-case-insensitive branch December 2, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant