diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php index 518a76425377e..bff2db7d87257 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php @@ -146,7 +146,7 @@ public function handleError($type, $msg, $file, $line, $context = []) $msg = $deprecation->getMessage(); - if (error_reporting() & $type) { + if (\E_DEPRECATED !== $type && (error_reporting() & $type)) { $group = 'unsilenced'; } elseif ($deprecation->isLegacy()) { $group = 'legacy';