From 1d4231e474300bbd92859b57fada63f1a2fbd256 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 9 Mar 2017 16:29:35 -0800 Subject: [PATCH] fixed Kernel when routing/ dir does not exist --- recipes/symfony/framework-bundle/src/Kernel.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/symfony/framework-bundle/src/Kernel.php b/recipes/symfony/framework-bundle/src/Kernel.php index da939589..c3cc8be9 100644 --- a/recipes/symfony/framework-bundle/src/Kernel.php +++ b/recipes/symfony/framework-bundle/src/Kernel.php @@ -59,7 +59,9 @@ class Kernel extends BaseKernel protected function configureRoutes(RouteCollectionBuilder $routes) { $confDir = dirname($this->getRootDir()).'/etc'; - $routes->import($confDir.'/routing/*'.self::CONFIG_EXTS, '/', 'glob'); + if (is_dir($confDir.'/routing/')) { + $routes->import($confDir.'/routing/*'.self::CONFIG_EXTS, '/', 'glob'); + } if (is_dir($confDir.'/routing/'.$this->getEnvironment())) { $routes->import($confDir.'/routing/'.$this->getEnvironment().'/**/*'.self::CONFIG_EXTS, '/', 'glob'); }