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] Fixed u()->snake(), b()->snake() and s()->snake() methods#57497
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedJun 22, 2024
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
arczinosek commentedJun 22, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
alexandre-daubois commentedJun 23, 2024
You can ignore fabbot suggestion that are unrelated to your code. I've got a remark about this change. This is a behavior update, which seems indeed like a bug fix. However, many people could rely on the current behavior and this change could definitely bring a lot of unexpected breakages wherever this is used. This would mean a lot of BC breaks are to be expected which is not permitted by patch and minor versions bugfixes are targeting. 🤔 Because of this, I'm not sure this can be accepted as-is. Curious to have the opinion of someone else. |
nicolas-grekas commentedJun 24, 2024
Can you amend+push again to trigger tests? Strange they didn't run. |
The ByteString::snake and AbstractUnitcodeString::snake methods had a bug that caused incorrect string conversion results for all uppercase words separated by space or "_" character.Ex. "GREAT SYMFONY" was converted to "greatsymfony" instead of "great_symfony"
arczinosek commentedJun 26, 2024
Done |
nicolas-grekas commentedJun 28, 2024
Thank you@arczinosek. |
VincentLanglet commentedJun 28, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi, I think this introduce a bug/important change in the way snake case is generated. Prior to this PR, Is it wanted@arczinosek@nicolas-grekas ? |
This PR was merged into the 5.4 branch.Discussion----------[String] Normalize underscores in snake()| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |Fix#57497 (comment)| License | MITCommits-------0e6cd07 normalize underscores in snake()
nicolas-grekas commentedJun 29, 2024
derrabus commentedJul 1, 2024
Another regression has been reported:#57612 |
xabbuh commentedJul 1, 2024
see#57615 |
…>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"
This PR was merged into the 5.4 branch.Discussion----------[String] test: kebab-case to snake_case| Q | A| ------------- | ---| Branch? | 5.4| Bug fix? | yes?| New feature? | no| Deprecations? | no| Issues | -| License | MITIn Symfony 7.1.1, `kebab-case` strings casted to `snake_case` properly. The changes made in 7.1.2 broke this functionality and kept it `kebab-case`.It would be nice to have a `kebab-case` test added to the list to clearly define the expected behavior.Relates to:#57497,#57612,#57616Commits-------a6d0f3b test: kebab-case to snake_case
[String] ByteString::snake and AbstractUnitcodeString::snake methods doesn't convert all uppercase words in the right way.
For example, string "GREAT SYMFONY" is converted to "greatsymfony" instead of "great_symfony".