PhpStorm plugin that makes IDE understand KPHP specifics. JetBrains repository
KPHP is a PHP compiler. Its goal is to execute PHP code much faster. It supports a strict subset of PHP and brings new types, functions, annotations and web server runtime.
-
extended types in phpdoc: arbirtary nesting, ?nullable, tuples, shapes and other KPHP types
-
extended type inferring with per-key access completion and stdlib enhancements
-
@kphp- doc tags autocomplete and validation
-
strict type checking in function calls, assignments, return statements, array access, etc
-
... and much more!
Provided code can help IDEA/PhpStorm plugin developers in various aspects: how to provide extended type inferring, parse and colorize custom doc tags, traverse PSI structure, handle stubs metadata and lots of corner cases.
An interesting fact is that plugin disables lots of features in plain PHP projects (not KPHP-based).
Feel free to examine this code, it contains lots of necessary comments.
Please contact vk.com/kphp or VK Team.