-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Exception throw from callable are not reported #10142
Comments
This bug report is missing a link to reproduction at phpstan.org/try. It will most likely be closed after manual review. |
if you need additional configuration for reproduction, it would be great if you could provide a small repro repository |
Repository is not needed, this is a known behaviour. |
This is a duplicate of: #5001 You can solve it with https://github.com/shipmonk-rnd/phpstan-rules#forbidcheckedexceptionincallable. |
@ondrejmirtes Thank you for your quick reply and for the workaround 🙏 |
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. |
Bug report
Hello,
Exceptions thrown in array_map callback are not reported.
I think this is due to array_map function didn't describe exceptions
I tried to reproduce on the playground, but the exception configuration is enabled (https://phpstan.org/r/87bc2b85-0d85-4ce9-8b77-c071536b9785)
How can we make phpstan knows that function that use callback can throws the same exceptions as callback describes ones ?
Thanks
Configuration
Code sample
Code snippet that reproduces the problem
No response
Expected output
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: