Deprecated: Symfony\Component\Translation\t(): Implicitly marking parameter $domain as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/translation/Resources/functions.php on line 18

Deprecated: Symfony\Component\Dotenv\Dotenv::loadEnv(): Implicitly marking parameter $envKey as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/dotenv/Dotenv.php on line 110

Deprecated: Symfony\Component\Runtime\GenericRuntime::getResolver(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/runtime/GenericRuntime.php on line 89

Deprecated: Symfony\Component\Runtime\RuntimeInterface::getResolver(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/runtime/RuntimeInterface.php on line 26

Deprecated: Symfony\Component\Console\Input\ArgvInput::__construct(): Implicitly marking parameter $argv as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/ArgvInput.php on line 46

Deprecated: Symfony\Component\Console\Input\ArgvInput::__construct(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/ArgvInput.php on line 46

Deprecated: Symfony\Component\Console\Input\Input::__construct(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/Input.php on line 36

Deprecated: Constant E_STRICT is deprecated in /var/www/html/t/taurushr/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /var/www/html/t/taurushr/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

vendor/zenstruck/foundry/src/ZenstruckFoundryBundle.php line 27

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the zenstruck/foundry package.
  4.  *
  5.  * (c) Kevin Bond <kevinbond@gmail.com>
  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 Zenstruck\Foundry;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  13. use Symfony\Component\HttpKernel\Bundle\Bundle;
  14. use Zenstruck\Foundry\Bundle\DependencyInjection\ChainManagerRegistryPass;
  15. use Zenstruck\Foundry\Bundle\DependencyInjection\GlobalStatePass;
  16. use Zenstruck\Foundry\Bundle\DependencyInjection\RegisterFakerProvidersPass;
  17. use Zenstruck\Foundry\Bundle\DependencyInjection\ZenstruckFoundryExtension;
  18. /**
  19.  * Must be at src root to be autoconfigured by Symfony Flex.
  20.  *
  21.  * @author Kevin Bond <kevinbond@gmail.com>
  22.  */
  23. final class ZenstruckFoundryBundle extends Bundle
  24. {
  25.     public function boot(): void
  26.     {
  27.         if (!Factory::isBooted() && $this->container) {
  28.             Factory::boot($this->container->get('.zenstruck_foundry.configuration'));
  29.         }
  30.     }
  31.     public function build(ContainerBuilder $container): void
  32.     {
  33.         parent::build($container);
  34.         $container->addCompilerPass(new ChainManagerRegistryPass());
  35.         $container->addCompilerPass(new GlobalStatePass());
  36.         $container->addCompilerPass(new RegisterFakerProvidersPass());
  37.     }
  38.     protected function createContainerExtension(): ?ExtensionInterface
  39.     {
  40.         return new ZenstruckFoundryExtension();
  41.     }
  42. }