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 4949, support closure bind with class-string #706

Merged
merged 1 commit into from Feb 1, 2022

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek marked this pull request as ready for review October 12, 2021 09:56
src/Analyser/NodeScopeResolver.php Outdated Show resolved Hide resolved
@mvorisek
Copy link
Contributor Author

@ondrejmirtes can you please review this PR? Also, the releases stopped at 0.12.99 about 2 months ago, is it planned and does it mean some big changes are comming?

@ondrejmirtes
Copy link
Member

https://twitter.com/ondrejmirtes/status/1448544146944401409?s=21 ;)

@mvorisek
Copy link
Contributor Author

mvorisek commented Nov 4, 2021

I belive this PR is done, can you please review and merge? Thanks.

@mvorisek
Copy link
Contributor Author

@ondrejmirtes can you please review this PR?

@ondrejmirtes
Copy link
Member

@mvorisek You're in the same pool as everyone else so you have to wait
B4D02675-A371-4A3D-A7A1-B4B7ED867255
.

} elseif ($argValueType instanceof ConstantStringType) {
$scopeClass = $argValueType->getValue();
$thisType = new ObjectType($scopeClass);
} elseif (
$argValueType instanceof GenericClassStringType
&& $argValueType->getGenericType() instanceof ObjectType
Copy link
Member

Choose a reason for hiding this comment

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

instanceof TypeWithClassName would be better. Otherwise 👍 .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, 👍

@ondrejmirtes ondrejmirtes merged commit fcfe9b9 into phpstan:master Feb 1, 2022
@ondrejmirtes
Copy link
Member

Thank you.

@mvorisek mvorisek deleted the closure_bind_class_string branch February 1, 2022 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants