File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -797,7 +797,7 @@ public function walkSelectExpression($selectExpression): string
797
797
798
798
$ type = $ this ->resolveDoctrineType ($ typeName , $ enumType , $ nullable );
799
799
800
- $ this ->typeBuilder -> addScalar ($ resultAlias , $ type );
800
+ $ this ->addScalar ($ resultAlias , $ type );
801
801
802
802
return '' ;
803
803
}
@@ -857,7 +857,7 @@ public function walkSelectExpression($selectExpression): string
857
857
});
858
858
}
859
859
860
- $ this ->typeBuilder -> addScalar ($ resultAlias , $ type );
860
+ $ this ->addScalar ($ resultAlias , $ type );
861
861
862
862
return '' ;
863
863
}
@@ -1298,6 +1298,18 @@ public function walkResultVariable($resultVariable): string
1298
1298
return $ this ->marshalType (new MixedType ());
1299
1299
}
1300
1300
1301
+ /**
1302
+ * @param array-key $alias
1303
+ */
1304
+ private function addScalar ($ alias , Type $ type ): void
1305
+ {
1306
+ if ($ type instanceof UnionType) {
1307
+ $ type = TypeUtils::toBenevolentUnion ($ type );
1308
+ }
1309
+
1310
+ $ this ->typeBuilder ->addScalar ($ alias , $ type );
1311
+ }
1312
+
1301
1313
private function unmarshalType (string $ marshalledType ): Type
1302
1314
{
1303
1315
$ type = unserialize ($ marshalledType );
You can’t perform that action at this time.
0 commit comments