Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.2.5 |
Assuming either #21656, #21267 or #21880 broke the expected behaviour of Doctrine Bridge's EntityType.
Assumptions:
- You have an entity called AppBundle\Entity\Foo with correct annotations - fields: id, name
- The database schema has been updated to reflect the entity
- There is one row in the database table with ID 1
- CSRF disabled for brevity
Use case:
- Create a form called "bar", add an EntityType widget with the name "foo"; set "class" to "AppBundle:Foo"; set "choice_label" to "name"; set "multiple" to "true", set "invalid_message" to "Invalid value: {{ value }}".
- Post the following data to the form: bar[foo][]=1
- Evalulate $form->isValid()
Expected:
- Evaluates to boolean true.
Actual:
- Evalulates to boolean false - form errors state that for field "foo", the error is "Invalid value: array".
I rolled back to Symfony 3.2.4 and received the expected outcome of $form->isValid() evaluating to boolean true.