Skip to content

Commit 5333680

Browse files
committed
Fix review points
1 parent 4365d23 commit 5333680

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ public function handleError($type, $msg, $file, $line, $context = array())
326326

327327
return $h ? $h($type, $msg, $file, $line, $context) : false;
328328
}
329+
// If the message is serialized we need to extract the message. This occurs when the error is triggered by
330+
// by the isolated test path in \Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::endTest().
331+
$parsedMsg = @unserialize($msg);
332+
if (is_array($parsedMsg)) {
333+
$msg = $parsedMsg['deprecation'];
334+
}
329335
if (error_reporting()) {
330336
$msg = 'Unsilenced deprecation: '.$msg;
331337
}

0 commit comments

Comments
 (0)