Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[VarDumper] Support for intersection types#42099
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
derrabus commentedJul 14, 2021
| Q | A |
|---|---|
| Branch? | 4.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | #41552 |
| License | MIT |
| Doc PR | N/A |
71f5490 tobbe8260CompareSigned-off-by: Alexander M. Turek <me@derrabus.de>
bbe8260 to3cf1057Compare| types: array:2 [ | ||
| 0 => ReflectionNamedType { | ||
| name: "Traversable" | ||
| allowsNull: false | ||
| isBuiltin: false | ||
| } | ||
| 1 => ReflectionNamedType { | ||
| name: "Countable" | ||
| allowsNull: false | ||
| isBuiltin: false | ||
| } | ||
| ] |
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've decided to match the generated output forReflectionUnionType here. This is a bit verbose though because the sub-types of an intersection are guaranteed to be aReflectionNamedType with$allowsNull === false and$isBuiltin === false.
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.
Actually, nullable intersection types are possible, seehttps://3v4l.org/aURFN/rfc#vgit.master
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.
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.
Oh well. It's not like I haven't told them. 🤷🏻php/php-src#6799 (comment)
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.
The loophole was closed.php/php-src#7254
nicolas-grekas commentedJul 15, 2021
Thank you@derrabus. |