Skip to content

Test chaining with static/self and $this more#3363

Open
mvorisek wants to merge 1 commit intophpstan:2.1.xfrom
mvorisek:fix_5946_this_into_static
Open

Test chaining with static/self and $this more#3363
mvorisek wants to merge 1 commit intophpstan:2.1.xfrom
mvorisek:fix_5946_this_into_static

Conversation

@mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Aug 27, 2024

add more tests for #4902 for phpstan/phpstan#5946

self:: method calls and properties are resolved using late-static binding, but Foo:: are not. For methods, this works perfectly already, for properties, expected type is commented in edge cases.

@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch 2 times, most recently from 8440516 to fd3a89a Compare September 23, 2024 06:45
@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch from fd3a89a to 8eae77c Compare October 11, 2024 09:11
@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch from 8eae77c to 8ceb598 Compare November 28, 2024 22:14
@mvorisek mvorisek closed this Jul 31, 2025
@mvorisek mvorisek deleted the fix_5946_this_into_static branch July 31, 2025 08:19
@mvorisek mvorisek restored the fix_5946_this_into_static branch February 16, 2026 09:23
@mvorisek mvorisek reopened this Feb 17, 2026
@mvorisek mvorisek changed the base branch from 1.12.x to 2.1.x February 17, 2026 10:15
@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch from 8ceb598 to 5381a06 Compare February 17, 2026 21:55
@mvorisek mvorisek changed the title Fix chaining with static/self and $this Test chaining with static/self and $this more Feb 17, 2026
@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch 2 times, most recently from a5a2fe0 to e27d8da Compare February 17, 2026 22:26
@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch from e27d8da to d2c7fa9 Compare March 9, 2026 09:58
@mvorisek mvorisek marked this pull request as ready for review March 9, 2026 10:02
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch from d2c7fa9 to 5167184 Compare March 13, 2026 23:21
@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch from 5167184 to cbeef7c Compare March 15, 2026 22:24
@mvorisek
Copy link
Contributor Author

PR is passing, please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$this type of static (self, ...) type must remains static

2 participants