-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[String] Fix snake conversion #47185
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
Contributor
simPod
commented
Aug 4, 2022
Q | A |
---|---|
Branch? | 5.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Tickets | Fix #47054 |
License | MIT |
derrabus
approved these changes
Aug 4, 2022
lyrixx
approved these changes
Aug 4, 2022
welcoMattic
approved these changes
Aug 4, 2022
Thank you @simPod. |
This was referenced Aug 26, 2022
Merged
Merged
Merged
This was referenced Aug 29, 2022
fabpot
added a commit
that referenced
this pull request
Sep 1, 2022
This PR was submitted for the 6.2 branch but it was merged into the 5.4 branch instead. Discussion ---------- [String] CamelCase/SnakeCase on uppercase word | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no | Deprecations? | ~ | Tickets | Fix #47421 | License | MIT | Doc PR | The behavior of `->snake()` method from String component has changed in 6.1.4, now, using `u('SYMFONY')->snake()` return `s_ymfony` instead of `symfony` (#47185). After, some investigations, it seams the `->camel()` behavior is not exactly the expected one: `u('SYMFONY')->camel()` return `sYMFONY` instead of `SYMFONY`. This PR give theses behaviors: - CamelCase: - '' => '' - x_y => xY - xu_yo => xuYo - symfony_is_great => symfonyIsGreat - symfony_5_is_great => symfony5IsGreat - Symfony is great => symfonyIsGreat - Symfony is a great framework => symfonyIsAGreatFramework - \*Symfony\* is GREAT!! => symfonyIsGREAT - **SYMFONY => SYMFONY** - SnakeCase: - '' => '' - x_y => x_y - X_Y => x_y - xu_yo => xu_yo - symfonyIsGreat => symfony_is_great - symfony5IsGreat => symfony5_is_great - symfony5isGreat => symfony5is_great - Symfony is great => symfony_is_great - symfonyIsAGreatFramework => symfony_is_a_great_framework - symfonyIsGREAT => symfony_is_great - symfonyIsREALLYGreat => symfony_is_really_great - **SYMFONY => symfony** Commits ------- c3cae1f [String] CamelCase/SnakeCase on uppercase word
Merged
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.