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
Fix native type on unset #2107
Fix native type on unset #2107
Conversation
This pull request has been marked as ready for review. |
Thank you, don't worry about it |
Regression test please |
use function PHPStan\Testing\assertType; | ||
use function PHPStan\Testing\assertNativeType; |
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.
@ondrejmirtes wdyt about adding a rule/check which verifies that tests included by TypeInferenceTestCase
contain proper full-qualified method calls or imports when assertType
or assertNativeType
is contained?
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.
@staabm We can make TypeInferenceTestCase
crash on the supported functions with correct names but without (or with a wrong) namespace :)
Two fixes
I'm sorry that I didn't add enough tests when adding these native type changes...
proof of wrong native type on unset
https://phpstan.org/r/85d3f157-6989-4e60-90f3-9aa7a90546ee