Skip to content

[Renaming] Throw on same old and new class in RenameClassRector configuration - #8515

Merged
TomasVotruba merged 1 commit into
mainfrom
throw-on-same-rename-class
Sep 23, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
throw-on-same-rename-class

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

When RenameClassRector is configured with an old class equal to the new class, the rename is a no-op that silently does nothing.

This adds a guard in configure() that throws InvalidConfigurationException when any old and new class name pair is identical, so the misconfiguration surfaces early with a clear message.

@TomasVotruba
TomasVotruba merged commit bb8cdb5 into main Sep 23, 2026
43 of 45 checks passed
@TomasVotruba
TomasVotruba deleted the throw-on-same-rename-class branch September 23, 2026 12:08
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