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