Status: Closed (View Workflow)
The twig lexer is loaded via the service container in the TWIG environment. Why not just pass in the lexer directly and remove the service container?
[2015-02-14 20:04:16] <naderman> I do wonder why the twig environment needs the container itself
[2015-02-14 20:04:35] <VSE> hmm
[2015-02-14 20:05:06] <naderman> all it does with it is retrieve the lexer
[2015-02-14 20:05:11] <naderman> that seems very wrong somehow
[2015-02-14 20:05:35] <naderman> VSE: can you file a "major" bug report on 3.1 to remove that dependency?
[2015-02-14 20:06:02] <VSE> sure… https://github.com/phpbb/phpbb/blob/develop/phpBB/phpbb/template/twig/environment.php#L50
[2015-02-14 20:06:25] <naderman> VSE: yeah but I don't see why one wouldn't just pass in the lexer if needed
[2015-02-14 20:06:33] <naderman> that's the only thing $this->container is used in there
[2015-02-14 20:06:38] <naderman> it's protected so can't be used from elsewhere
[2015-02-14 20:06:42] <naderman> and there are no subclasses either