Skip to content

Commit 2c72669

Browse files
Merge branch '5.0' into 5.1
* 5.0: [PhpUnitBridge] fix bad detection of unsilenced deprecations [Security] Unserialize $parentData, if needed, to avoid errors [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM)
2 parents 9599e14 + 0e67fb7 commit 2c72669

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

DeprecationErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static function collectDeprecations($outputFile)
105105
$filesStack[] = $frame['file'];
106106
}
107107

108-
$deprecations[] = [error_reporting(), $msg, $file, $filesStack];
108+
$deprecations[] = [error_reporting() & $type, $msg, $file, $filesStack];
109109

110110
return null;
111111
});
@@ -135,7 +135,7 @@ public function handleError($type, $msg, $file, $line, $context = [])
135135
$method = $deprecation->originatingMethod();
136136
$msg = $deprecation->getMessage();
137137

138-
if (0 !== error_reporting()) {
138+
if (error_reporting() & $type) {
139139
$group = 'unsilenced';
140140
} elseif ($deprecation->isLegacy()) {
141141
$group = 'legacy';

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public static function handleError($type, $msg, $file, $line, $context = [])
320320
if (\is_array($parsedMsg)) {
321321
$msg = $parsedMsg['deprecation'];
322322
}
323-
if (error_reporting()) {
323+
if (error_reporting() & $type) {
324324
$msg = 'Unsilenced deprecation: '.$msg;
325325
}
326326
self::$gatheredDeprecations[] = $msg;

0 commit comments

Comments
 (0)