[2.7] Added deprecation warning for get request service in controller

This commit is contained in:
Wouter J 2015-01-19 14:00:18 +01:00 committed by Fabien Potencier
parent fef2bd4812
commit becd694968

View File

@ -342,6 +342,10 @@ class Controller extends ContainerAware
*/
public function get($id)
{
if ('request' === $id) {
trigger_error('The "request" service is deprecated and will be removed in 3.0. Add a typehint for Symfony\\Component\\HttpFoundation\\Request to your controller parameters to retrieve the request instead.', E_USER_DEPRECATED);
}
return $this->container->get($id);
}