From 34a3166f0202f4a025fb8c4593eb5dfb10284dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Machulda?= Date: Wed, 25 May 2016 17:15:41 +0200 Subject: [PATCH] Routes should be just imported, not mounted --- cookbook/configuration/micro-kernel-trait.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cookbook/configuration/micro-kernel-trait.rst b/cookbook/configuration/micro-kernel-trait.rst index b1498d2bb1e..74a89b24590 100644 --- a/cookbook/configuration/micro-kernel-trait.rst +++ b/cookbook/configuration/micro-kernel-trait.rst @@ -194,15 +194,12 @@ to hold the kernel. Now it looks like this:: { // import the WebProfilerRoutes, only if the bundle is enabled if (isset($this->bundles['WebProfilerBundle'])) { - $routes->mount('/_wdt', $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml')); - $routes->mount('/_profiler', $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml')); + $routes->import('@WebProfilerBundle/Resources/config/routing/wdt.xml', '/_wdt'); + $routes->import('@WebProfilerBundle/Resources/config/routing/profiler.xml', '/_profiler'); } // load the annotation routes - $routes->mount( - '/', - $routes->import(__DIR__.'/../src/App/Controller/', '/', 'annotation') - ); + $routes->import(__DIR__.'/../src/App/Controller/', '/', 'annotation'); } }