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

Parameter #1 $ of closure expects TMemberType, TMemberType given #3566

Closed
dktapps opened this issue Jul 3, 2020 · 3 comments
Closed

Parameter #1 $ of closure expects TMemberType, TMemberType given #3566

dktapps opened this issue Jul 3, 2020 · 3 comments
Labels
Milestone

Comments

@dktapps
Copy link
Contributor

dktapps commented Jul 3, 2020

Bug report

This bug only occurs when using checkExplicitMixed.

Code snippet that reproduces the problem

https://phpstan.org/r/c4e62cc8-4e3d-4637-b060-bbba2ec52f69

It doesn't reproduce on phpstan.org because checkExplicitMixed isn't available there.

Expected output

No error should be reported.

@ondrejmirtes ondrejmirtes added this to the Easy fixes milestone Jul 3, 2020
@dktapps
Copy link
Contributor Author

dktapps commented Jan 24, 2021

The problem comes from here: https://github.com/phpstan/phpstan-src/blob/ba4bc4f7316a58aaf2d75be606c7b0d90aad136c/src/Rules/RuleLevelHelper.php#L63

The acceptedType in this sample is TemplateMixedType, which gets wiped out by StrictMixedType. I surmise that TMemberType of object doesn't have the same problem.

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@6ba9ef2

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants