From 460e74d25441f82008dcb67bccdeb8c9dcc936b8 Mon Sep 17 00:00:00 2001 From: Johann Saunier Date: Tue, 22 Dec 2015 00:47:57 +0100 Subject: [PATCH] Fix #88 --- DataCollector/WebsocketDataCollector.php | 1 - DependencyInjection/CompilerPass/DataCollectorCompilerPass.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/DataCollector/WebsocketDataCollector.php b/DataCollector/WebsocketDataCollector.php index 8291d297..78d03d8e 100644 --- a/DataCollector/WebsocketDataCollector.php +++ b/DataCollector/WebsocketDataCollector.php @@ -5,7 +5,6 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\Stopwatch\StopwatchEvent; class WebsocketDataCollector extends DataCollector diff --git a/DependencyInjection/CompilerPass/DataCollectorCompilerPass.php b/DependencyInjection/CompilerPass/DataCollectorCompilerPass.php index 3b4fc352..1e861d9c 100644 --- a/DependencyInjection/CompilerPass/DataCollectorCompilerPass.php +++ b/DependencyInjection/CompilerPass/DataCollectorCompilerPass.php @@ -4,7 +4,6 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; class DataCollectorCompilerPass implements CompilerPassInterface @@ -14,7 +13,7 @@ class DataCollectorCompilerPass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { - if (!$container->getParameter('kernel.debug') && $container->has('debug.stopwatch')) { + if (!$container->getParameter('kernel.debug') || !$container->has('debug.stopwatch')) { return; }