-
Notifications
You must be signed in to change notification settings - Fork 439
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 int-range return type for range() #2792
Conversation
You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x. |
2d2e840
to
d61600c
Compare
out of curiosity - is there a way to eliminate the delay before the test runs? or to filter a specific test case (the |
@dantleech When I want to debug something NodeScopeResolverTest, I just run PHPStan on that file. Both TypeInferenceTestCase run through PHPUnit, and PHPStan analysis itself, will report discrepancies in |
makes sense! thanks |
d61600c
to
e738d22
Compare
This pull request has been marked as ready for review. |
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.
Sorry for a late review.
- Look at the issue bot: https://github.com/phpstan/phpstan-src/actions/runs/7020506328 This also fixes Regarding the analysis of the return value of range() phpstan#9573 so please write a regression test.
- Please test different ranges passed into the
range
function. For example forint<5, 10>
andint<5, 8>
, the resulting range isint<5, 8>
I think? Please come up with more test cases to make sure the math is correct.
Thank you.
22e10aa
to
567ec63
Compare
567ec63
to
f7b89d4
Compare
Updated! |
Thank you. |
Fixes the return type of
range
when passedIntegerRange
Fixes phpstan/phpstan#10213