Skip to content

Commit cf5c046

Browse files
OndraMwouterj
authored andcommitted
Routes should be just imported, not mounted
1 parent 2221df8 commit cf5c046

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
@@ -194,15 +194,12 @@ to hold the kernel. Now it looks like this::
194194
{
195195
// import the WebProfilerRoutes, only if the bundle is enabled
196196
if (isset($this->bundles['WebProfilerBundle'])) {
197-
$routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml'));
198-
$routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml'));
197+
$routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt');
198+
$routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler');
199199
}
200200

201201
// load the annotation routes
202-
$routes->mount(
203-
'/',
204-
$routes->import(__DIR__.'/../src/App/Controller/', '/', 'annotation')
205-
);
202+
$routes->import(__DIR__.'/../src/App/Controller/', '/', 'annotation');
206203
}
207204
}
208205

0 commit comments

Comments
 (0)