use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\PropertyAccess\PropertyPath;
use Symfony\Contracts\Translation\TranslatorInterface;
class ChoiceType extends AbstractType
{ private ChoiceListFactoryInterface
$choiceListFactory;
private ?TranslatorInterface
$translator;
public function __construct(ChoiceListFactoryInterface
$choiceListFactory = null, TranslatorInterface
$translator = null
) { $this->choiceListFactory =
$choiceListFactory ??
new CachingFactoryDecorator( new PropertyAccessDecorator( new DefaultChoiceListFactory() ) );
$this->translator =
$translator;
} /**
* @return void
*/
public function buildForm(FormBuilderInterface
$builder, array
$options) {