Skip to content

[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

Merged
merged 1 commit into from
Apr 16, 2018
Merged

Conversation

HeahDude
Copy link
Contributor

@HeahDude HeahDude commented Apr 15, 2018

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.

@HeahDude
Copy link
Contributor Author

Change documented here symfony/symfony-docs#9598.

@HeahDude HeahDude force-pushed the choice-trim branch 3 times, most recently from 81b8bbf to 22f3851 Compare April 15, 2018 08:07
@HeahDude HeahDude changed the title Fixed trimming choice values [Form] Fixed trimming choice values Apr 15, 2018
@HeahDude HeahDude changed the base branch from master to 2.7 April 15, 2018 08:09
Copy link
Member

@nicolas-grekas nicolas-grekas left a 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

@nicolas-grekas
Copy link
Member

Just to reduce the BC breaking potential: what about trying the trimmed value when the non trimmed one doesn't match?

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Apr 15, 2018
@HeahDude
Copy link
Contributor Author

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?

@fabpot
Copy link
Member

fabpot commented Apr 16, 2018

Thank you @HeahDude.

@fabpot fabpot merged commit 00cdf5e into symfony:2.7 Apr 16, 2018
fabpot added a commit that referenced this pull request Apr 16, 2018
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
@HeahDude HeahDude deleted the choice-trim branch April 17, 2018 07:27
wouterj added a commit to symfony/symfony-docs that referenced this pull request May 8, 2018
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants