You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixesphpDocumentor#163.
FixesphpDocumentor/phpDocumentor#3290.
Shorthand nullable type syntax is now supported for collection types
(e.g. `?array<int>`).
This also prevents a misuse of the shorthand nullable type syntax with
compound types, which is illegal with PHP types. This is documented in
the Union Types 2.0 RFC (https://wiki.php.net/rfc/union_types_v2) by
N. Popov:
> Union types and the ?T nullable type notation cannot be mixed.
> Writing ?T1|T2, T1|?T2 or ?(T1|T2) is not supported and T1|T2|null
> needs to be used instead.
The following code throws
?array is not a collection
:The text was updated successfully, but these errors were encountered: