8000 Merge branch '4.3' into 4.4 · hultberg/symfony@ed5527b · GitHub
[go: up one dir, main page]

Skip to content

Commit ed5527b

Browse files
Merge branch '4.3' into 4.4
* 4.3: 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 [Router] Fix TraceableUrlMatcher behaviour with trailing slash Revert "bug symfony#33092 [DependencyInjection] Improve an exception message (fabpot)"
2 parents 9b5b1b9 + 606c0a9 commit ed5527b

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ private function validateAndDenormalize(string $currentClass, string $attribute,
399399
$expectedTypes = [];
400400
foreach ($types as $type) {
401401
if (null === $data && $type->isNullable()) {
402-
return;
402+
return null;
403403
}
404404

405405
if ($type->isCollection() && null !== ($collectionValueType = $type->getCollectionValueType()) && Type::BUILTIN_TYPE_OBJECT === $collectionValueType->getBuiltinType()) {

Normalizer/GetSetMethodNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ protected function getAttributeValue($object, $attribute, $format = null, array
139139
if (\is_callable([$object, $haser])) {
140140
return $object->$haser();
141141
}
142+
143+
return null;
142144
}
143145

144146
/**

Normalizer/PropertyNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function getAttributeValue($object, $attribute, $format = null, array
123123
try {
124124
$reflectionProperty = $this->getReflectionProperty($object, $attribute);
125125
} catch (\ReflectionException $reflectionException) {
126-
return;
126+
return null;
127127
}
128128

129129
// Override visibility

Tests/Normalizer/AbstractObjectNormalizerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ public function denormalize($data, $type, $format = null, array $context = [])
309309
return $normalizer->denormalize($data, $type, $format, $context);
310310
}
311311
}
312+
313+
return null;
312314
}
313315

314316
public function supportsDenormalization($data, $type, $format = null)

0 commit comments

Comments
 (0)
0