Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[String] CamelCase/SnakeCase on uppercase word#47423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
5fac902 tof9129e6CompareOskarStark approved these changesAug 29, 2022
Member
xabbuh commentedAug 31, 2022
This affects Symfony 5.4 too, doesn't it? |
ContributorAuthor
mpiot commentedAug 31, 2022
fabpot approved these changesSep 1, 2022
Member
fabpot commentedSep 1, 2022
Thank you@mpiot. |
Merged
fabpot added a commit that referenced this pull requestJul 1, 2024
…>snake() methods" (nicolas-grekas)This PR was squashed before being merged into the 5.4 branch.Discussion----------[String] Revert "Fixed u()->snake(), b()->snake() and s()->snake() methods"| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |Fix#57612| License | MITThis PR reverts#57497 for BC reasons, but keeps the test cases we added in the process. Those test cases allowed to spot a real issue where the ascii and unicode implementations didn't agree on the resulting camel case for `SYMFONY IS GREAT`. Both implementations now result in `SYMFONYISGREAT` (likely introduced in#47423).Commits-------6397c38 [String] Revert "Fixed u()->snake(), b()->snake() and s()->snake() methods"
Sign up for freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
The behavior of
->snake()method from String component has changed in 6.1.4, now, usingu('SYMFONY')->snake()returns_ymfonyinstead ofsymfony(#47185).After, some investigations, it seams the
->camel()behavior is not exactly the expected one:u('SYMFONY')->camel()returnsYMFONYinstead ofSYMFONY.This PR give theses behaviors:
CamelCase:
SnakeCase: