Skip to content

Commit 91de46d

Browse files
alexpottfabpot
authored andcommitted
Allow Drupal to wrap the Symfony test listener
1 parent f03a4b3 commit 91de46d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
1313

1414
use PHPUnit\Util\Test;
15-
use Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerFor;
1615

1716
/**
1817
* @internal
@@ -61,8 +60,8 @@ public function __construct($message, array $trace, $file)
6160
$line = $trace[$i];
6261
$this->triggeringFile = $file;
6362
if (isset($line['object']) || isset($line['class'])) {
64-
if (isset($line['class']) && 0 === strpos($line['class'], SymfonyTestsListenerFor::class)) {
65-
$parsedMsg = unserialize($this->message);
63+
$parsedMsg = @unserialize($this->message);
64+
if ($parsedMsg && isset($parsedMsg['deprecation'])) {
6665
$this->message = $parsedMsg['deprecation'];
6766
$this->originClass = $parsedMsg['class'];
6867
$this->originMethod = $parsedMsg['method'];

0 commit comments

Comments
 (0)