diff --git a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php index 8605a2fb4e..773effb445 100644 --- a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -84,7 +84,7 @@ class ReflectionCaster $prefix = Caster::PREFIX_VIRTUAL; $a += array( - $prefix.'type' => $c->__toString(), + $prefix.'name' => method_exists('ReflectionType', 'getName') ? $c->getName() : $c->__toString(), $prefix.'allowsNull' => $c->allowsNull(), $prefix.'isBuiltin' => $c->isBuiltin(), );