I have symfony form with field
->add('roles', ChoiceType::class, [
'choices' => [
'Developer' => 'ROLE_DEVELOPER',
'Support' => 'ROLE_SUPPORT',
'Admin' => 'ROLE_ADMIN'
],
'multiple' => true,
]);
And I want to remove multiple option, but symfony fall down with exception
phpfpm_1 | NOTICE: PHP message: [critical] Uncaught PHP Exception ErrorException: "Notice: Array to string conversion" at /var/www/symfony/vendor/symfony/form/ChoiceList/ArrayChoiceList.php line 68
How to avoid it?
multiple => trueis given, but after removing that line, it fails?