We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
throws
It looks like that it is not currently possible to use templates while annotating @throws. See
@throws
https://psalm.dev/r/607d0aaa96
I think it would be reasonable to be able to use templates also when annotating thrown exceptions
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** * @template E of Exception * @param E $e * @throws E */ function foo(Exception $e): void { throw $e; }
Psalm output (using commit 35b6a93): ERROR: UndefinedDocblockClass - 6:12 - Docblock-defined class, interface or enum named E does not exist
Sorry, something went wrong.
Duplicate of #3784
I'm reopening this issue as #3784 has been closed after unrelated discussions and the use case here is legit.
ResultInterface<T>
ResultInterface<T, E>
No branches or pull requests
It looks like that it is not currently possible to use templates while annotating
@throws
. Seehttps://psalm.dev/r/607d0aaa96
I think it would be reasonable to be able to use templates also when annotating thrown exceptions
The text was updated successfully, but these errors were encountered: