-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Fixed trimming choice values #26932
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
Conversation
Change documented here symfony/symfony-docs#9598. |
81b8bbf
to
22f3851
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just one test case to add and good for me
Just to reduce the BC breaking potential: what about trying the trimmed value when the non trimmed one doesn't match? |
I've added a test that covers submitting a value with a white space. I don't think we should have a double check that add some overhead in two different transformers, it would mean we may should care of deprecating that behavior in master, adding even more overhead. You convinced me that this was a bug fix :), then I'm not in favor of having an ambiguous behavior about a match that should not be expected. It is not even possible to try to submit invalid values using a Form API from Browser Kit when playing in tests. What about not caring about this :), but taking care of fixing the docs should be enough, WDYT? |
Thank you @HeahDude. |
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed trimming choice values | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24247, #24712 | License | MIT | Doc PR | symfony/symfony-docs#9598 Follows #24712 discussion. Commits ------- 00cdf5e [Form] Fixed trimming choice values
…uiluz) This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed ChoiceType trim option Ref symfony/symfony#26932. Commits ------- 2dd6c56 fixup typo 360066d fixup option links 6631665 fixup @xabbuh's comment proper choice type trim file 8bfa059 Reword bbca3b0 [Form] Fixed ChoiceType trim option
Follows #24712 discussion.