Add WebProfilerServiceProvider to inject Ajax profiler

- Silex provider implements feature, but only in Silex 2.0 compatible branch
This commit is contained in:
Thibaud Fabre
2016-01-20 07:57:01 +01:00
parent e884bcff93
commit 17e4750b59
3 changed files with 52 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ use Alchemy\Phrasea\Core\Event\Subscriber\BridgeExceptionSubscriber;
use Alchemy\Phrasea\Core\Event\Subscriber\FirewallSubscriber;
use Alchemy\Phrasea\Core\Event\Subscriber\JsonRequestSubscriber;
use Alchemy\Phrasea\Core\Event\Subscriber\DebuggerSubscriber;
use Alchemy\Phrasea\Core\Provider\WebProfilerServiceProvider as PhraseaWebProfilerServiceProvider;
use Monolog\Logger;
use Monolog\Processor\WebProcessor;
use Silex\Provider\WebProfilerServiceProvider;
@@ -63,6 +64,9 @@ return call_user_func(function ($environment = PhraseaApplication::ENV_PROD) {
$app->register($p = new WebProfilerServiceProvider(), [
'profiler.cache_dir' => $app['cache.path'].'/profiler',
]);
$app->register(new PhraseaWebProfilerServiceProvider());
$app->mount('/_profiler', $p);
if ($app['phraseanet.configuration-tester']->isInstalled()) {