Skip to content

A PhpStorm plugin that makes IDE understand KPHP specifics

License

Notifications You must be signed in to change notification settings

VKCOM/kphpstorm

Repository files navigation

KPHPStorm plugin for PhpStorm

Build GitHub license Total Downloads Latest Version

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.

Brief info

  • extended types in phpdoc: arbirtary nesting, ?nullable, tuples, shapes and other KPHP types

    phpdoc types
  • extended type inferring with per-key access completion and stdlib enhancements

    extended tinf
  • @kphp- doc tags autocomplete and validation

    @kphp doc tag
  • strict type checking in function calls, assignments, return statements, array access, etc

    strict typing
  • ... and much more!

Detailed info

Useful for plugin developers

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.

Questions and contribution

Please contact vk.com/kphp or VK Team.