2020use Symfony \Bridge \Doctrine \Form \EventListener \MergeDoctrineCollectionListener ;
2121use Symfony \Component \Form \AbstractType ;
2222use Symfony \Component \Form \ChoiceList \Factory \CachingFactoryDecorator ;
23- use Symfony \Component \Form \ChoiceList \Factory \ChoiceListFactoryInterface ;
24- use Symfony \Component \Form \ChoiceList \Factory \DefaultChoiceListFactory ;
25- use Symfony \Component \Form \ChoiceList \Factory \PropertyAccessDecorator ;
2623use Symfony \Component \Form \Exception \RuntimeException ;
2724use Symfony \Component \Form \FormBuilderInterface ;
2825use Symfony \Component \OptionsResolver \Options ;
2926use Symfony \Component \OptionsResolver \OptionsResolver ;
30- use Symfony \Component \PropertyAccess \PropertyAccessorInterface ;
3127
3228abstract class DoctrineType extends AbstractType
3329{
@@ -36,11 +32,6 @@ abstract class DoctrineType extends AbstractType
3632 */
3733 protected $ registry ;
3834
39- /**
40- * @var ChoiceListFactoryInterface
41- */
42- private $ choiceListFactory ;
43-
4435 /**
4536 * @var IdReader[]
4637 */
@@ -108,15 +99,9 @@ public function getQueryBuilderPartsForCachingHash($queryBuilder)
10899 return false ;
109100 }
110101
111- public function __construct (ManagerRegistry $ registry, PropertyAccessorInterface $ propertyAccessor = null , ChoiceListFactoryInterface $ choiceListFactory = null )
102+ public function __construct (ManagerRegistry $ registry )
112103 {
113104 $ this ->registry = $ registry ;
114- $ this ->choiceListFactory = $ choiceListFactory ?: new CachingFactoryDecorator (
115- new PropertyAccessDecorator (
116- new DefaultChoiceListFactory (),
117- $ propertyAccessor
118- )
119- );
120105 }
121106
122107 public function buildForm (FormBuilderInterface $ builder , array $ options )
0 commit comments