Skip to content

Commit

Permalink
[2.7] Added deprecation warning for get request service in controller
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj authored and fabpot committed Feb 11, 2015
1 parent fef2bd4 commit becd694
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
Expand Up @@ -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);
}

Expand Down

0 comments on commit becd694

Please sign in to comment.