vendor/twig/extra-bundle/TwigExtraBundle.php line 29

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Twig.
  4.  *
  5.  * (c) Fabien Potencier
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Twig\Extra\TwigExtraBundle;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\HttpKernel\Bundle\Bundle;
  13. use Twig\Extra\TwigExtraBundle\DependencyInjection\Compiler\MissingExtensionSuggestorPass;
  14. if (!method_exists(ContainerBuilder::class, 'getAutoconfiguredAttributes')) {
  15.     class TwigExtraBundle extends Bundle
  16.     {
  17.         public function build(ContainerBuilder $container): void
  18.         {
  19.             parent::build($container);
  20.             $container->addCompilerPass(new MissingExtensionSuggestorPass());
  21.         }
  22.     }
  23. } else {
  24.     class TwigExtraBundle extends Bundle
  25.     {
  26.         /** @return void */
  27.         public function build(ContainerBuilder $container)
  28.         {
  29.             parent::build($container);
  30.             $container->addCompilerPass(new MissingExtensionSuggestorPass());
  31.         }
  32.     }
  33. }