mirror of
https://github.com/symfony/recipes.git
synced 2026-09-11 15:16:30 +03:00
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.
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user