@@ -436,7 +436,7 @@ Next, create the controller that will display the login form::
436436
437437 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
438438 use Symfony\Component\HttpFoundation\Request;
439- use Symfony\Component\Security\Core\SecurityContext ;
439+ use Symfony\Component\Security\Core\SecurityContextInterface ;
440440
441441 class SecurityController extends Controller
442442 {
@@ -445,20 +445,20 @@ Next, create the controller that will display the login form::
445445 $session = $request->getSession();
446446
447447 // get the login error if there is one
448- if ($request->attributes->has(SecurityContext ::AUTHENTICATION_ERROR)) {
448+ if ($request->attributes->has(SecurityContextInterface ::AUTHENTICATION_ERROR)) {
449449 $error = $request->attributes->get(
450- SecurityContext ::AUTHENTICATION_ERROR
450+ SecurityContextInterface ::AUTHENTICATION_ERROR
451451 );
452452 } else {
453- $error = $session->get(SecurityContext ::AUTHENTICATION_ERROR);
454- $session->remove(SecurityContext ::AUTHENTICATION_ERROR);
453+ $error = $session->get(SecurityContextInterface ::AUTHENTICATION_ERROR);
454+ $session->remove(SecurityContextInterface ::AUTHENTICATION_ERROR);
455455 }
456456
457457 return $this->render(
458458 'AcmeSecurityBundle:Security:login.html.twig',
459459 array(
460460 // last username entered by the user
461- 'last_username' => $session->get(SecurityContext ::LAST_USERNAME),
461+ 'last_username' => $session->get(SecurityContextInterface ::LAST_USERNAME),
462462 'error' => $error,
463463 )
464464 );