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

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * @copyright  Copyright (c) 2020, terminal42 gmbh
  5.  * @author     terminal42 gmbh <https://terminal42.ch>
  6.  * @license    MIT
  7.  * @link       http://github.com/terminal42/service-annotation-bundle
  8.  */
  9. namespace Terminal42\ServiceAnnotationBundle;
  10. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\HttpKernel\Bundle\Bundle;
  13. use Terminal42\ServiceAnnotationBundle\DependencyInjection\Compiler\ServiceAnnotationPass;
  14. class Terminal42ServiceAnnotationBundle extends Bundle
  15. {
  16.     public function build(ContainerBuilder $container): void
  17.     {
  18.         parent::build($container);
  19.         // Priority must be higher than ResolveInstanceofConditionalsPass so annotations
  20.         // are added before autoconfiguration adds tags for interfaces etc.
  21.         // See Symfony\Component\DependencyInjection\Compiler\PassConfig
  22.         $container->addCompilerPass(new ServiceAnnotationPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION110);
  23.     }
  24. }