-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Description
Symfony version(s) affected
7.0.9
Description
Since version 7.0.9, the behavior of the snake
method has changed. This problem was detected during the dump of translations in symfony/ux-translator.
Now, the translation keys are incorrect, because the braces and the dots are preserved, as you can see on this screenshot:

Not sure it's the desired behavior, but if it's the case I will open another issue for translator dumper.
How to reproduce
s('The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.')->ascii()->snake()->toString()
Before 7.0.9, this instruction returns the string the_file_is_too_large_allowed_maximum_size_is_limit_suffix
Since 7.0.9, this instruction returns the string the_file_is_too_large._allowed_maximum_size_is_{{_limit_}}_{{_suffix_}}.
, with braces and dot at the end.
Piscinelove