vendor/sonata-project/formatter-bundle/src/SonataFormatterBundle.php line 22

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the Sonata Project package.
  5.  *
  6.  * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace Sonata\FormatterBundle;
  12. use Sonata\FormatterBundle\DependencyInjection\Compiler\AddTwigExtensionsCompilerPass;
  13. use Sonata\FormatterBundle\DependencyInjection\Compiler\AddTwigLexerCompilerPass;
  14. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. final class SonataFormatterBundle extends Bundle
  18. {
  19.     public function build(ContainerBuilder $container): void
  20.     {
  21.         $container->addCompilerPass(new AddTwigExtensionsCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION1);
  22.         $container->addCompilerPass(new AddTwigLexerCompilerPass());
  23.     }
  24. }