[VarDumper] show proxified class on hover
This commit is contained in:
parent
83232f85ff
commit
955494c37d
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Symfony\Component\VarDumper\Caster;
|
||||||
|
|
||||||
|
use ProxyManager\Proxy\ProxyInterface;
|
||||||
|
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Nicolas Grekas <p@tchwork.com>
|
||||||
|
*/
|
||||||
|
class ProxyManagerCaster
|
||||||
|
{
|
||||||
|
public static function castProxy(ProxyInterface $c, array $a, Stub $stub, $isNested)
|
||||||
|
{
|
||||||
|
if ($parent = \get_parent_class($c)) {
|
||||||
|
$stub->class .= ' - '.$parent;
|
||||||
|
}
|
||||||
|
$stub->class .= '@proxy';
|
||||||
|
|
||||||
|
return $a;
|
||||||
|
}
|
||||||
|
}
|
@ -81,6 +81,7 @@ abstract class AbstractCloner implements ClonerInterface
|
|||||||
'Symfony\Component\VarDumper\Caster\FrameStub' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'),
|
'Symfony\Component\VarDumper\Caster\FrameStub' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'),
|
||||||
'Symfony\Component\Debug\Exception\SilencedErrorContext' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'),
|
'Symfony\Component\Debug\Exception\SilencedErrorContext' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'),
|
||||||
|
|
||||||
|
'ProxyManager\Proxy\ProxyInterface' => array('Symfony\Component\VarDumper\Caster\ProxyManagerCaster', 'castProxy'),
|
||||||
'PHPUnit_Framework_MockObject_MockObject' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'),
|
'PHPUnit_Framework_MockObject_MockObject' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'),
|
||||||
'Prophecy\Prophecy\ProphecySubjectInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'),
|
'Prophecy\Prophecy\ProphecySubjectInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'),
|
||||||
'Mockery\MockInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'),
|
'Mockery\MockInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'),
|
||||||
|
Reference in New Issue
Block a user