Skip to content

Commit 322da9d

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 c12e9f9 + 225bf41 commit 322da9d

File tree

119 files changed

+437
-213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+437
-213
lines changed

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ public function guessRequired(string $class, string $property)
127127

128128
return new ValueGuess(!$mapping['joinColumns'][0]['nullable'], Guess::HIGH_CONFIDENCE);
129129
}
130+
131+
return null;
130132
}
131133

132134
/**
@@ -146,6 +148,8 @@ public function guessMaxLength(string $class, string $property)
146148
return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE);
147149
}
148150
}
151+
152+
return null;
149153
}
150154

151155
/**
@@ -159,6 +163,8 @@ public function guessPattern(string $class, string $property)
159163
return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE);
160164
}
161165
}
166+
167+
return null;
162168
}
163169

164170
protected function getMetadata(string $class)
@@ -180,6 +186,8 @@ protected function getMetadata(string $class)
180186
// not an entity or mapped super class, using Doctrine ORM 2.2
181187
}
182188
}
189+
190+
return null;
183191
}
184192

185193
private static function getRealClass(string $class): string

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ public function configureOptions(OptionsResolver $resolver)
156156

157157
return $doctrineChoiceLoader;
158158
}
159+
160+
return null;
159161
};
160162

161163
$choiceName = function (Options $options) {
@@ -167,6 +169,7 @@ public function configureOptions(OptionsResolver $resolver)
167169
}
168170

169171
// Otherwise, an incrementing integer is used as name automatically
172+
return null;
170173
};
171174

172175
// The choices are always indexed by ID (see "choices" normalizer
@@ -180,6 +183,7 @@ public function configureOptions(OptionsResolver $resolver)
180183
}
181184

182185
// Otherwise, an incrementing integer is used as value automatically
186+
return null;
183187
};
184188

185189
$emNormalizer = function (Options $options, $em) {

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ public function getTypes(string $class, string $property, array $context = [])
157157
return $builtinType ? [new Type($builtinType, $nullable)] : null;
158158
}
159159
}
160+
161+
return null;
160162
}
161163

162164
/**

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/Fixtures/DoctrineFooType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $pla
5151
public function convertToDatabaseValue($value, AbstractPlatform $platform)
5252
{
5353
if (null === $value) {
54-
return;
54+
return null;
5555
}
5656
if (!$value instanceof Foo) {
5757
throw new ConversionException(sprintf('Expected %s, got %s', 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\Foo', \gettype($value)));
@@ -66,7 +66,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform)
6666
public function convertToPHPValue($value, AbstractPlatform $platform)
6767
{
6868
if (null === $value) {
69-
return;
69+
return null;
7070
}
7171
if (!\is_string($value)) {
7272
throw ConversionException::conversionFailed($value, self::NAME);

src/Symfony/Bridge/PhpUnit/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)

src/Symfony/Bridge/PhpUnit/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
/**

src/Symfony/Bridge/PhpUnit/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

src/Symfony/Bridge/PhpUnit/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()

src/Symfony/Bridge/PhpUnit/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
/**

src/Symfony/Bridge/PhpUnit/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)