From 430763067fa3d929eaf7d52a78559d9e3247d699 Mon Sep 17 00:00:00 2001 From: Surfoo Date: Tue, 30 Jun 2020 20:53:00 +0200 Subject: [PATCH] Fixed Micro Kernel demo --- configuration/micro_kernel_trait.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configuration/micro_kernel_trait.rst b/configuration/micro_kernel_trait.rst index 1d0dbe1a2d7..6c92b29c235 100644 --- a/configuration/micro_kernel_trait.rst +++ b/configuration/micro_kernel_trait.rst @@ -56,9 +56,7 @@ Next, create an ``index.php`` file that creates a kernel class and executes it:: protected function configureRoutes(RouteCollectionBuilder $routes) { - // kernel is a service that points to this class - // optional 3rd argument is the route name - $routes->add('/random/{limit}', 'kernel:randomAction'); + $routes->add('random_number', '/random/{limit}')->controller([$this, 'randomNumber']); } public function randomAction($limit) @@ -159,7 +157,7 @@ hold the kernel. Now it looks like this:: ]; if ($this->getEnvironment() == 'dev') { - $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); + $bundles[] = new \Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); } return $bundles;