Test chaining with static/self and $this more - #3363
Closed
mvorisek wants to merge 1 commit into
Closed
Conversation
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
2 times, most recently
from
September 23, 2024 06:45
8440516 to
fd3a89a
Compare
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
from
October 11, 2024 09:11
fd3a89a to
8eae77c
Compare
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
from
November 28, 2024 22:14
8eae77c to
8ceb598
Compare
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
from
February 17, 2026 21:55
8ceb598 to
5381a06
Compare
static/self and $thisstatic/self and $this more
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
2 times, most recently
from
February 17, 2026 22:26
a5a2fe0 to
e27d8da
Compare
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
from
March 9, 2026 09:58
e27d8da to
d2c7fa9
Compare
mvorisek
marked this pull request as ready for review
March 9, 2026 10:02
Collaborator
|
This pull request has been marked as ready for review. |
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
from
March 13, 2026 23:21
d2c7fa9 to
5167184
Compare
mvorisek
force-pushed
the
fix_5946_this_into_static
branch
from
March 15, 2026 22:24
5167184 to
cbeef7c
Compare
Contributor
Author
|
@ondrejmirtes can this be reviewed please? |
VincentLanglet
requested changes
Apr 25, 2026
VincentLanglet
left a comment
Contributor
There was a problem hiding this comment.
HI,
Rather than providing tests with "non-expected" result related to a solved and closed issues. I recommend either
- Providing a PR with extra fixes
- Or an issue with dedicated exemple about what is needed to be improved to let the bot working on it.
I currently don't see the value adding assertion with // should be comments.
Contributor
Author
|
Hi @VincentLanglet. This is comprehensive test to a fixed issue, but when landed, these tests were not added, so they have value to prevent breaking them later. The test is covering all chaining scenarios and I prefer to keep also the cases which are still broken. I prefer to keep the broken cases to keep them logically together. |
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.
add more tests for #4902 for phpstan/phpstan#5946
self::method calls and properties are resolved using late-static binding, butFoo::are not. For methods, this works perfectly already, for properties, expected type is commented in edge cases.