Skip to content

Conversation

@aazsamir
Copy link
Contributor

This pull request adds support for union types along with partially-understanding types defined in docblock.

class StoreRequest {
    /** @var string|string[] */
    public string|array $tags;
}

mixed type is also supported

class StoreRequest {
    /** @var string|mixed[] */
    public string|array $tags;
}

This means that it is now also supported.

class StoreRequest {
    /** $var string[] */
    public array $tags;
}

There are still a few edge cases to resolve, but I would say this is MVP.

@aazsamir aazsamir force-pushed the feat/mapper-unions-support branch from 3eb8af3 to 588df27 Compare November 18, 2025 20:59
@innocenzi innocenzi changed the title feat(mapper): support unions feat(mapper): support union types in docblocks Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant