From 9e9f28e7a4a4c9eaf5d38c2c65cf5ff32ad09b36 Mon Sep 17 00:00:00 2001 From: Taiwo Akinosho Date: Thu, 14 Sep 2017 14:18:02 +0100 Subject: [PATCH 1/3] Uncommemted line 10: ** @Route("/lucky/number"). I was getting a routing error. --- page_creation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page_creation.rst b/page_creation.rst index 8977890e3d2..15578c1c0b2 100644 --- a/page_creation.rst +++ b/page_creation.rst @@ -48,7 +48,7 @@ random) number and prints it. To do that, create a "Controller class" and a class LuckyController { /** - * @Route("/lucky/number") + @Route("/lucky/number") */ public function numberAction() { From d89d2b292f97bc65296cab534a5160199acd66fd Mon Sep 17 00:00:00 2001 From: Taiwo Akinosho Date: Fri, 15 Sep 2017 00:12:11 +0100 Subject: [PATCH 2/3] added the step to include "use Symfony\Bundle\FrameworkBundle\Controller\Controller;" before Lucky Controller extends the base controller class. This was mentioned in the code but could easily have been missed as a step. I missed that and didn't realize it was a new line in the code. I think the necessary Framework bundles should all have been listed. --- page_creation.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/page_creation.rst b/page_creation.rst index 15578c1c0b2..c5299a87348 100644 --- a/page_creation.rst +++ b/page_creation.rst @@ -94,7 +94,10 @@ If you're returning HTML from your controller, you'll probably want to render a template. Fortunately, Symfony comes with `Twig`_: a templating language that's easy, powerful and actually quite fun. -First, make sure that ``LuckyController`` extends Symfony's base +First, include the Symfony controller class as shown in line 5 below then, +make sure that ``LuckyController`` extends Symfony's base +:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` class:: + :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` class:: // src/AppBundle/Controller/LuckyController.php From d2ff7d682167f94b7e512d71a8e28c5f94f61f86 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 4 Oct 2017 13:13:47 +0200 Subject: [PATCH 3/3] Rewords --- page_creation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/page_creation.rst b/page_creation.rst index c5299a87348..14af4f20f51 100644 --- a/page_creation.rst +++ b/page_creation.rst @@ -48,7 +48,7 @@ random) number and prints it. To do that, create a "Controller class" and a class LuckyController { /** - @Route("/lucky/number") + * @Route("/lucky/number") */ public function numberAction() { @@ -94,9 +94,9 @@ If you're returning HTML from your controller, you'll probably want to render a template. Fortunately, Symfony comes with `Twig`_: a templating language that's easy, powerful and actually quite fun. -First, include the Symfony controller class as shown in line 5 below then, -make sure that ``LuckyController`` extends Symfony's base -:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` class:: +First, import the Symfony's base +:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` class as shown +in line 5 below. Then, make sure that ``LuckyController`` extends from it:: :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` class::