From becd694968dcb4a5c01de0dc6e554c6cee77b131 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Mon, 19 Jan 2015 14:00:18 +0100 Subject: [PATCH] [2.7] Added deprecation warning for get request service in controller --- src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php index 13971d82e0c7..0df782367581 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -342,6 +342,10 @@ public function has($id) */ 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); }