-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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
to
f9129e6
Compare
OskarStark
approved these changes
Aug 29, 2022
This affects Symfony 5.4 too, doesn't it? |
fabpot
approved these changes
Sep 1, 2022
Thank you @mpiot. |
Merged
fabpot
added a commit
that referenced
this pull request
Jul 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 | MIT This 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 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.
The behavior of
->snake()
method from String component has changed in 6.1.4, now, usingu('SYMFONY')->snake()
returns_ymfony
instead ofsymfony
(#47185).After, some investigations, it seams the
->camel()
behavior is not exactly the expected one:u('SYMFONY')->camel()
returnsYMFONY
instead ofSYMFONY
.This PR give theses behaviors:
CamelCase:
SnakeCase: