diff --git a/src/Symfony/Bundle/DebugBundle/DebugBundle.php b/src/Symfony/Bundle/DebugBundle/DebugBundle.php index 3aa536dba7..335ec5abd2 100644 --- a/src/Symfony/Bundle/DebugBundle/DebugBundle.php +++ b/src/Symfony/Bundle/DebugBundle/DebugBundle.php @@ -30,7 +30,7 @@ class DebugBundle extends Bundle // configuration for CLI mode is overridden in HTTP mode on // 'kernel.request' event VarDumper::setHandler(function ($var) use ($container) { - $dumper = $container->get('var_dumper.cli_dumper'); + $dumper = $container->get('data_collector.dump'); $cloner = $container->get('var_dumper.cloner'); $handler = function ($var) use ($dumper, $cloner) { $dumper->dump($cloner->cloneVar($var)); diff --git a/src/Symfony/Bundle/DebugBundle/Resources/config/services.xml b/src/Symfony/Bundle/DebugBundle/Resources/config/services.xml index 16e27a22c5..37b7af91a0 100644 --- a/src/Symfony/Bundle/DebugBundle/Resources/config/services.xml +++ b/src/Symfony/Bundle/DebugBundle/Resources/config/services.xml @@ -22,7 +22,7 @@ - + diff --git a/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php b/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php index 2f302f450f..06b8a030cf 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/DumpListener.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\VarDumper\Cloner\ClonerInterface; use Symfony\Component\VarDumper\Dumper\DataDumperInterface; use Symfony\Component\VarDumper\VarDumper; @@ -50,6 +50,6 @@ class DumpListener implements EventSubscriberInterface public static function getSubscribedEvents() { // Register early to have a working dump() as early as possible - return array(KernelEvents::REQUEST => array('configure', 1024)); + return array(ConsoleEvents::COMMAND => array('configure', 1024)); } } diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php index 9bbdadedcf..c475bbfff3 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; +use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\HttpKernel\EventListener\DumpListener; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\VarDumper\Cloner\ClonerInterface; use Symfony\Component\VarDumper\Cloner\Data; use Symfony\Component\VarDumper\Dumper\DataDumperInterface; @@ -28,7 +28,7 @@ class DumpListenerTest extends \PHPUnit_Framework_TestCase public function testSubscribedEvents() { $this->assertSame( - array(KernelEvents::REQUEST => array('configure', 1024)), + array(ConsoleEvents::COMMAND => array('configure', 1024)), DumpListener::getSubscribedEvents() ); }