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