vendor/symfony/maker-bundle/src/MakerBundle.php line 27

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony MakerBundle package.
  4.  *
  5.  * (c) Fabien Potencier <[email protected]>
  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 Symfony\Bundle\MakerBundle;
  11. use Symfony\Bundle\MakerBundle\DependencyInjection\CompilerPass\DoctrineAttributesCheckPass;
  12. use Symfony\Bundle\MakerBundle\DependencyInjection\CompilerPass\MakeCommandRegistrationPass;
  13. use Symfony\Bundle\MakerBundle\DependencyInjection\CompilerPass\RemoveMissingParametersPass;
  14. use Symfony\Bundle\MakerBundle\DependencyInjection\CompilerPass\SetDoctrineAnnotatedPrefixesPass;
  15. use Symfony\Bundle\MakerBundle\DependencyInjection\CompilerPass\SetDoctrineManagerRegistryClassPass;
  16. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  17. use Symfony\Component\DependencyInjection\ContainerBuilder;
  18. use Symfony\Component\HttpKernel\Bundle\Bundle;
  19. /**
  20.  * @author Javier Eguiluz <[email protected]>
  21.  * @author Ryan Weaver <[email protected]>
  22.  */
  23. class MakerBundle extends Bundle
  24. {
  25.     public function build(ContainerBuilder $container)
  26.     {
  27.         // add a priority so we run before the core command pass
  28.         $container->addCompilerPass(new DoctrineAttributesCheckPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION11);
  29.         $container->addCompilerPass(new MakeCommandRegistrationPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION10);
  30.         $container->addCompilerPass(new RemoveMissingParametersPass());
  31.         $container->addCompilerPass(new SetDoctrineManagerRegistryClassPass());
  32.         $container->addCompilerPass(new SetDoctrineAnnotatedPrefixesPass());
  33.     }
  34. }