Vscode-intelephense: {@inheritdoc} not working as expected

Created on 13 May 2019  路  4Comments  路  Source: bmewburn/vscode-intelephense

When implementing an interface method, I would like to mark the implementation with {@inheritdoc}. But when I do, the function no longer inherits its documentation from the interface.

Without {@inheritdoc}:
noinherit

With {@inheritdoc}: (notice that "Function that does stuff" is missing)
inherit

All 4 comments

Inheritance should happen by default and according to phpdocumentor {@inheritdoc} imports the parent long description only. Why would you want just an empty docblock with {@inheritdoc} here?

Drupal uses {@inheritdoc} all over the place to mean "inherit all documentation", which I didn't realize was different than phpdocumentor until now. So the current behaviour makes sense to me now, I guess it's Drupal's use of the tag that's causing me problems. Thanks for the explanation!

Looks like there is a bug here. {@inheritdoc} only doc blocks should already be handled but it fails in cases where the inheritance depth is greater than 1

hmm, no looks like this was never supported. Though considering it's used in a number of frameworks then I've added support to treat it as though there was no doc bock at all ie inherit by default

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghnp5 picture ghnp5  路  3Comments

vanasis picture vanasis  路  4Comments

superadmini picture superadmini  路  4Comments

ottopic picture ottopic  路  3Comments

ghost picture ghost  路  3Comments