-
Notifications
You must be signed in to change notification settings - Fork 103
Support native union return typing #467
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
Conversation
@@ -77,6 +101,10 @@ private function dummy() { | |||
|
|||
} | |||
|
|||
private function objectUnion(): TestObject|TestObject2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also tried null|TestObject|TestObject2
but that failed, not sure if the library needs to support that
Codecov Report
@@ Coverage Diff @@
## master #467 +/- ##
============================================
- Coverage 96.36% 96.33% -0.04%
- Complexity 1631 1638 +7
============================================
Files 146 146
Lines 4100 4115 +15
============================================
+ Hits 3951 3964 +13
- Misses 149 151 +2
Continue to review full report at Codecov.
|
@oojacoboo Any idea how to fix the test for php 7.4 |
@aszenz PHP didn't support union types until 8.0. The parser for 7.4 doesn't understand the syntax. Make sure the tests are only running for 8.0. You can look at how Tests are run through |
Done 👍 |
@aszenz awesome thanks and for the PR! |
Fixes #462