diff --git a/src/Symfony/Bundle/SecurityBundle/Debug/TraceableListenerTrait.php b/src/Symfony/Bundle/SecurityBundle/Debug/TraceableListenerTrait.php index 7b65d86b75..b758be6242 100644 --- a/src/Symfony/Bundle/SecurityBundle/Debug/TraceableListenerTrait.php +++ b/src/Symfony/Bundle/SecurityBundle/Debug/TraceableListenerTrait.php @@ -12,6 +12,7 @@ namespace Symfony\Bundle\SecurityBundle\Debug; use Symfony\Component\Security\Http\Firewall\LegacyListenerTrait; +use Symfony\Component\VarDumper\Caster\ClassStub; /** * @author Robin Chalas @@ -39,4 +40,13 @@ trait TraceableListenerTrait { return $this->listener; } + + public function getInfo(): array + { + return [ + 'response' => $this->response, + 'time' => $this->time, + 'stub' => $this->stub ?? $this->stub = ClassStub::wrapCallable($this->listener), + ]; + } } diff --git a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php index 649a4065ef..eca63b4d4a 100644 --- a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php +++ b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedLazyListener.php @@ -16,7 +16,6 @@ use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\Security\Core\Exception\LazyResponseException; use Symfony\Component\Security\Http\Firewall\AbstractListener; use Symfony\Component\Security\Http\Firewall\ListenerInterface; -use Symfony\Component\VarDumper\Caster\ClassStub; /** * Wraps a lazy security listener. @@ -60,13 +59,4 @@ final class WrappedLazyListener extends AbstractListener implements ListenerInte return $ret; } - - public function getInfo(): array - { - return [ - 'response' => $this->response, - 'time' => $this->time, - 'stub' => $this->stub ?? $this->stub = ClassStub::wrapCallable($this->listener), - ]; - } } diff --git a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedListener.php b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedListener.php index e7728f2fae..7f92164976 100644 --- a/src/Symfony/Bundle/SecurityBundle/Debug/WrappedListener.php +++ b/src/Symfony/Bundle/SecurityBundle/Debug/WrappedListener.php @@ -13,7 +13,6 @@ namespace Symfony\Bundle\SecurityBundle\Debug; use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\Security\Http\Firewall\ListenerInterface; -use Symfony\Component\VarDumper\Caster\ClassStub; /** * Wraps a security listener for calls record. @@ -49,13 +48,4 @@ final class WrappedListener implements ListenerInterface $this->time = microtime(true) - $startTime; $this->response = $event->getResponse(); } - - public function getInfo(): array - { - return [ - 'response' => $this->response, - 'time' => $this->time, - 'stub' => $this->stub ?? $this->stub = ClassStub::wrapCallable($this->listener), - ]; - } }