You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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
The text was updated successfully, but these errors were encountered:
Bug report
An error is reported stating that call to
is_callable
will always resolve totrue
, 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
The text was updated successfully, but these errors were encountered: