Skip to content

Commit 26df2bd

Browse files
committed
Fix extends on ControllerWithTwig template
1 parent 6137fe1 commit 26df2bd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Resources/skeleton/controller/Controller.tpl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
namespace App\Controller;
44

55
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6-
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
6+
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
77
use Symfony\Component\HttpFoundation\Response;
88

9-
class <?= $controller_class_name ?> extends AbstractController
9+
class <?= $controller_class_name ?> extends Controller
1010
{
1111
/**
1212
* @Route("<?= $route_path ?>", name="<?= $route_name ?>")
1313
*/
14-
public function index()
14+
public function index(): Response
1515
{
1616
return new Response('Welcome to your new controller!');
1717
}

src/Resources/skeleton/controller/ControllerWithTwig.tpl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
namespace App\Controller;
44

55
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6-
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
6+
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
77
use Symfony\Component\HttpFoundation\Response;
88

9-
class <?= $controller_class_name ?> extends AbstractController
9+
class <?= $controller_class_name ?> extends Controller
1010
{
1111
/**
1212
* @Route("<?= $route_path ?>", name="<?= $route_name ?>")
1313
*/
14-
public function index()
14+
public function index(): Response
1515
{
1616
// replace this line with your own code!
1717
return $this->render('@Maker/demoPage.html.twig', [ 'path' => str_replace($this->getParameter('kernel.project_dir').'/', '', __FILE__) ]);

0 commit comments

Comments
 (0)