From 1e717c84daa6f848e0650ed414b45ba7b811d812 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 29 Sep 2021 12:09:46 +0200 Subject: [PATCH] Kernel can be empty in 5.4 (#1006) --- symfony/framework-bundle/5.4/src/Kernel.php | 31 --------------------- 1 file changed, 31 deletions(-) diff --git a/symfony/framework-bundle/5.4/src/Kernel.php b/symfony/framework-bundle/5.4/src/Kernel.php index 03debcac..779cd1f2 100644 --- a/symfony/framework-bundle/5.4/src/Kernel.php +++ b/symfony/framework-bundle/5.4/src/Kernel.php @@ -3,40 +3,9 @@ namespace App; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\HttpKernel\Kernel as BaseKernel; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; class Kernel extends BaseKernel { use MicroKernelTrait; - - protected function configureContainer(ContainerConfigurator $container): void - { - $projectDir = $this->getProjectDir(); - - $container->import($projectDir.'/config/{packages}/*.yaml'); - $container->import($projectDir.'/config/{packages}/'.$this->environment.'/*.yaml'); - - if (is_file($projectDir.'/config/services.yaml')) { - $container->import($projectDir.'/config/services.yaml'); - $container->import($projectDir.'/config/{services}_'.$this->environment.'.yaml'); - } else { - $container->import($projectDir.'/config/{services}.php'); - } - } - - protected function configureRoutes(RoutingConfigurator $routes): void - { - $projectDir = $this->getProjectDir(); - - $routes->import($projectDir.'/config/{routes}/'.$this->environment.'/*.yaml'); - $routes->import($projectDir.'/config/{routes}/*.yaml'); - - if (is_file($projectDir.'/config/routes.yaml')) { - $routes->import($projectDir.'/config/routes.yaml'); - } else { - $routes->import($projectDir.'/config/{routes}.php'); - } - } }