[2.7] Added deprecation warning for get request service in controller
This commit is contained in:
parent
fef2bd4812
commit
becd694968
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user