Skip to content

Commit 0e67fb7

Browse files
Merge branch '4.4' into 5.0
* 4.4: [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 84e7017 + 1067c28 commit 0e67fb7

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
@@ -108,7 +108,7 @@ public static function collectDeprecations($outputFile)
108108
$filesStack[] = $frame['file'];
109109
}
110110

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

113113
return null;
114114
});
@@ -138,7 +138,7 @@ public function handleError($type, $msg, $file, $line, $context = [])
138138
$method = $deprecation->originatingMethod();
139139
$msg = $deprecation->getMessage();
140140

141-
if (0 !== error_reporting()) {
141+
if (error_reporting() & $type) {
142142
$group = 'unsilenced';
143143
} elseif ($deprecation->isLegacy()) {
144144
$group = 'legacy';

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public function handleError($type, $msg, $file, $line, $context = [])
310310
if (\is_array($parsedMsg)) {
311311
$msg = $parsedMsg['deprecation'];
312312
}
313-
if (error_reporting()) {
313+
if (error_reporting() & $type) {
314314
$msg = 'Unsilenced deprecation: '.$msg;
315315
}
316316
$this->gatheredDeprecations[] = $msg;

0 commit comments

Comments
 (0)