-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form][2.7] Allow choices with duplicated content #16582
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
ewgRa
commented
Nov 18, 2015
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no, but not sure |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #15606 |
License | MIT |
Doc PR |
Test fails seems not related. ping @webmozart @symfony/deciders is it possible to have your point of view on this ? |
* | ||
* @return array The raw choices | ||
*/ | ||
public function getRawChoices(); |
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.
adding a method to an interface is a BC break
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.
maybe you could add a new interface instead, with only these methods
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.
Ok, I will check.
What is the use case for having duplicate choices ? |
What @stof means and what I agree with is that duplicate choices (what you would get as selected value) makes no sense as you would not be able to distinguish each one anyway. Having the same label can happen and this is possible with the |
@Tobion first of all thanks for review
Sometimes it is not needed, sometimes business want to show same thing twice, just to increase chance that user select it, or do not miss. Also as check my case: #15606 (comment). About choice_label, if you mean something like this:
It is not working.
Can you check tests from this PR? For example there is a test that create ArrayKeyChoiceList without second argument, and in this case useChoicesAsValues will be true. It is not only about BC layer as I understand. Would be nice to hear @webmozart, as contributor of this code. |
Hi :) Thanks for working on this! I think this should be fixed in a less intrusive way. See #16685. |