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

Commitd6474fc

Browse files
committed
Merge branch '2.4'
2 parentsa9648e8 +e28d0cb commitd6474fc

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
@@ -438,7 +438,7 @@ Next, create the controller that will display the login form::
438438

439439
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
440440
use Symfony\Component\HttpFoundation\Request;
441-
use Symfony\Component\Security\Core\SecurityContext;
441+
use Symfony\Component\Security\Core\SecurityContextInterface;
442442

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

449449
// get the login error if there is one
450-
if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) {
450+
if ($request->attributes->has(SecurityContextInterface::AUTHENTICATION_ERROR)) {
451451
$error = $request->attributes->get(
452-
SecurityContext::AUTHENTICATION_ERROR
452+
SecurityContextInterface::AUTHENTICATION_ERROR
453453
);
454454
} else {
455-
$error = $session->get(SecurityContext::AUTHENTICATION_ERROR);
456-
$session->remove(SecurityContext::AUTHENTICATION_ERROR);
455+
$error = $session->get(SecurityContextInterface::AUTHENTICATION_ERROR);
456+
$session->remove(SecurityContextInterface::AUTHENTICATION_ERROR);
457457
}
458458

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

‎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