Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes |
RFC? | no |
Symfony version | 3.2.5 |
I am using Forms to validate incoming data, and have ChoiceType
s that receive int.
#21267 introduces a change that requires all values to strings. Clearly this breaks stuff.
Example:
->add('days', ChoiceType::class, [
'choices' => [
'Mon' => 1,
'Tue' => 2,
'Wed' => 3,
'Thu' => 4,
'Fri' => 5,
'Sat' => 6,
'Sun' => 7,
],
'preferred_choices' => [(int) date('w')],
'multiple' => true,
'by_reference' => false,
])
And the submitted data is:
'days' => [1, 2, 3, 4, 5, 6, 0],
I am using forms to handle data coming in as json, using mcfedr/json-form