Skip to content

Commit

Permalink
bug #34888 [TwigBundle] add tags before processing them (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle] add tags before processing them

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34815
| License       | MIT
| Doc PR        |

Commits
-------

e1145a7 add tags before processing them
  • Loading branch information
xabbuh committed Dec 9, 2019
2 parents c0b2ade + e1145a7 commit bf877b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Symfony/Bundle/TwigBundle/TwigBundle.php
Expand Up @@ -32,7 +32,8 @@ public function build(ContainerBuilder $container)
{
parent::build($container);

$container->addCompilerPass(new ExtensionPass());
// ExtensionPass must be run before the FragmentRendererPass as it adds tags that are processed later
$container->addCompilerPass(new ExtensionPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
$container->addCompilerPass(new TwigEnvironmentPass());
$container->addCompilerPass(new TwigLoaderPass());
$container->addCompilerPass(new ExceptionListenerPass());
Expand Down

0 comments on commit bf877b8

Please sign in to comment.