[PSR-19]: @throws bubbleling

30 views
Skip to first unread message

Anton Fedonyuk

unread,
Mar 13, 2022, 8:40:44 AM3/13/22
to PHP Framework Interoperability Group
Tag description not contain information about  bubbling errors/exceptions i.e.  errors/exceptions throwed in calling functions.
I think we need to add note: @throws tags adding for errors/exceptions thrown directly in commented function/method.
Why @throws tags of bubbling errors/exceptions must be omit?
  • No need to update bubbled @throws on changes in every calling function/method
  • In some cases impossible to specify all errors/exceptions thrown in called  function/method (for example, builder/factory methods)
Documentation tools must combine current PhpDoc and PhpDoc's of called functions/methods to generate complete list of @throws tags.
Reply all
Reply to author
Forward
0 new messages