Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for union and intersection types #644

Merged
merged 2 commits into from
Feb 8, 2022
Merged

Conversation

veewee
Copy link
Contributor

@veewee veewee commented Feb 8, 2022

Fixes #643

Copy link
Member

@theofidry theofidry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! I'm really be happy if that's the only change necessary for adding union support 😄

specs/union.php Outdated Show resolved Hide resolved
specs/union.php Outdated Show resolved Hide resolved
@veewee
Copy link
Contributor Author

veewee commented Feb 8, 2022

Thanks a lot! I'm really be happy if that's the only change necessary for adding union support 😄

Yeah me too! Looks like the system is set up in a very flexible way. Good job!
I also took the liberty of adding support for intersection types. Or would you rather have a separate PR for that once this one is done?

We already created a version of grumphp that uses the union types with box, that seems to work ok.

@veewee veewee changed the title Add support for union types Add support for union and intersection types Feb 8, 2022
@theofidry theofidry merged commit be20ef1 into humbug:master Feb 8, 2022
@theofidry
Copy link
Member

Thank you @veewee

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.

Scoper is not able to scope union return types
2 participants