diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2011-02-21 17:26:35 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2011-02-21 17:36:04 +0100 |
commit | f9bd8d8dfb915e667a1c7315727d985748d695c6 (patch) | |
tree | 23d6285526457e13c601457d5879be23f9843669 /Http/EntryPoint/RetryAuthenticationEntryPoint.php | |
parent | c9cd5c60b7ee6a1eef90826a8f323b467c13b9f7 (diff) | |
download | symfony-security-f9bd8d8dfb915e667a1c7315727d985748d695c6.zip symfony-security-f9bd8d8dfb915e667a1c7315727d985748d695c6.tar.gz symfony-security-f9bd8d8dfb915e667a1c7315727d985748d695c6.tar.bz2 |
remove response as a service
The Response is not available in the DIC anymore.
When you need to create a response, create an instance of
Symfony\Component\HttpFoundation\Response instead.
As a side effect, the Controller::createResponse() and Controller::redirect()
methods have been removed and can easily be replaced as follows:
return $this->createResponse('content', 200, array('foo' => 'bar'));
return new Response('content', 200, array('foo' => 'bar'));
return $this->redirect($url);
return Response::createRedirect($url);
Diffstat (limited to 'Http/EntryPoint/RetryAuthenticationEntryPoint.php')
-rw-r--r-- | Http/EntryPoint/RetryAuthenticationEntryPoint.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Http/EntryPoint/RetryAuthenticationEntryPoint.php b/Http/EntryPoint/RetryAuthenticationEntryPoint.php index ed1297f..444535a 100644 --- a/Http/EntryPoint/RetryAuthenticationEntryPoint.php +++ b/Http/EntryPoint/RetryAuthenticationEntryPoint.php @@ -53,9 +53,6 @@ class RetryAuthenticationEntryPoint implements AuthenticationEntryPointInterface $url = $scheme.'://'.$request->getHost().$port.$request->getScriptName().$request->getPathInfo().$qs; - $response = new Response(); - $response->setRedirect($url, 301); - - return $response; + return Response::createRedirect($url, 301); } } |