Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unicode String snake case - regression in latest fixes #57782

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

Closed
kevinpapst opened this issue Jul 19, 2024 · 2 comments
Closed

Unicode String snake case - regression in latest fixes #57782

kevinpapst opened this issue Jul 19, 2024 · 2 comments

Comments

@kevinpapst
Copy link

Symfony version(s) affected

6.49 and others

Description

Follow up of #57497 and #57612 and #57616

Behavior os snake() still contains a BC break.
I did not check whether this was introduced by the original change or one of the fixes.

For years the string123-customer,with/special#name was converted to 123-customer_with_special_name.
Now it returns 123-customer,with/special#name.

Many characters are not converted as before/expected.

How to reproduce

{{ '123-customer,with/special#name'|u.snake }}

shows 123-customer,with/special#name instead of the expected 123-customer_with_special_name

Possible Solution

Revert previous "fixes"?

Additional Context

No response

@kevinpapst kevinpapst added the Bug label Jul 19, 2024
@kevinpapst kevinpapst changed the title Unicode String snake case Unicode String snake case - regression in latest fixes Jul 19, 2024
@xabbuh xabbuh added the String label Jul 20, 2024
@xabbuh
Copy link
Member

xabbuh commented Jul 20, 2024

What you experience has been fixed by reverting the initial PR (#57497) in #57616. I nonetheless opened a PR to add a test to prevent future regressions (see #57789).

@kevinpapst
Copy link
Author

Ah, so sorry ... I missed that the fix was not yet released 😊 thanks for test additional test!

xabbuh added a commit that referenced this issue Jul 22, 2024
This PR was merged into the 5.4 branch.

Discussion
----------

[String] add test to prevent future regressions

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #57782
| License       | MIT

Commits
-------

dd83a2c add test to prevent future regressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants