Skip to content

Commit 278659e

Browse files
committed
minor #10129 Remove useless $request (ismail1432)
This PR was submitted for the 4.1 branch but it was merged into the 2.8 branch instead (closes #10129). Discussion ---------- Remove useless $request AFAICS the Request class doesn't needs to be injected in the login action, in the example we don't use it. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- f22988f Remove useless $request
2 parents 225ba41 + f22988f commit 278659e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

security/form_login_setup.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,14 @@ configuration (``login``):
9191
// src/AppBundle/Controller/SecurityController.php
9292
9393
// ...
94-
use Symfony\Component\HttpFoundation\Request;
9594
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
9695
9796
class SecurityController extends Controller
9897
{
9998
/**
10099
* @Route("/login", name="login")
101100
*/
102-
public function loginAction(Request $request)
101+
public function loginAction()
103102
{
104103
}
105104
}
@@ -142,7 +141,7 @@ Great! Next, add the logic to ``loginAction()`` that displays the login form::
142141

143142
// src/AppBundle/Controller/SecurityController.php
144143

145-
public function loginAction(Request $request)
144+
public function loginAction()
146145
{
147146
$authenticationUtils = $this->get('security.authentication_utils');
148147

0 commit comments

Comments
 (0)