vendor/kunicmarko/sonata-annotation-bundle/src/SonataAnnotationBundle.php line 17

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace KunicMarko\SonataAnnotationBundle;
  4. use KunicMarko\SonataAnnotationBundle\DependencyInjection\Compiler\AccessCompilerPass;
  5. use KunicMarko\SonataAnnotationBundle\DependencyInjection\Compiler\AddChildCompilerPass;
  6. use KunicMarko\SonataAnnotationBundle\DependencyInjection\Compiler\AutoRegisterCompilerPass;
  7. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  8. use Symfony\Component\DependencyInjection\ContainerBuilder;
  9. use Symfony\Component\HttpKernel\Bundle\Bundle;
  10. /**
  11.  * @author Marko Kunic <kunicmarko20@gmail.com>
  12.  */
  13. final class SonataAnnotationBundle extends Bundle
  14. {
  15.     public function build(ContainerBuilder $container): void
  16.     {
  17.         $container->addCompilerPass(new AutoRegisterCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION1);
  18.         $container->addCompilerPass(new AccessCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);
  19.         $container->addCompilerPass(new AddChildCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);
  20.     }
  21. }