felixfbecker / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
ISC License
1.14k stars 185 forks source link

Missing typehints for static methods, constants and references #658

Open dingo-d opened 5 years ago

dingo-d commented 5 years ago

I'm using Language Server Protocol support for Sublime Text 3, and I'm wondering is it possible to include hinting of the constants or static methods in PHP?

For instance I aliased a certain class, and I'm using a public static method from that class

screen shot 2018-07-06 at 11 54 45

Hovering on the class, gives me a nice popup about it (yay!)

However hovering on the method itself doesn't provide any info about it, event though there is a nice docblock + typehinting on that method

screen shot 2018-07-06 at 11 54 51

screen shot 2018-07-06 at 11 58 28

Hovering on the passed argument works (since it's inside the method where this other method is being called)

screen shot 2018-07-06 at 11 54 58

The same thing happens when I try to check any constant in a class, either defined in the class (self::CONSTANT) or one that is inherited (static::CONSTANT). Or when I'm having a dependency injection, the passed object and the class methods from the object's class are not typehinted.

Any workarounds for this, or is this not implemented/possible?

dingo-d commented 5 years ago

Any info about this?