-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
PHPStan callable definitions do not support custom mapped types #224
Comments
Hi, there's no way to support this. Form definitions and |
What about array and second variant for object? mixed is too wide... |
It will complain about dangerous calls on |
Does not have to be fixed. It's fine to pass callable with a single parameter somewhere multiple arguments are passed. |
What do you mean,by "revert it to |
|
Then there must be some issue there because, apparently, it does not |
@jiripudil Yes, that's a bug on this line https://github.com/phpstan/phpstan/blob/4415f4c5d897359433cdcbc1576d3be7bb2757ec/src/Type/CallableType.php#L70. |
Should be fixed: phpstan/phpstan#2170 |
What is the final consensus? |
I believe |
FYI #216 (comment) |
Version: dev-master
Bug Description
The callable definitions introduced in #216 fail to support custom mapped types:
produces
I don't know how the variance works there, but neither adding
callable(Form, object)
norclass MappedValues extends ArrayHash
seemed to help. Perhaps @ondrejmirtes or @JanTvrdik could chime in please?The text was updated successfully, but these errors were encountered: