Skip to content

Commit c014fdf

Browse files
Merge branch '4.4'
* 4.4: cs fix Fix inconsistent return points. [Config] Add handling for ignored keys in ArrayNode::mergeValues. Fix inconsistent return points. [Security/Core] UserInterface::getPassword() can return null cs fix cs fix Fix missing exporter in PHPUnit constraint poylfill added `Process::getLastOutputTime()` method [Router] Fix TraceableUrlMatcher behaviour with trailing slash [HttpKernel] Remove outdated docblock comment Fix handling for session parameters Revert "bug #33092 [DependencyInjection] Improve an exception message (fabpot)"
2 parents e03db6c + af017e6 commit c014fdf

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

ClockMock.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public static function withClockMock($enable = null)
2626
}
2727

2828
self::$now = is_numeric($enable) ? (float) $enable : ($enable ? microtime(true) : null);
29+
30+
return null;
2931
}
3032

3133
public static function time()
@@ -55,6 +57,8 @@ public static function usleep($us)
5557
}
5658

5759
self::$now += $us / 1000000;
60+
61+
return null;
5862
}
5963

6064
public static function microtime($asFloat = false)

DeprecationErrorHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ public static function collectDeprecations($outputFile)
9999
}
100100

101101
$deprecations[] = [error_reporting(), $msg, $file];
102+
103+
return null;
102104
});
103105

104106
register_shutdown_function(function () use ($outputFile, &$deprecations) {
@@ -117,7 +119,7 @@ public function handleError($type, $msg, $file, $line, $context = [])
117119

118120
$deprecation = new Deprecation($msg, debug_backtrace(), $file);
119121
if ($deprecation->isMuted()) {
120-
return;
122+
return null;
121123
}
122124
$group = 'other';
123125

@@ -156,6 +158,8 @@ public function handleError($type, $msg, $file, $line, $context = [])
156158
}
157159

158160
++$this->deprecations[$group.'Count'];
161+
162+
return null;
159163
}
160164

161165
/**

Legacy/ConstraintTraitForV6.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ protected function additionalFailureDescription($other)
4949
*/
5050
protected function exporter()
5151
{
52+
if (null === $this->exporter) {
53+
$this->exporter = new Exporter();
54+
}
55+
5256
return $this->exporter;
5357
}
5458

Legacy/CoverageListenerTrait.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,7 @@ private function findSutFqcn($test)
9191
$sutFqcn = str_replace('\\Tests\\', '\\', $class);
9292
$sutFqcn = preg_replace('{Test$}', '', $sutFqcn);
9393

94-
if (!class_exists($sutFqcn)) {
95-
return;
96-
}
97-
98-
return $sutFqcn;
94+
return class_exists($sutFqcn) ? $sutFqcn : null;
9995
}
10096

10197
public function __sleep()

Legacy/SymfonyTestsListenerTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ public function handleError($type, $msg, $file, $line, $context = array())
320320
$msg = 'Unsilenced deprecation: '.$msg;
321321
}
322322
$this->gatheredDeprecations[] = $msg;
323+
324+
return null;
323325
}
324326

325327
/**

bin/simple-phpunit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class SymfonyBlacklistPhpunit {}
187187
$argc = isset($_SERVER['argc']) ? $_SERVER['argc'] : 0;
188188

189189
if ($PHPUNIT_VERSION < 8.0) {
190-
$argv = array_filter($argv, function ($v) use (&$argc) { if ('--do-not-cache-result' !== $v) return true; --$argc; });
190+
$argv = array_filter($argv, function ($v) use (&$argc) { if ('--do-not-cache-result' !== $v) return true; --$argc; return false; });
191191
} elseif (filter_var(getenv('SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE'), FILTER_VALIDATE_BOOLEAN)) {
192192
$argv[] = '--do-not-cache-result';
193193
++$argc;

0 commit comments

Comments
 (0)