deep-assoc-completion

A phpstorm plugin for associative array key typing and completion.

Autocomplete keys of associative arrays defined in other functions.

Jetbrains Repository: 9927-deep-assoc-completion

alt tag

Precompiled .jar (may be outdated): mirror1mirror2.

Steps to compile plugin into a .jar follow:

  • Start creating a new project in Intelliji Idea.
  • Select Intelliji Platform Plugin.
  • Select a phpstorm installation directory as Project SDK (java version is 8).
  • Select phpstorm-deep-keys project folder as Project location.
  • In Project Structure -> Libraries add php.jar and php-openapi.jar from YourPhpStormDirectory/plugins/php/lib/.
  • In Project Structure -> Modules -> Dependencies set Scope of php-openapi to Provided.

To build a jar use Build -> Prepare Plugin ... For Deployment. To debug use Run -> Debug. Since phpstorm project takes about a minute to start, you must find Run -> Reload Changed Classes very useful for micro changes.

To use compiled .jar in your phpstorm go to Settings -> Plugins -> Install plugin from disk and select the .jar we compiled earlier.

 



Features description

(a bit more detailed usage guide can be found here)

Completion from expression

When you are going to type an associative key of a variable, like in $user[''], put caret between quotes and press ctrl + space. The plugin will analyze your code, determine what keys does $user have and suggest completion.

Go To Definition

Go To Definition

To go to the key definition, hover on it and press ctrl + click or put carret on it and press ctrl + b.

Subscribe to the Newsletter

Get our latest news,tutorials,guides,tips & deals delivered to your inbox.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

shares