Skip to content

Commit 1067c28

Browse files
Merge branch '3.4' into 4.4
* 3.4: [PhpUnitBridge] fix bad detection of unsilenced deprecations [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM)
2 parents 9f6cb30 + 6a4aa15 commit 1067c28

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
@@ -113,7 +113,7 @@ public static function collectDeprecations($outputFile)
113113
$filesStack[] = $frame['file'];
114114
}
115115

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

118118
return null;
119119
});
@@ -143,7 +143,7 @@ public function handleError($type, $msg, $file, $line, $context = [])
143143
$method = $deprecation->originatingMethod();
144144
$msg = $deprecation->getMessage();
145145

146-
if (0 !== error_reporting()) {
146+
if (error_reporting() & $type) {
147147
$group = 'unsilenced';
148148
} elseif ($deprecation->isLegacy()) {
149149
$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)