Skip to content

Commit

Permalink
minor #5979 [Book] Do not extend the base controller before introduci…
Browse files Browse the repository at this point in the history
…ng it (ogizanagi)

This PR was merged into the 2.3 branch.

Discussion
----------

[Book] Do not extend the base controller before introducing it

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3+
| Fixed tickets | #5969

Commits
-------

98c4525 [Book] Do not extend the base controller before introducing it
  • Loading branch information
xabbuh committed Dec 9, 2015
2 parents e6caa72 + 98c4525 commit e48c528
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions book/page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ a method inside of it that will be executed when someone goes to ``/lucky/number
// src/AppBundle/Controller/LuckyController.php
namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;

class LuckyController extends Controller
class LuckyController
{
/**
* @Route("/lucky/number")
Expand Down Expand Up @@ -104,7 +103,7 @@ Just add a second method to ``LuckyController``::
// src/AppBundle/Controller/LuckyController.php
// ...

class LuckyController extends Controller
class LuckyController
{
// ...

Expand Down Expand Up @@ -137,7 +136,7 @@ You can even shorten this with the handy :class:`Symfony\\Component\\HttpFoundat
// --> don't forget this new use statement
use Symfony\Component\HttpFoundation\JsonResponse;

class LuckyController extends Controller
class LuckyController
{
// ...

Expand Down Expand Up @@ -170,7 +169,7 @@ at the end:
// src/AppBundle/Controller/LuckyController.php
// ...
class LuckyController extends Controller
class LuckyController
{
/**
* @Route("/lucky/number/{count}")
Expand Down Expand Up @@ -224,7 +223,7 @@ The best part is that you can access this value and use it in your controller::
// src/AppBundle/Controller/LuckyController.php
// ...

class LuckyController extends Controller
class LuckyController
{

/**
Expand Down

0 comments on commit e48c528

Please sign in to comment.