vendor/nelmio/alice/src/Bridge/Symfony/NelmioAliceBundle.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Alice package.
  4.  *
  5.  * (c) Nelmio <hello@nelm.io>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Nelmio\Alice\Bridge\Symfony;
  12. use Nelmio\Alice\Bridge\Symfony\DependencyInjection\Compiler\RegisterFakerProvidersPass;
  13. use Nelmio\Alice\Bridge\Symfony\DependencyInjection\Compiler\RegisterTagServicesPass;
  14. use Symfony\Component\DependencyInjection\ContainerBuilder;
  15. use Symfony\Component\HttpKernel\Bundle\Bundle;
  16. final class NelmioAliceBundle extends Bundle
  17. {
  18.     /**
  19.      * {@inheritdoc}
  20.      */
  21.     public function build(ContainerBuilder $container)
  22.     {
  23.         parent::build($container);
  24.         $container->addCompilerPass(new RegisterFakerProvidersPass());
  25.         $container->addCompilerPass(
  26.             new RegisterTagServicesPass(
  27.                 'nelmio_alice.file_parser.registry',
  28.                 'nelmio_alice.file_parser'
  29.             )
  30.         );
  31.         $container->addCompilerPass(
  32.             new RegisterTagServicesPass(
  33.                 'nelmio_alice.fixture_builder.denormalizer.flag_parser.registry',
  34.                 'nelmio_alice.fixture_builder.denormalizer.chainable_flag_parser'
  35.             )
  36.         );
  37.         $container->addCompilerPass(
  38.             new RegisterTagServicesPass(
  39.                 'nelmio_alice.fixture_builder.denormalizer.fixture.registry_denormalizer',
  40.                 'nelmio_alice.fixture_builder.denormalizer.chainable_fixture_denormalizer'
  41.             )
  42.         );
  43.         $container->addCompilerPass(
  44.             new RegisterTagServicesPass(
  45.                 'nelmio_alice.fixture_builder.denormalizer.fixture.specs.calls.simple_denormalizer',
  46.                 'nelmio_alice.fixture_builder.denormalizer.chainable_method_flag_handler'
  47.             )
  48.         );
  49.         $container->addCompilerPass(
  50.             new RegisterTagServicesPass(
  51.                 'nelmio_alice.fixture_builder.expression_language.parser.token_parser.registry',
  52.                 'nelmio_alice.fixture_builder.expression_language.chainable_token_parser'
  53.             )
  54.         );
  55.         $container->addCompilerPass(
  56.             new RegisterTagServicesPass(
  57.                 'nelmio_alice.generator.instantiator.registry',
  58.                 'nelmio_alice.generator.instantiator.chainable_instantiator'
  59.             )
  60.         );
  61.         $container->addCompilerPass(
  62.             new RegisterTagServicesPass(
  63.                 'nelmio_alice.generator.caller.registry',
  64.                 'nelmio_alice.generator.caller.chainable_call_processor'
  65.             )
  66.         );
  67.         $container->addCompilerPass(
  68.             new RegisterTagServicesPass(
  69.                 'nelmio_alice.generator.resolver.parameter.registry',
  70.                 'nelmio_alice.generator.resolver.parameter.chainable_resolver'
  71.             )
  72.         );
  73.         $container->addCompilerPass(
  74.             new RegisterTagServicesPass(
  75.                 'nelmio_alice.generator.resolver.value.registry',
  76.                 'nelmio_alice.generator.resolver.value.chainable_resolver'
  77.             )
  78.         );
  79.     }
  80. }