20
20
use Symfony \Bridge \Doctrine \Form \EventListener \MergeDoctrineCollectionListener ;
21
21
use Symfony \Component \Form \AbstractType ;
22
22
use 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 ;
26
23
use Symfony \Component \Form \Exception \RuntimeException ;
27
24
use Symfony \Component \Form \FormBuilderInterface ;
28
25
use Symfony \Component \OptionsResolver \Options ;
29
26
use Symfony \Component \OptionsResolver \OptionsResolver ;
30
- use Symfony \Component \PropertyAccess \PropertyAccessorInterface ;
31
27
32
28
abstract class DoctrineType extends AbstractType
33
29
{
@@ -36,11 +32,6 @@ abstract class DoctrineType extends AbstractType
36
32
*/
37
33
protected $ registry ;
38
34
39
- /**
40
- * @var ChoiceListFactoryInterface
41
- */
42
- private $ choiceListFactory ;
43
-
44
35
/**
45
36
* @var IdReader[]
46
37
*/
@@ -108,15 +99,9 @@ public function getQueryBuilderPartsForCachingHash($queryBuilder)
108
99
return false ;
109
100
}
110
101
111
- public function __construct (ManagerRegistry $ registry, PropertyAccessorInterface $ propertyAccessor = null , ChoiceListFactoryInterface $ choiceListFactory = null )
102
+ public function __construct (ManagerRegistry $ registry )
112
103
{
113
104
$ this ->registry = $ registry ;
114
- $ this ->choiceListFactory = $ choiceListFactory ?: new CachingFactoryDecorator (
115
- new PropertyAccessDecorator (
116
- new DefaultChoiceListFactory (),
117
- $ propertyAccessor
118
- )
119
- );
120
105
}
121
106
122
107
public function buildForm (FormBuilderInterface $ builder , array $ options )
0 commit comments