Skip to content

Commit e0443f3

Browse files
Merge branch '3.1'
* 3.1: [ClassLoader] Fix tests [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes [DependencyInjection] PhpDumper::isFrozen inconsistency [DI] Cleanup array_key_exists include dynamic services in list of alternatives [Debug] Swap dumper services at bootstrap
2 parents b3352a0 + fe755df commit e0443f3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

DataCollector/Util/ValueExporter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class ValueExporter
2727
*/
2828
public function exportValue($value, $depth = 1, $deep = false)
2929
{
30+
if ($value instanceof \__PHP_Incomplete_Class) {
31+
return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($value));
32+
}
33+
3034
if (is_object($value)) {
3135
if ($value instanceof \DateTimeInterface) {
3236
return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ISO8601));
@@ -35,10 +39,6 @@ public function exportValue($value, $depth = 1, $deep = false)
3539
return sprintf('Object(%s)', get_class($value));
3640
}
3741

38-
if ($value instanceof \__PHP_Incomplete_Class) {
39-
return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($value));
40-
}
41-
4242
if (is_array($value)) {
4343
if (empty($value)) {
4444
return '[]';

EventListener/DumpListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Component\HttpKernel\EventListener;
1313

14+
use Symfony\Component\Console\ConsoleEvents;
1415
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15-
use Symfony\Component\HttpKernel\KernelEvents;
1616
use Symfony\Component\VarDumper\Cloner\ClonerInterface;
1717
use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
1818
use Symfony\Component\VarDumper\VarDumper;
@@ -50,6 +50,6 @@ public function configure()
5050
public static function getSubscribedEvents()
5151
{
5252
// Register early to have a working dump() as early as possible
53-
return array(KernelEvents::REQUEST => array('configure', 1024));
53+
return array(ConsoleEvents::COMMAND => array('configure', 1024));
5454
}
5555
}

Tests/EventListener/DumpListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
namespace Symfony\Component\HttpKernel\Tests\EventListener;
1313

14+
use Symfony\Component\Console\ConsoleEvents;
1415
use Symfony\Component\HttpKernel\EventListener\DumpListener;
15-
use Symfony\Component\HttpKernel\KernelEvents;
1616
use Symfony\Component\VarDumper\Cloner\ClonerInterface;
1717
use Symfony\Component\VarDumper\Cloner\Data;
1818
use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
@@ -28,7 +28,7 @@ class DumpListenerTest extends \PHPUnit_Framework_TestCase
2828
public function testSubscribedEvents()
2929
{
3030
$this->assertSame(
31-
array(KernelEvents::REQUEST => array('configure', 1024)),
31+
array(ConsoleEvents::COMMAND => array('configure', 1024)),
3232
DumpListener::getSubscribedEvents()
3333
);
3434
}

0 commit comments

Comments
 (0)