5 use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait
;
6 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator
;
7 use Symfony\Component\HttpKernel\Kernel
as BaseKernel
;
8 use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator
;
10 class Kernel
extends BaseKernel
14 protected function configureContainer(ContainerConfigurator
$container): void
16 $projectDir = $this->getProjectDir();
18 $container->import($projectDir.'/config/{packages}/*.yaml');
19 $container->import($projectDir.'/config/{packages}/'.$this->environment
.'/*.yaml');
21 if (is_file($projectDir.'/config/services.yaml')) {
22 $container->import($projectDir.'/config/services.yaml');
23 $container->import($projectDir.'/config/{services}_'.$this->environment
.'.yaml');
25 $container->import($projectDir.'/config/{services}.php');
29 protected function configureRoutes(RoutingConfigurator
$routes): void
31 $projectDir = $this->getProjectDir();
33 $routes->import($projectDir.'/config/{routes}/'.$this->environment
.'/*.yaml');
34 $routes->import($projectDir.'/config/{routes}/*.yaml');
36 if (is_file($projectDir.'/config/routes.yaml')) {
37 $routes->import($projectDir.'/config/routes.yaml');
39 $routes->import($projectDir.'/config/{routes}.php');