mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-10 13:55:37 +00:00
44eb4242ad
* 3.x: Resolve block chains against the render context instead of freezing lineages Resolve constant parent templates once instead of on every lookup Template runtime and block composition Fix wrapping the Twig cache pool in a second tag aware adapter Check that the use tag is allowed before resolving trait templates # Conflicts: # CHANGELOG # extra/twig-extra-bundle/TwigExtraBundle.php # src/Template.php
31 lines
995 B
PHP
31 lines
995 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Twig.
|
|
*
|
|
* (c) Fabien Potencier
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Twig\Extra\TwigExtraBundle;
|
|
|
|
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
|
use Twig\Extra\TwigExtraBundle\DependencyInjection\Compiler\MissingExtensionSuggestorPass;
|
|
use Twig\Extra\TwigExtraBundle\DependencyInjection\Compiler\TwigCachePoolPass;
|
|
|
|
class TwigExtraBundle extends Bundle
|
|
{
|
|
public function build(ContainerBuilder $container): void
|
|
{
|
|
parent::build($container);
|
|
|
|
$container->addCompilerPass(new MissingExtensionSuggestorPass());
|
|
// priority 64 so that it runs before Symfony's CachePoolPass (priority 32)
|
|
$container->addCompilerPass(new TwigCachePoolPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 64);
|
|
}
|
|
}
|