Description
Symfony version(s) affected
7.0.0
Description
@HeahDude in #51043 you removed FormEvent::setData()
.
But ChoiceType::buildForm()
still contains this line at https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php#L162
$event->setData($knownValues);
But this will now lead to a BadMethodCallException
in PostSetDataEvent
and PostSubmitEvent
.
Did you overlook this? Or is this line never executed in fact (and thus could be deleted)?
How to reproduce
See above.
Possible Solution
No response
Additional Context
No response