From 1ba06a0f86051f8bad2f19efc394da99a90cd775 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Fri, 2 Oct 2020 14:43:26 +0200 Subject: [PATCH] [PhpUnitBridge] Fix Deprecation file when it comes from the TestsListener --- .../Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php index 54d7b216c2..797ed145bb 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\PhpUnit\DeprecationErrorHandler; use PHPUnit\Util\Test; +use Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerFor; /** * @internal @@ -83,6 +84,11 @@ class Deprecation return; } + + if (isset($line['class']) && 0 === strpos($line['class'], SymfonyTestsListenerFor::class)) { + return; + } + $this->originClass = isset($line['object']) ? \get_class($line['object']) : $line['class']; $this->originMethod = $line['function']; }