diff --git a/symfony/framework-bundle/5.1/config b/symfony/framework-bundle/5.1/config new file mode 120000 index 000000000..7c6880c71 --- /dev/null +++ b/symfony/framework-bundle/5.1/config @@ -0,0 +1 @@ +../4.4/config \ No newline at end of file diff --git a/symfony/framework-bundle/5.1/manifest.json b/symfony/framework-bundle/5.1/manifest.json new file mode 120000 index 000000000..6646fc44b --- /dev/null +++ b/symfony/framework-bundle/5.1/manifest.json @@ -0,0 +1 @@ +../4.4/manifest.json \ No newline at end of file diff --git a/symfony/framework-bundle/5.1/post-install.txt b/symfony/framework-bundle/5.1/post-install.txt new file mode 120000 index 000000000..a98bd2364 --- /dev/null +++ b/symfony/framework-bundle/5.1/post-install.txt @@ -0,0 +1 @@ +../4.4/post-install.txt \ No newline at end of file diff --git a/symfony/framework-bundle/5.1/public b/symfony/framework-bundle/5.1/public new file mode 120000 index 000000000..7f72027ed --- /dev/null +++ b/symfony/framework-bundle/5.1/public @@ -0,0 +1 @@ +../4.4/public \ No newline at end of file diff --git a/symfony/framework-bundle/5.1/src/Controller b/symfony/framework-bundle/5.1/src/Controller new file mode 120000 index 000000000..c7a4d088a --- /dev/null +++ b/symfony/framework-bundle/5.1/src/Controller @@ -0,0 +1 @@ +../../4.4/src/Controller \ No newline at end of file diff --git a/symfony/framework-bundle/5.1/src/Kernel.php b/symfony/framework-bundle/5.1/src/Kernel.php new file mode 100644 index 000000000..945485729 --- /dev/null +++ b/symfony/framework-bundle/5.1/src/Kernel.php @@ -0,0 +1,54 @@ +getProjectDir().'/config/bundles.php'; + foreach ($contents as $class => $envs) { + if ($envs[$this->environment] ?? $envs['all'] ?? false) { + yield new $class(); + } + } + } + + public function getProjectDir(): string + { + return \dirname(__DIR__); + } + + protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void + { + $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); + $container->setParameter('container.dumper.inline_class_loader', \PHP_VERSION_ID < 70400 || !ini_get('opcache.preload')); + $container->setParameter('container.dumper.inline_factories', true); + $confDir = $this->getProjectDir().'/config'; + + $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{packages}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); + } + + protected function configureRouting(RoutingConfigurator $routes): void + { + $confDir = $this->getProjectDir().'/config'; + + $routes->import($confDir.'/{routes}/'.$this->environment.'/*'.self::CONFIG_EXTS, 'glob'); + $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, 'glob'); + $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, 'glob'); + } +}