8000 [Form] Added radio button for empty value to expanded single-choice fields by webmozart · Pull Request #7939 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Added radio button for empty value to expanded single-choice fields #7939

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
May 6, 2013

Conversation

webmozart
Copy link
Contributor
Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #3154
License MIT
Doc PR symfony/symfony-docs#2605

* @param array $choices An array of choices. Not existing choices in this
* array are ignored.
*
* @return array An array of indices with ascending, 0-based numeric keys
* @return array An array of indices with ascending, 0-based numeric keys.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't put dots at the end of the @... lines

@rdohms
Copy link
Contributor
rdohms commented May 5, 2013

Will this be backported?

@webmozart
Copy link
Contributor Author

@rdohms This would change existing applications. I don't think we can backport this without breaking something.

fabpot added a commit that referenced this pull request May 6, 2013
This PR was merged into the master branch.

Discussion
----------

[Form] Added radio button for empty value to expanded single-choice fields

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #3154
| License       | MIT
| Doc PR        | symfony/symfony-docs#2605

Commits
-------

7933971 [Form] Added radio button for empty value to expanded single-choice fields
@fabpot fabpot merged commit 7933971 into symfony:master May 6, 2013
@rdohms
Copy link
Contributor
rdohms commented May 6, 2013

@bschussek not really, does this not kick in only if the empty_value option is set? Current functionality simply ignores this option, so its really a bug not a feature. If we backport this only people who actually meant their choice list to have an empty will have it display the empty option.

or is there more to it?

@webmozart
Copy link
Contributor Author

@rdohms The empty_value option is set automatically if required is false. We could backport it so that it is not set automatically for expanded single-choice fields < 2.3 and the empty field is only displayed if the empty_value option is set manually. @fabpot?

@fabpot
Copy link
Member
fabpot commented May 6, 2013

Really depends on the added complexity.

But you can look at it as being a new feature or a bug fix; in the past, for similar cases, we always opted to consider such things as new features instead of bug fixes.

@rdohms
Copy link
Contributor
rdohms commented May 6, 2013

@bschussek understood. I only ask because we have an internal ticket tied to this, so i need to understand what timeframes i can deal with. Backporting would allow me to roll out a fix now, 2.3 will require we wait a bit. No problem.

@webmozart
Copy link
Contributor Author

@rdohms Ok, I'd prefer to wait then. Thank you for your patience!

fabpot added a commit that referenced this pull request Sep 10, 2013
This PR was merged into the master branch.

Discussion
----------

[Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted

#7939 must be merged before this PR is merged.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5113, #5190
| License       | MIT
| Doc PR        | -

TODO:

- [x] test EntityChoiceList for stricter rules
- [ ] test ModelChoiceList for stricter rules
- [x] remove/deprecate the ChoiceList::getIndicesFor*() methods

Commits
-------

9efdb8e [Form] Deprecated ChoiceList::getIndicesFor*() methods
67ba131 [DoctrineBridge] Improved test coverage of EntityChoiceList
31e5ce5 [Form] Improved test coverage of ChoiceList classes
6283b0e [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
79a214f [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
62fbed6 [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0