-
-
Notifications
You must be signed in to change notification settings - Fork 931
Open
Labels
Milestone
Description
Bug report
An error is reported stating that call to is_callable
will always resolve to true
, however provided array of callables contains function that does not exist within callable class?
Code snippet that reproduces the problem
https://phpstan.org/r/9d6b9c24-6a61-49d1-b47b-811a2cc2a980
Expected output
After fixing this specific issue, PHPStan will report that function will always throw.
Realistically - no error should be reported here. I consider this kind of runtime check to be quite important and I am not convinced we should actively discourage from having them and relying only on PHPStan ability to catch this in CI (as shown in this issue, it is prone to failure).
Did PHPStan help you today? Did it make you happy in any way?
No response