phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

Annotations, that are not fully imported, can not be handled by LSP as valid references

Open AndreiOrmanji opened this issue 2 years ago • 1 comments

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: image

This does not work: image

AndreiOrmanji avatar Aug 07 '23 16:08 AndreiOrmanji

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.

jakubmisek avatar Aug 08 '23 10:08 jakubmisek