Skip to content

Commit 04bfd33

Browse files
Merge branch '4.3' into 4.4
* 4.3: Re-enable previously failing PHP 7.4 test cases [PhpUnitBridge] fix uninitialized variable Revert "bug #33618 fix tests depending on other components' tests (xabbuh)" install from source to include components tests
2 parents 33ac60e + 3373f1a commit 04bfd33

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
@@ -96,7 +96,7 @@ public static function collectDeprecations($outputFile)
9696
{
9797
$deprecations = [];
9898
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$deprecations, &$previousErrorHandler) {
99-
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
99+
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) {
100100
if ($previousErrorHandler) {
101101
return $previousErrorHandler($type, $msg, $file, $line, $context);
102102
}
@@ -119,7 +119,7 @@ public static function collectDeprecations($outputFile)
119119
*/
120120
public function handleError($type, $msg, $file, $line, $context = [])
121121
{
122-
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || !$this->getConfiguration()->isEnabled()) {
122+
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break')) || !$this->getConfiguration()->isEnabled()) {
123123
return \call_user_func(self::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
124124
}
125125

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)