8000 Allow Drupal to wrap the Symfony test listener · symfony/symfony@f9bfe7f · GitHub
[go: up one dir, main page]

Skip to content

Commit f9bfe7f

Browse files
fabpotalexpott
authored andcommitted
Allow Drupal to wrap the Symfony test listener
1 parent a9c93fc commit f9bfe7f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 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,10 +60,10 @@ 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-
set_error_handler(function () {});
66-
$parsedMsg = unserialize($this->message);
67-
restore_error_handler();
63+
set_error_handler(function () {});
64+
$parsedMsg = unserialize($this->message);
65+
restore_error_handler();
66+
if ($parsedMsg && isset($parsedMsg['deprecation'])) {
6867
$this->message = $parsedMsg['deprecation'];
6968
$this->originClass = $parsedMsg['class'];
7069
$this->originMethod = $parsedMsg['method'];

0 commit comments

Comments
 (0)
0