File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Form \Extension \Core \Type ;
13
13
14
14
use Symfony \Component \Form \AbstractType ;
15
+ use Symfony \Component \Form \ChoiceList \Factory \CachingFactoryDecorator ;
15
16
use Symfony \Component \Form \ChoiceList \Factory \PropertyAccessDecorator ;
16
17
use Symfony \Component \Form \ChoiceList \LegacyChoiceListAdapter ;
17
18
use Symfony \Component \Form \ChoiceList \View \ChoiceGroupView ;
@@ -46,7 +47,11 @@ class ChoiceType extends AbstractType
46
47
47
48
public function __construct (ChoiceListFactoryInterface $ choiceListFactory = null )
48
49
{
49
- $ this ->choiceListFactory = $ choiceListFactory ?: new PropertyAccessDecorator (new DefaultChoiceListFactory ());
50
+ $ this ->choiceListFactory = $ choiceListFactory ?: new CachingFactoryDecorator (
51
+ new PropertyAccessDecorator (
52
+ new DefaultChoiceListFactory ()
53
+ )
54
+ );
50
55
}
51
56
52
57
/**
You can’t perform that action at this time.
0 commit comments