symfony/symfony — Issue #2442: Avoid Request::createFromGlobals anywhere ?
Author: alexandresalome
Created: 2011-10-21 14:38:05+00:00
State: open

Hello, this is a RFC.

I often see in the code some people calling directly ``Request::createFromGlobals()``. I was thinking for a way to avoid such usages.

The solution I imagined was to remove super globals ``$_GET, $_POST``, etc. in **development environment** :

```
$request = Request::createFromGlobals();
$_GET = $_POST = $_SERVER = array();
```

What do you think of it ?