Skip to content

Commit 1f0970c

Browse files
Re-enable previously failing PHP 7.4 test cases
1 parent 37a1e99 commit 1f0970c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DeprecationErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static function register($mode = 0)
109109
'remaining vendor' => array(),
110110
);
111111
$deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
112-
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
112+
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
113113
return \call_user_func(DeprecationErrorHandler::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
114114
}
115115

@@ -285,7 +285,7 @@ public static function collectDeprecations($outputFile)
285285
{
286286
$deprecations = array();
287287
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, &$previousErrorHandler) {
288-
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
288+
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) {
289289
if ($previousErrorHandler) {
290290
return $previousErrorHandler($type, $msg, $file, $line, $context);
291291
}

0 commit comments

Comments
 (0)