Skip to content
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 ObjectType resolving inside bound Closure #1543

Merged
merged 2 commits into from
Jul 24, 2022

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Jul 24, 2022

Closes phpstan/phpstan#7675

This is my first time dealing with this dynamic Closure binding, but I guess this make sense. Previously it would lead incorrectly to a ThisType because $originalClass === $this->getClassReflection()->getName() evaluates to true if $originalClass is the one where the Closure bind is in.

@herndlm
Copy link
Contributor Author

herndlm commented Jul 24, 2022

hmm I see the same 3 failures (with more errors) in the non-falsy-string PR, so they should be unrelated 🤞 but this needs to be double-checked and I have actually no clue where the came from (weren't there still a couple of days ago?)..
UPDATE: the true pseudotype PR seems to be having the same failures, so I really assume they're fine..

@herndlm herndlm marked this pull request as ready for review July 24, 2022 18:48
@ondrejmirtes ondrejmirtes merged commit a6950a1 into phpstan:1.8.x Jul 24, 2022
@ondrejmirtes
Copy link
Member

Thank you!

1 similar comment
@szepeviktor
Copy link
Contributor

Thank you!

@herndlm herndlm deleted the fix-7675 branch July 24, 2022 20:32
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.

Incorrect class in closure for Closure::bind
3 participants