Skip to content

Commit 47bae3b

Browse files
committed
bug #6708 Routes should be just imported, not mounted (OndraM)
This PR was merged into the master branch. Discussion ---------- Routes should be just imported, not mounted Finishes #6612 Commits ------- 34a3166 Routes should be just imported, not mounted
2 parents 3150d2a + 34a3166 commit 47bae3b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cookbook/configuration/micro-kernel-trait.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,12 @@ to hold the kernel. Now it looks like this::
188188
{
189189
// import the WebProfilerRoutes, only if the bundle is enabled
190190
if (isset($this->bundles['WebProfilerBundle'])) {
191-
$routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
192-
$routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
191+
$routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt');
192+
$routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler');
193193
}
194194

195195
// load the annotation routes
196-
$routes->mount(
197-
'/',
198-
$routes->import(__DIR__.'/../src/App/Controller/', '/', 'annotation')
199-
);
196+
$routes->import(__DIR__.'/../src/App/Controller/', '/', 'annotation');
200197
}
201198
}
202199

0 commit comments

Comments
 (0)