-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[String] snake() method changes in 7.1.2 breaks symfony/ux-translator #57612
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
Comments
cc @arczinosek |
FYI the patch included in #57594 does not seem to fix the issue. |
Can you please try #57615? |
@xabbuh The patch works... For the string I wrote as example above 😅 For translations with built translation keys it's still a huge BC break... Let's just take this example: form:
none: No item selected UX Translator previously created a key for the translation, called Edit: I'm writing this simple example, but in my case it's more than 300 translations that are not generated correctly anymore. |
The
With the proposed fix the behaviour of 6.4.8 returns for us. |
@jmsche Can you debug what input is passed to the |
@xabbuh It's transforming |
…>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"
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 | MIT In 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, #57616 Commits ------- a6d0f3b test: kebab-case to snake_case
Same issue with the version |
Symfony version(s) affected
7.1.2
Description
After upgrading to Symfony 7.1.2 this morning, Symfony UX Translator won't compile anymore with Webpack.
Here is part of the error:
Downgrading symfony/string to 7.1.1 solves the issue.
How to reproduce
Possible Solution
The bug has been introduced with this PR: #57497
Reverting this solves the issue.
I guess it is a BC break?
Additional Context
No response
The text was updated successfully, but these errors were encountered: