@@ -246,45 +246,21 @@ protected function get_template_engine()
246246 }
247247 else
248248 {
249- // TODO: Remove these hacks once 3.2.x is stable
250- if ($ this ->phpbb_container ->hasParameter ('core.cache_dir ' ))
251- {
252- // Set up for phpBB > 3.2.0-b3
253- $ cache_dir = $ this ->phpbb_container ->getParameter ('core.cache_dir ' );
254- $ environment = new environment (
255- $ config ,
256- $ this ->phpbb_container ->get ('filesystem ' ),
257- $ this ->phpbb_container ->get ('path_helper ' ),
258- $ cache_dir ,
259- $ this ->phpbb_container ->get ('ext.manager ' ),
260- new loader (
261- new \phpbb \filesystem \filesystem ()
262- )
263- );
264- }
265- else
266- {
267- // Set up for phpBB 3.2.0-dev to 3.2.0-b2
268- $ cache_dir = $ this ->phpbb_container ->getParameter ('core.root_path ' ) . 'cache/ ' ;
269- $ environment = new environment (
249+ $ template_engine = new twig (
250+ $ this ->phpbb_container ->get ('path_helper ' ),
251+ $ config ,
252+ new context (),
253+ new environment (
270254 $ config ,
271255 $ this ->phpbb_container ->get ('filesystem ' ),
272256 $ this ->phpbb_container ->get ('path_helper ' ),
273- $ this ->phpbb_container ,
274- $ cache_dir ,
257+ $ this ->phpbb_container ->getParameter ('core.cache_dir ' ),
275258 $ this ->phpbb_container ->get ('ext.manager ' ),
276259 new loader (
277260 new \phpbb \filesystem \filesystem ()
278261 )
279- );
280- }
281-
282- $ template_engine = new twig (
283- $ this ->phpbb_container ->get ('path_helper ' ),
284- $ config ,
285- new context (),
286- $ environment ,
287- $ cache_dir ,
262+ ),
263+ $ this ->phpbb_container ->getParameter ('core.cache_dir ' ),
288264 $ this ->phpbb_container ->get ('user ' )
289265 );
290266 }
0 commit comments