From 1935fb1e8bba1f7bb4b21a7fdf23fdf33f6a8cb0 Mon Sep 17 00:00:00 2001 From: Doug Smith Date: Wed, 11 Jul 2018 11:38:44 -0400 Subject: [PATCH] method name is 'index' not 'indexAction' The route definitions here reference a method `indexAction` on the `LeapYearController` but the method is defined as `index` --- create_framework/http_kernel_controller_resolver.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create_framework/http_kernel_controller_resolver.rst b/create_framework/http_kernel_controller_resolver.rst index 9282a8a368a..860f5003bed 100644 --- a/create_framework/http_kernel_controller_resolver.rst +++ b/create_framework/http_kernel_controller_resolver.rst @@ -24,7 +24,7 @@ Update the route definition accordingly:: $routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', array( 'year' => null, - '_controller' => array(new LeapYearController(), 'indexAction'), + '_controller' => array(new LeapYearController(), 'index'), ))); The move is pretty straightforward and makes a lot of sense as soon as you @@ -64,7 +64,7 @@ two colons and a method name as a valid callback, like 'class::method':: $routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', array( 'year' => null, - '_controller' => 'LeapYearController::indexAction', + '_controller' => 'LeapYearController::index', ))); To make this code work, modify the framework code to use the controller