Skip to content

Fix late static binding calls for first class callable #3435

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

Merged
merged 10 commits into from
Sep 19, 2024

Conversation

mvorisek
Copy link

@mvorisek mvorisek commented Sep 12, 2024

followup to #3361

dedup + fix first class callable

@mvorisek mvorisek changed the base branch from 2.0.x to 1.12.x September 12, 2024 17:48
@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 2.0.x. PHPStan 2.0 is not going to be released for months. If your code is relevant on 1.12.x and you want it to be released sooner, please rebase your pull request and change its target to 1.12.x.

@mvorisek mvorisek marked this pull request as ready for review September 12, 2024 18:20
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.


assertType('StaticLateBinding\A', A::retStatic(...)());
assertType('StaticLateBinding\B', B::retStatic(...)());
assertType('Closure', self::retStatic()(...)); // should be static(StaticLateBinding\B)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shows this doesn't really work well.

Copy link
Author

@mvorisek mvorisek Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, typo on my side in the test

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ondrejmirtes can this PR be merged?

@mvorisek mvorisek marked this pull request as draft September 12, 2024 19:32
@mvorisek mvorisek marked this pull request as ready for review September 12, 2024 19:44
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@mvorisek mvorisek marked this pull request as ready for review September 12, 2024 20:04
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 9263039 into phpstan:1.12.x Sep 19, 2024
477 of 499 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@mvorisek mvorisek deleted the fcc_test branch September 19, 2024 07:24
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.

3 participants