diff --git a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml index b888e92507e4..0ea933ec3cb1 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml +++ b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml @@ -23,6 +23,10 @@ %twig.options% + + app + + @@ -39,7 +43,6 @@ - diff --git a/src/Symfony/Bundle/TwigBundle/TwigEngine.php b/src/Symfony/Bundle/TwigBundle/TwigEngine.php index e9fdd4806d23..8163904d0a24 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -12,7 +12,6 @@ namespace Symfony\Bundle\TwigBundle; use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; -use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; use Symfony\Component\Templating\TemplateNameParserInterface; use Symfony\Component\HttpFoundation\Response; @@ -31,16 +30,11 @@ class TwigEngine implements EngineInterface * * @param \Twig_Environment $environment A \Twig_Environment instance * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance - * @param GlobalVariables|null $globals A GlobalVariables instance or null */ - public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, GlobalVariables $globals = null) + public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser) { $this->environment = $environment; $this->parser = $parser; - - if (null !== $globals) { - $environment->addGlobal('app', $globals); - } } /**