Fix review points

This commit is contained in:
Alex Pott 2017-10-18 12:32:05 +01:00
parent 4365d23e38
commit 5333680f7d

View File

@ -326,6 +326,12 @@ class SymfonyTestsListenerTrait
return $h ? $h($type, $msg, $file, $line, $context) : false;
}
// If the message is serialized we need to extract the message. This occurs when the error is triggered by
// by the isolated test path in \Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait::endTest().
$parsedMsg = @unserialize($msg);
if (is_array($parsedMsg)) {
$msg = $parsedMsg['deprecation'];
}
if (error_reporting()) {
$msg = 'Unsilenced deprecation: '.$msg;
}