fix: EnumCaseToPascalCaseRector skips existing pascal case#7264
Merged
samsonasik merged 2 commits intorectorphp:mainfrom Sep 14, 2025
Merged
fix: EnumCaseToPascalCaseRector skips existing pascal case#7264samsonasik merged 2 commits intorectorphp:mainfrom
samsonasik merged 2 commits intorectorphp:mainfrom
Conversation
samsonasik
reviewed
Sep 14, 2025
|
|
||
| private function convertToPascalCase(string $name): string | ||
| { | ||
| if ($this->isPascalCase($name)) { |
Member
There was a problem hiding this comment.
use existing convertToPascalCase() method, compare, if same, then skip
Contributor
Author
There was a problem hiding this comment.
That's not going to work here, the convertToPascalCase() method is not idempotent
Member
There was a problem hiding this comment.
that strange that the check already there
rector-src/rules/CodingStyle/Rector/Enum_/EnumCaseToPascalCaseRector.php
Lines 104 to 107 in 87d4427
I am on mobile, I will check when I am back to PC
Member
There was a problem hiding this comment.
I've updated to use existing convertToPascalCase method 2a86213
a0d2cc9 to
2a86213
Compare
Member
|
@calebdw this should be ok now :) |
Member
|
Thank you @calebdw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes rectorphp/rector#9374
Thanks!