@@ -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 );