Skip to content

Commit 3ef188d

Browse files
Merge branch '6.4' into 7.2
* 6.4: Fix typo [VarExporter] Dump implicit-nullable types as explicit to prevent the corresponding deprecation [Serializer] Fix readonly property initialization from incorrect scope Update BrevoRequestParser.php
2 parents 785cff5 + 0efdbc8 commit 3ef188d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ProxyHelper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,9 @@ public static function exportType(\ReflectionFunctionAbstract|\ReflectionPropert
477477
return '';
478478
}
479479
if (null === $glue) {
480-
return (!$noBuiltin && $type->allowsNull() && !\in_array($name, ['mixed', 'null'], true) ? '?' : '').$types[0];
480+
$defaultNull = $owner instanceof \ReflectionParameter && 'NULL' === rtrim(substr(explode('$'.$owner->name.' = ', (string) $owner, 2)[1] ?? '', 0, -2));
481+
482+
return (!$noBuiltin && ($type->allowsNull() || $defaultNull) && !\in_array($name, ['mixed', 'null'], true) ? '?' : '').$types[0];
481483
}
482484
sort($types);
483485

0 commit comments

Comments
 (0)