Skip to content

Commit 3373f1a

Browse files
Merge branch '3.4' into 4.3
* 3.4: Re-enable previously failing PHP 7.4 test cases Revert "bug #33618 fix tests depending on other components' tests (xabbuh)" install from source to include components tests
2 parents b85a134 + 1f0970c commit 3373f1a

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
@@ -98,7 +98,7 @@ public static function collectDeprecations($outputFile)
9898
{
9999
$deprecations = [];
100100
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$previousErrorHandler) {
101-
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
101+
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) {
102102
if ($previousErrorHandler) {
103103
return $previousErrorHandler($type, $msg, $file, $line, $context);
104104
}
@@ -121,7 +121,7 @@ public static function collectDeprecations($outputFile)
121121
*/
122122
public function handleError($type, $msg, $file, $line, $context = [])
123123
{
124-
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || !$this->getConfiguration()->isEnabled()) {
124+
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) || !$this->getConfiguration()->isEnabled()) {
125125
return \call_user_func(self::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
126126
}
127127

0 commit comments

Comments
 (0)