From 52c6d2ae9669eaec8913663169abfa5d57f18831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 25 Feb 2019 16:29:12 +0100 Subject: [PATCH] Load routes for specific env first It's common to add a 'wildcard' route to an application that looks like a CMS. Usually the route has the following path `/{slug}`. But with the current routes loading order, the 'dev' routing is loaded after regular routes. In previous SF versions, dev routing was loaded first. This PR retores this behavior. --- symfony/framework-bundle/4.2/src/Kernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symfony/framework-bundle/4.2/src/Kernel.php b/symfony/framework-bundle/4.2/src/Kernel.php index d507edfa..793761a7 100644 --- a/symfony/framework-bundle/4.2/src/Kernel.php +++ b/symfony/framework-bundle/4.2/src/Kernel.php @@ -41,8 +41,8 @@ class Kernel extends BaseKernel { $confDir = $this->getProjectDir().'/config'; - $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); $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'); } }