diff --git a/src/Type/BenevolentUnionType.php b/src/Type/BenevolentUnionType.php index dc1245ad45..bb4a47761b 100644 --- a/src/Type/BenevolentUnionType.php +++ b/src/Type/BenevolentUnionType.php @@ -14,9 +14,9 @@ class BenevolentUnionType extends UnionType * @api * @param Type[] $types */ - public function __construct(array $types) + public function __construct(array $types, bool $normalized = false) { - parent::__construct($types); + parent::__construct($types, $normalized); } public function describe(VerbosityLevel $level): string diff --git a/src/Type/TypeCombinator.php b/src/Type/TypeCombinator.php index 745c1c2527..1db0ce23a2 100644 --- a/src/Type/TypeCombinator.php +++ b/src/Type/TypeCombinator.php @@ -363,7 +363,7 @@ public static function union(Type ...$types): Type return $benevolentUnionObject->withTypes($types); } - return new BenevolentUnionType($types); + return new BenevolentUnionType($types, true); } }