Skip to content

Commit 3ac87ca

Browse files
committed
Updated code for Symfony 4.x
1 parent b91263d commit 3ac87ca

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

routing/service_container_parameters.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ inside your routing configuration:
1818

1919
.. code-block:: php-annotations
2020
21-
// src/AppBundle/Controller/MainController.php
22-
namespace AppBundle\Controller;
21+
// src/Controller/MainController.php
22+
namespace App\Controller;
2323
24-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
24+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
2525
use Symfony\Component\Routing\Annotation\Route;
2626
27-
class MainController extends Controller
27+
class MainController extends AbstractController
2828
{
2929
/**
3030
* @Route("/{_locale}/contact", name="contact", requirements={
3131
* "_locale"="%app.locales%"
3232
* })
3333
*/
34-
public function contactAction()
34+
public function contact()
3535
{
3636
// ...
3737
}
@@ -113,18 +113,18 @@ path):
113113

114114
.. code-block:: php-annotations
115115
116-
// src/AppBundle/Controller/MainController.php
117-
namespace AppBundle\Controller;
116+
// src/Controller/MainController.php
117+
namespace App\Controller;
118118
119-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
119+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
120120
use Symfony\Component\Routing\Annotation\Route;
121121
122-
class MainController extends Controller
122+
class MainController extends AbstractController
123123
{
124124
/**
125125
* @Route("/%app.route_prefix%/contact", name="contact")
126126
*/
127-
public function contactAction()
127+
public function contact()
128128
{
129129
// ...
130130
}

0 commit comments

Comments
 (0)