-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Fix #11694 - Enforce options value type check in some form types #11696
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
|
||
$resolver->setAllowedTypes(array( | ||
'first_options' => 'array', | ||
'second_options' => 'array', |
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.
I would add it for options
too
note to maintainers: should be merged in 2.3 |
👍 |
I'd like to note that many built-in form types are also prone to this behaviour:
Could fixing these types improve [DX]? |
@kix Thanks for your investigation! Do you want to add fixes for these other problems to this PR? |
@webmozart, sure, I've been doing some testing; currently thinking of a correct way to implement this all (some types are not so easy to figure out, like the |
@kix A good approach is to start with the trivial fixes first, and keep the more complicated ones for a later PR where we discuss some more. |
@webmozart, sure, basically that's what I intended to do :) |
Actually, the problem in |
|
|
…me form types (kix) This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11696). Discussion ---------- [Form] Fix #11694 - Enforce options value type check in some form types | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #11694 | License | MIT | Doc PR | none `Symfony\Component\Form\Extension\Core\Type\RepeatedType` allowed passing strings as options, which caused problems as in #11694. Commits ------- 0af6467 [Form] Fix #11694 - Enforce options value type check in some form types
@webmozart, well, if it's merged then why not? I'll make another PR then. |
…do anything (Tobion) This PR was merged into the 2.3 branch. Discussion ---------- [Form] no need to add the url listener when it does not do anything | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - In line with #11696 Commits ------- 7aea1c9 [Form] no need to add the url listener when it does not do anything
Symfony\Component\Form\Extension\Core\Type\RepeatedType
allowed passing strings as options, which caused problems as in #11694.