mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 07:36:30 +03:00
Merge pull request #785
This commit is contained in:
@@ -15,14 +15,26 @@ class Kernel extends BaseKernel
|
||||
{
|
||||
$container->import('../config/{packages}/*.yaml');
|
||||
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
|
||||
$container->import('../config/{services}.yaml');
|
||||
$container->import('../config/{services}_'.$this->environment.'.yaml');
|
||||
|
||||
if (file_exists(\dirname(__DIR__).'/config/services.yaml')) {
|
||||
$container->import('../config/{services}.yaml');
|
||||
$container->import('../config/{services}_'.$this->environment.'.yaml');
|
||||
} else {
|
||||
$path = \dirname(__DIR__).'/config/services.php';
|
||||
(require $path)($container->withPath($path), $this);
|
||||
}
|
||||
}
|
||||
|
||||
protected function configureRoutes(RoutingConfigurator $routes): void
|
||||
{
|
||||
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
|
||||
$routes->import('../config/{routes}/*.yaml');
|
||||
$routes->import('../config/{routes}.yaml');
|
||||
|
||||
if (file_exists(\dirname(__DIR__).'/config/routes.yaml')) {
|
||||
$routes->import('../config/{routes}.yaml');
|
||||
} else {
|
||||
$path = \dirname(__DIR__).'/config/routes.php';
|
||||
(require $path)($routes->withPath($path), $this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user