Skip to content

Comments

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

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

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 from 0f2805a to a5a2fe0 Compare February 17, 2026 22:23
@mvorisek mvorisek force-pushed the fix_5946_this_into_static branch from a5a2fe0 to e27d8da Compare February 17, 2026 22:26
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

1 participant