Fix int-range return type for range()#2792
Merged
ondrejmirtes merged 5 commits intophpstan:1.10.xfrom Jan 6, 2024
Merged
Conversation
Collaborator
|
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
Contributor
Author
|
out of curiosity - is there a way to eliminate the delay before the test runs? or to filter a specific test case (the |
Member
|
@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 |
Contributor
Author
|
makes sense! thanks |
d61600c to
e738d22
Compare
Collaborator
|
This pull request has been marked as ready for review. |
staabm
reviewed
Nov 29, 2023
ondrejmirtes
requested changes
Jan 6, 2024
Member
ondrejmirtes
left a comment
There was a problem hiding this comment.
Sorry for a late review.
- Look at the issue bot: https://github.com/phpstan/phpstan-src/actions/runs/7020506328 This also fixes phpstan/phpstan#9573 so please write a regression test.
- Please test different ranges passed into the
rangefunction. 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
Contributor
Author
|
Updated! |
Member
|
Thank you. |
This was referenced Jan 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the return type of
rangewhen passedIntegerRangeFixes phpstan/phpstan#10213