When using dev mode with a Symfony2.x application, one usually works in locale. Hence, such function does not works as expected (for instance, try to get th
As of Symfony 2.5 it could be done as:
$this->container->get('kernel')->getEnvironment();
Directly asking Kernel of it's environment looks nicer than searching for parameter.