phpv8 / php-v8

PHP extension for V8 JavaScript engine
https://php-v8.readthedocs.io
MIT License
217 stars 14 forks source link

Add PhpStorm advanced metadata #51

Closed pinepain closed 7 years ago

pinepain commented 7 years ago

https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata

Some methods , e.g. Script::run() may return any of Value types and it comes in handy when IDE could typehint them. There are other methods which offers rich return type variation. As I personally use PhpStorm and it's pretty decent IDE, I'd like to give it first-class support and make more developers happy.

pinepain commented 7 years ago

It looks like PhpStorm advanced metadata is not designed to solve this problem yet.

Anyway, the user is responsible to check what value type/king he's receiving and do not depend on suggestions to keep pita low. While I'd really like to add this feature, it's not feasible at the moment and there is no clear roadmap how to achieve that. Bloating @return type with all possible subtypes is not the best idea.

Closing for now without resolution.