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

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\CheckBundleDependenciesPass;
  13. use Nelmio\Alice\Bridge\Symfony\DependencyInjection\Compiler\RegisterFakerProvidersPass;
  14. use Nelmio\Alice\Bridge\Symfony\DependencyInjection\Compiler\RegisterTagServicesPass;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. final class NelmioAliceBundle extends Bundle
  18. {
  19.     public function build(ContainerBuilder $container): void
  20.     {
  21.         parent::build($container);
  22.         $container->addCompilerPass(new CheckBundleDependenciesPass());
  23.         $container->addCompilerPass(new RegisterFakerProvidersPass());
  24.         $container->addCompilerPass(
  25.             new RegisterTagServicesPass(
  26.                 'nelmio_alice.file_parser.registry',
  27.                 'nelmio_alice.file_parser'
  28.             )
  29.         );
  30.         $container->addCompilerPass(
  31.             new RegisterTagServicesPass(
  32.                 'nelmio_alice.fixture_builder.denormalizer.flag_parser.registry',
  33.                 'nelmio_alice.fixture_builder.denormalizer.chainable_flag_parser'
  34.             )
  35.         );
  36.         $container->addCompilerPass(
  37.             new RegisterTagServicesPass(
  38.                 'nelmio_alice.fixture_builder.denormalizer.fixture.registry_denormalizer',
  39.                 'nelmio_alice.fixture_builder.denormalizer.chainable_fixture_denormalizer'
  40.             )
  41.         );
  42.         $container->addCompilerPass(
  43.             new RegisterTagServicesPass(
  44.                 'nelmio_alice.fixture_builder.denormalizer.fixture.specs.calls.simple_denormalizer',
  45.                 'nelmio_alice.fixture_builder.denormalizer.chainable_method_flag_handler'
  46.             )
  47.         );
  48.         $container->addCompilerPass(
  49.             new RegisterTagServicesPass(
  50.                 'nelmio_alice.fixture_builder.expression_language.parser.token_parser.registry',
  51.                 'nelmio_alice.fixture_builder.expression_language.chainable_token_parser'
  52.             )
  53.         );
  54.         $container->addCompilerPass(
  55.             new RegisterTagServicesPass(
  56.                 'nelmio_alice.generator.instantiator.registry',
  57.                 'nelmio_alice.generator.instantiator.chainable_instantiator'
  58.             )
  59.         );
  60.         $container->addCompilerPass(
  61.             new RegisterTagServicesPass(
  62.                 'nelmio_alice.generator.caller.registry',
  63.                 'nelmio_alice.generator.caller.chainable_call_processor'
  64.             )
  65.         );
  66.         $container->addCompilerPass(
  67.             new RegisterTagServicesPass(
  68.                 'nelmio_alice.generator.resolver.parameter.registry',
  69.                 'nelmio_alice.generator.resolver.parameter.chainable_resolver'
  70.             )
  71.         );
  72.         $container->addCompilerPass(
  73.             new RegisterTagServicesPass(
  74.                 'nelmio_alice.generator.resolver.value.registry',
  75.                 'nelmio_alice.generator.resolver.value.chainable_resolver'
  76.             )
  77.         );
  78.     }
  79. }