简体   繁体   中英

Symfony2: How to disable profiler entirely?

Even if i remove from all config*.yml files web_profiler ... I'm getting

RuntimeException: You need to enable either the SQLite3 or PDO_SQLite extension for the profiler to run properly.

I just dont want to install sqlite on my system and i can't find how to turn off profiler entirely...

Any tips?

UPD : Commented in FrameworkExtension.php

if (isset($config['profiler'])) {
    $this->registerProfilerConfiguration($config['profiler'], $container, $loader);
}

But that's not good solution

Or you can change in your config_dev.yml:

web_profiler:
    toolbar: false

Have a look at your app/AppKernel.php.

Removing the line

$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();

should do the trick! Now the bundle never gets loaded and therefore now SQLite2 database is needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM