Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 2e506b7

Browse files
committed
minor #793 Add a Request use statements to the controller (weaverryan)
This PR was merged into the 2.3 branch. Discussion ---------- Add a Request use statements to the controller Hiya guys! Beginners build off of this controller, including copying it to create second/third controllers. Since needing the `$request` object is so common, and getting it involves type-hinting the Request argument, I think this helps. Thanks! Commits ------- 8b84461 It's common to need the request, which you get from type-hinting. Adding the use helps to remove a step for users in the future
2 parents 07dacd2 + 8b84461 commit 2e506b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/AppBundle/Controller/DefaultController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
66
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7+
use Symfony\Component\HttpFoundation\Request;
78

89
class DefaultController extends Controller
910
{

0 commit comments

Comments
 (0)