Permalink
Browse files

Further simplify 3.2.x template instantiation

  • Loading branch information...
1 parent 317a7e9 commit 9f0c67f80298c865d51a51c8fbfb8667cf446320 @VSEphpbb VSEphpbb committed Jul 24, 2016
Showing with 11 additions and 14 deletions.
  1. +11 −14 helper/packager.php
View
25 helper/packager.php
@@ -246,24 +246,21 @@ protected function get_template_engine()
}
else
{
- $cache_dir = $this->phpbb_container->getParameter('core.cache_dir');
- $environment = new environment(
- $config,
- $this->phpbb_container->get('filesystem'),
- $this->phpbb_container->get('path_helper'),
- $cache_dir,
- $this->phpbb_container->get('ext.manager'),
- new loader(
- new \phpbb\filesystem\filesystem()
- )
- );
-
$template_engine = new twig(
$this->phpbb_container->get('path_helper'),
$config,
new context(),
- $environment,
- $cache_dir,
+ new environment(
+ $config,
+ $this->phpbb_container->get('filesystem'),
+ $this->phpbb_container->get('path_helper'),
+ $this->phpbb_container->getParameter('core.cache_dir'),
+ $this->phpbb_container->get('ext.manager'),
+ new loader(
+ new \phpbb\filesystem\filesystem()
+ )
+ ),
+ $this->phpbb_container->getParameter('core.cache_dir'),
$this->phpbb_container->get('user')
);
}

0 comments on commit 9f0c67f

Please sign in to comment.