Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #47423 [String] CamelCase/SnakeCase on uppercase word (mpiot)
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
- Loading branch information