Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite28d0cb

Browse files
committed
Merge branch '2.3' into 2.4
2 parentsf1a79e2 +80d70a4 commite28d0cb

File tree

9 files changed

+412
-27
lines changed

9 files changed

+412
-27
lines changed

‎book/security.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ Next, create the controller that will display the login form::
437437

438438
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
439439
use Symfony\Component\HttpFoundation\Request;
440-
use Symfony\Component\Security\Core\SecurityContext;
440+
use Symfony\Component\Security\Core\SecurityContextInterface;
441441

442442
class SecurityController extends Controller
443443
{
@@ -446,20 +446,20 @@ Next, create the controller that will display the login form::
446446
$session = $request->getSession();
447447

448448
// get the login error if there is one
449-
if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) {
449+
if ($request->attributes->has(SecurityContextInterface::AUTHENTICATION_ERROR)) {
450450
$error = $request->attributes->get(
451-
SecurityContext::AUTHENTICATION_ERROR
451+
SecurityContextInterface::AUTHENTICATION_ERROR
452452
);
453453
} else {
454-
$error = $session->get(SecurityContext::AUTHENTICATION_ERROR);
455-
$session->remove(SecurityContext::AUTHENTICATION_ERROR);
454+
$error = $session->get(SecurityContextInterface::AUTHENTICATION_ERROR);
455+
$session->remove(SecurityContextInterface::AUTHENTICATION_ERROR);
456456
}
457457

458458
return $this->render(
459459
'AcmeSecurityBundle:Security:login.html.twig',
460460
array(
461461
// last username entered by the user
462-
'last_username' => $session->get(SecurityContext::LAST_USERNAME),
462+
'last_username' => $session->get(SecurityContextInterface::LAST_USERNAME),
463463
'error' => $error,
464464
)
465465
);

‎components/dependency_injection/factories.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ class:
7979
8080
When you specify the class to use for the factory (via ``factory_class``)
8181
the method will be called statically. If the factory itself should be instantiated
82-
and the resulting object's method called (as in this example), configure the
83-
factory itself as a service:
82+
and the resulting object's method called, configure the factory itself as a service.
83+
In this case, the method (e.g. get) should be changed to be non-static:
8484

8585
..configuration-block::
8686

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp