Skip to content

Commit cf8d4ca

Browse files
Merge branch '5.4' into 6.2
* 5.4: fix style of label containing new lines in PUML dump [TwigBridge] Allow floats in html5 input type number field [Translation] Handle the translation of empty strings [VarDumper] Fix error when reflected class has default Enum parameter in constructor [FrameworkBundle] Fix denyAccessUnlessGranted for mixed attributes [Validator] Fix translation of AtLeastOneOf constraint message [Validator] Sync IBAN formats with Swift IBAN registry [String] Use same alphabet for ByteString::fromRandom tests Fix phpdocs in components
2 parents cd85cc7 + 6c5ac3a commit cf8d4ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Caster/Caster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static function castObject(object $obj, string $class, bool $hasDebugInfo
115115
* @param array $a The array containing the properties to filter
116116
* @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out
117117
* @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set
118-
* @param int &$count Set to the number of removed properties
118+
* @param int|null &$count Set to the number of removed properties
119119
*/
120120
public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array
121121
{

Caster/ReflectionCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
292292
if ($c->isOptional()) {
293293
try {
294294
$a[$prefix.'default'] = $v = $c->getDefaultValue();
295-
if ($c->isDefaultValueConstant()) {
295+
if ($c->isDefaultValueConstant() && !\is_object($v)) {
296296
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
297297
}
298298
if (null === $v) {

0 commit comments

Comments
 (0)