@@ -42,21 +42,13 @@ public function process(ContainerBuilder $container)
42
42
$ viewDir = \dirname ((new \ReflectionClass ('Symfony\Bridge\Twig\Extension\FormExtension ' ))->getFileName (), 2 ).'/Resources/views ' ;
43
43
$ templateIterator = $ container ->getDefinition ('twig.template_iterator ' );
44
44
$ templatePaths = $ templateIterator ->getArgument (1 );
45
- $ cacheWarmer = null ;
46
- if ($ container ->hasDefinition ('twig.cache_warmer ' )) {
47
- $ cacheWarmer = $ container ->getDefinition ('twig.cache_warmer ' );
48
- $ cacheWarmerPaths = $ cacheWarmer ->getArgument (2 );
49
- }
50
45
$ loader = $ container ->getDefinition ('twig.loader.native_filesystem ' );
51
46
52
47
if ($ container ->has ('mailer ' )) {
53
48
$ emailPath = $ viewDir .'/Email ' ;
54
49
$ loader ->addMethodCall ('addPath ' , [$ emailPath , 'email ' ]);
55
50
$ loader ->addMethodCall ('addPath ' , [$ emailPath , '!email ' ]);
56
51
$ templatePaths [$ emailPath ] = 'email ' ;
57
- if ($ cacheWarmer ) {
58
- $ cacheWarmerPaths [$ emailPath ] = 'email ' ;
59
- }
60
52
}
61
53
62
54
if ($ container ->has ('form.extension ' )) {
@@ -65,15 +57,9 @@ public function process(ContainerBuilder $container)
65
57
$ coreThemePath = $ viewDir .'/Form ' ;
66
58
$ loader ->addMethodCall ('addPath ' , [$ coreThemePath ]);
67
59
$ templatePaths [$ coreThemePath ] = null ;
68
- if ($ cacheWarmer ) {
69
- $ cacheWarmerPaths [$ coreThemePath ] = null ;
70
- }
71
60
}
72
61
73
62
$ templateIterator ->replaceArgument (1 , $ templatePaths );
74
- if ($ cacheWarmer ) {
75
- $ container ->getDefinition ('twig.cache_warmer ' )->replaceArgument (2 , $ cacheWarmerPaths );
76
- }
77
63
78
64
if ($ container ->has ('router ' )) {
79
65
$ container ->getDefinition ('twig.extension.routing ' )->addTag ('twig.extension ' );
@@ -90,10 +76,6 @@ public function process(ContainerBuilder $container)
90
76
}
91
77
}
92
78
93
- if (!$ container ->has ('http_kernel ' )) {
94
- $ container ->removeDefinition ('twig.controller.preview_error ' );
95
- }
96
-
97
79
if ($ container ->has ('request_stack ' )) {
98
80
$ container ->getDefinition ('twig.extension.httpfoundation ' )->addTag ('twig.extension ' );
99
81
}
0 commit comments