Skip to content

Commit 52c6d2a

Browse files
committed
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.
1 parent 3115302 commit 52c6d2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

symfony/framework-bundle/4.2/src/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ protected function configureRoutes(RouteCollectionBuilder $routes)
4141
{
4242
$confDir = $this->getProjectDir().'/config';
4343

44-
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
4544
$routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob');
45+
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
4646
$routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
4747
}
4848
}

0 commit comments

Comments
 (0)