-
-
Notifications
You must be signed in to change notification settings - Fork 934
Add benevolentUnionTypes #8234
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 benevolentUnionTypes #8234
Conversation
website/src/config-reference.md
Outdated
|
|
||
| **default**: `false` | ||
|
|
||
| PHPStan has defined some benevolent union types. Those unions are not checked by the `checkUnionTypes` option enabled on level 7: |
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.
does the documentation mention anywhere what a "benevolent union type" actually is? if so it would be great to link to it here.
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.
you should always prefer active voice when writing documentation:
https://www.grammarly.com/blog/active-vs-passive-voice/
| PHPStan has defined some benevolent union types. Those unions are not checked by the `checkUnionTypes` option enabled on level 7: | |
| PHPStan defines some benevolent union types, such as `array-key`. Benevolent unions are ignored by the `checkUnionTypes` option enabled on level 7: |
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.
does the documentation mention anywhere what a "benevolent union type" actually is? if so it would be great to link to it here.
There is none
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.
this is one of the big open mysteries :D the best we have so far is this #6440
I think it's a bit hard to understand and get and therefore mostly an internal thing to avoid annoyances
but, yeah, with this documentation it's not so internal anymore I guess :) so maybe somebody can describe them somehow
|
Thank you. |
No description provided.