How do I disable the Symfony 2 profiler bar?

It's not adding anything and it makes the page slower and I want it gone. Don't ask. There's little about the profiler on the website and nothing in the app config.


Solution 1:

This setting is in app/config/config_dev.yml:

web_profiler:
    toolbar: true
    intercept_redirects: false

Solution 2:

Additional: if you want to disable it for a special action in your controller than use this:

if ($this->container->has('profiler'))
{
    $this->container->get('profiler')->disable();
}