Skip to content

Commit 202c32d

Browse files
Merge branch '4.4'
* 4.4: Re-enable previously failing PHP 7.4 test cases [PhpUnitBridge] fix uninitialized variable [ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631 [Twig] Add missing check Revert "bug #33618 fix tests depending on other components' tests (xabbuh)" install from source to include components tests Fix undefined constant and other minor issues [Twig] Add NotificationEmail ensure compatibility with type resolver 0.5 Call AssertEquals with proper parameters [DependencyInjection] Allow binding iterable and tagged services [Twig] Fix Twig config extra keys fix tests depending on other components' tests Fix lint commands frozen on empty stdin
2 parents d7b5f4c + 04bfd33 commit 202c32d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

DeprecationErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static function collectDeprecations($outputFile)
9191
{
9292
$deprecations = [];
9393
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$previousErrorHandler) {
94-
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
94+
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) {
9595
if ($previousErrorHandler) {
9696
return $previousErrorHandler($type, $msg, $file, $line, $context);
9797
}
@@ -114,7 +114,7 @@ public static function collectDeprecations($outputFile)
114114
*/
115115
public function handleError($type, $msg, $file, $line, $context = [])
116116
{
117-
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || !$this->getConfiguration()->isEnabled()) {
117+
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) || !$this->getConfiguration()->isEnabled()) {
118118
return \call_user_func(self::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
119119
}
120120

DeprecationErrorHandler/Deprecation.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,15 @@ class Deprecation
5353
*/
5454
private $triggeringFile;
5555

56-
/** @var string[] absolute paths to vendor directories */
56+
/** @var string[] Absolute paths to vendor directories */
5757
private static $vendors;
5858

5959
/**
60-
* @var string[] absolute paths to source or tests of the project. This
61-
* excludes cache directories, because it is based on
62-
* autoloading rules and cache systems typically do not use
63-
* those.
60+
* @var string[] Absolute paths to source or tests of the project, cache
61+
* directories exlcuded because it is based on autoloading
62+
* rules and cache systems typically do not use those
6463
*/
65-
private static $internalPaths;
64+
private static $internalPaths = [];
6665

6766
/**
6867
* @param string $message

0 commit comments

Comments
 (0)