phptools-docs
phptools-docs copied to clipboard
Annotations, that are not fully imported, can not be handled by LSP as valid references
Description: If annotation class is not fully imported (does not contain namespace parts), everything works and processed correctly and LSP knows that annotation represents specific class. If annotation class is fully imported, annotation is not handled properly and LSP can not find reference of class. I think it is more clear to check screenshot. Annotation class from screenshot can be found in zircote/swagger-php package (if it helps). I did not checked how LSP handles attributes in PHP8+, but it will be nice if you will check that case as well.
PHP version: 7.4. Extension version: 1.37.13534
This works:
This does not work:
Thank you Andrei. You are right, our LSP does not completely support phpdoc annotations (it's non-standard phpdoc feature that is being replaced by PHP8 attributes).
We should support that though - adding it to our to-do list.