File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public function register()
9090 return new \Symfony \Component \Form \FormRenderer ($ renderer );
9191 });
9292
93- $ this ->app ->alias ( \Symfony \Component \Form \FormRenderer::class, FormRendererInterface::class);
93+ $ this ->app ->alias (\Symfony \Component \Form \FormRenderer::class, FormRendererInterface::class);
9494
9595 $ this ->app ->bind ('form.type.extensions ' , function ($ app ) {
9696 return array (
@@ -207,13 +207,15 @@ protected function getTemplateDirectories()
207207 */
208208 protected function getTwigEnvironment ()
209209 {
210- if ($ this ->app ->bound (\Twig_Environment::class)) {
211- /** @var \Twig_Environment $twig */
212- return $ this ->app ->make (\Twig_Environment::class);
210+ if (! $ this ->app ->bound (\Twig_Environment::class)) {
211+ $ this ->app ->singleton (\Twig_Environment::class, function () {
212+ return new \Twig_Environment (new \Twig_Loader_Chain ([]), [
213+ 'cache ' => storage_path ('framework/views/twig ' ),
214+ ]);
215+ });
213216 }
214217
215- return new \Twig_Environment (new \Twig_Loader_Chain ([]), [
216- 'cache ' => storage_path ('framework/views/twig ' ),
217- ]);
218+ /** @var \Twig_Environment $twig */
219+ return $ this ->app ->make (\Twig_Environment::class);
218220 }
219221}
You can’t perform that action at this time.
0 commit comments