vendor/terminal42/service-annotation-bundle/src/Terminal42ServiceAnnotationBundle.php line 12

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Terminal42\ServiceAnnotationBundle;
  4. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  5. use Symfony\Component\DependencyInjection\ContainerBuilder;
  6. use Symfony\Component\HttpKernel\Bundle\Bundle;
  7. use Terminal42\ServiceAnnotationBundle\DependencyInjection\Compiler\ServiceAnnotationPass;
  8. class Terminal42ServiceAnnotationBundle extends Bundle
  9. {
  10.     public function build(ContainerBuilder $container): void
  11.     {
  12.         parent::build($container);
  13.         // Priority must be higher than ResolveInstanceofConditionalsPass so annotations
  14.         // are added before autoconfiguration adds tags for interfaces etc.
  15.         // See Symfony\Component\DependencyInjection\Compiler\PassConfig
  16.         $container->addCompilerPass(new ServiceAnnotationPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION110);
  17.     }
  18. }