8000 Merge branch '4.4' into 5.0 · symfony/symfony-docs@29c8a74 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29c8a74

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Made the constant private Update form_login_setup.rst
2 parents 65a24b9 + 197ade3 commit 29c8a74

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

security/form_login_setup.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ a traditional HTML form that submits to ``/login``:
192192
{
193193
use TargetPathTrait;
194194

195+
private const LOGIN_ROUTE = 'app_login';
196+
195197
private $entityManager;
196198
private $urlGenerator;
197199
private $csrfTokenManager;
@@ -207,7 +209,7 @@ a traditional HTML form that submits to ``/login``:
207209

208210
public function supports(Request $request)
209211
{
210-
return 'app_login' === $request->attributes->get('_route')
212+
return self::LOGIN_ROUTE === $request->attributes->get('_route')
211213
&& $request->isMethod('POST');
212214
}
213215

@@ -260,7 +262,7 @@ a traditional HTML form that submits to ``/login``:
260262

261263
protected function getLoginUrl()
262264
{
263-
return $this->urlGenerator->generate('app_login');
265+
return $this->urlGenerator->generate(self::LOGIN_ROUTE);
264266
}
265267
}
266268

0 commit comments

Comments
 (0)
0