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
Validate phpDoc throws types #1001
Conversation
@Majkl578 I'm not sure it's a good idea. People may want to put there just marker interface in PHP < 7 codebase, i.e the marker interface cannot extend |
} | ||
|
||
return [sprintf( | ||
'PHPDoc tag @throws with type %s is not a valid throwable (incompatible with Throwable)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very odd formulation. How about simply ...type $s is not subtype of Throwable
?
I'm quite sure it's a good idea.
https://docs.phpdoc.org/references/phpdoc/tags/throws.html#description Also PHP 5 code is an edge case. (Btw I've never seen such case.) |
Reworded. 👍 |
Nice, thank you! |
Small note here on Guzzle, after updating to |
Validation for
@throws
to make sure thrown type is a Throwable.cc @pepakriz