{"id":46564684,"url":"https://github.com/klesun/deep-assoc-completion","last_synced_at":"2026-03-07T06:34:27.672Z","repository":{"id":52490327,"uuid":"82496164","full_name":"klesun/deep-assoc-completion","owner":"klesun","description":"A phpstorm plugin for associative array key typing and completion","archived":false,"fork":false,"pushed_at":"2022-08-03T18:56:25.000Z","size":1944,"stargazers_count":267,"open_issues_count":37,"forks_count":17,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-01T13:47:10.096Z","etag":null,"topics":["associative-map","autocompletion","php","phpstorm-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klesun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["klesun"],"patreon":"klesun","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://heliowallet.com/ethereum-donation?address=0x722eFe9E540b75D3A7370E97601f9988eF0dce34\u0026amount=0.01\u0026accessWallet=1\u0026qrCode=1\u0026ethBalance=1\u0026history=1"}},"created_at":"2017-02-19T23:06:59.000Z","updated_at":"2024-03-25T12:04:09.000Z","dependencies_parsed_at":"2022-09-15T12:31:49.012Z","dependency_job_id":null,"html_url":"https://github.com/klesun/deep-assoc-completion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/klesun/deep-assoc-completion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klesun%2Fdeep-assoc-completion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klesun%2Fdeep-assoc-completion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klesun%2Fdeep-assoc-completion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klesun%2Fdeep-assoc-completion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klesun","download_url":"https://codeload.github.com/klesun/deep-assoc-completion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klesun%2Fdeep-assoc-completion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["associative-map","autocompletion","php","phpstorm-plugin"],"created_at":"2026-03-07T06:34:27.565Z","updated_at":"2026-03-07T06:34:27.639Z","avatar_url":"https://github.com/klesun.png","language":"Java","funding_links":["https://github.com/sponsors/klesun","https://patreon.com/klesun","https://heliowallet.com/ethereum-donation?address=0x722eFe9E540b75D3A7370E97601f9988eF0dce34\u0026amount=0.01\u0026accessWallet=1\u0026qrCode=1\u0026ethBalance=1\u0026history=1"],"categories":["Java"],"sub_categories":[],"readme":"PRs are welcome, will gladly help with any questions you may have, but pls try to avoid unnecessary refactoring and features that may cause considerable performance degradation, as such PRs won't be accepted. If in doubt, create an issue to discuss whether feature will be acceptable before starting investing into the solution.\n\nIf you need help with building the project or understanding the code, feel free to drop at https://t.me/klesun_productions, we can chat there ;)\n\n____________________________\n\nAutocomplete keys of associative arrays defined in other functions.\n\nJetbrains Repository: [9927-deep-assoc-completion](https://plugins.jetbrains.com/plugin/9927-deep-assoc-completion)\n\n![](https://user-images.githubusercontent.com/5202330/41823825-f82a5724-780e-11e8-9a8e-4eb37c89aa53.png)\n\n\n## Features description\n\n(a bit more relaxed usage guide can be found [here](https://github.com/klesun/phpstorm-deep-keys/blob/master/docs/deep-keys-overview.md))\n\n- ### Completion from expression\n    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.\n\n- ### Go To Definition\n    ![Go To Definition](https://cloud.githubusercontent.com/assets/5202330/26428215/284b1988-40e9-11e7-9a44-746145c5393f.png)\n    \n    To go to the key definition, hover on it and press `ctrl` + `click` or put carret on it and press `ctrl` + `b`.\n\n- ### Completion from phpdoc\n\n    [See formats description](https://github.com/klesun/deep-assoc-completion/issues/63)\n\n    ![Completion from phpdoc](https://cloud.githubusercontent.com/assets/5202330/26426602/0f72f554-40e2-11e7-8873-30b873310746.png)\n\n    You can specify function argument type using `@param SomeType $varName = Some::phpExpression()`, like `@param $anime = ['genre' =\u003e 'shounen', 'studio' =\u003e 'Shaft']`. `=` is mandatory and expression must be a valid php expression. Class methods can be specified either with complete namespace like `\\Very\\Long\\Namespace\\ClassName::funcName()`, or with just `ClassName::funcName()`.\n\n    You can specify `@return` array keys as well:\n    ```cpp\n    /**\n     * @return array [\n     *     'success' =\u003e true,\n     *     'formObject' =\u003e new Form,\n     *     'errors' =\u003e [],\n     * ]\n     */\n    public static function processForm($arr);\n    ```\n    ![Completion from @return phpdoc](https://i.stack.imgur.com/vgZM9.png)\n\n- ### Object type info in an associative array\n    ![Object type info in an associative array](https://user-images.githubusercontent.com/5202330/30355696-9d6aa368-983d-11e7-8b8a-6b4f5afcee0e.png)\n    \n    Phpstorm does not give you method name completion when object is located in an associative array? Don't be sad, this plugin is exactly what you need!\n    \n- ### To N-th Test\n    ![To N-th Test](https://user-images.githubusercontent.com/5202330/48870020-e6310280-ede7-11e8-9a70-33b64fdcc574.png)\n    \n    Did you ever want an ability to find out which exactly test case does phpunit mean by the `with data set \"17\"` without manually counting them? You can find this feature in _Tools -\u003e deep-assoc-completion -\u003e To N-th Test_. It moves your caret to the test case with the order you specify in the popup. If there are multiple `@dataProvider` functions in the file, the function caret is currently in will be used. This action will work correctly only on more or less straightforward `@dataProvider`-s.  \n    \n- ### String value completion\n    ![String Value Completion](https://user-images.githubusercontent.com/5202330/48870527-e205e480-ede9-11e8-824c-750088b76fa4.png)\n      \n    ![String Value Completion](https://user-images.githubusercontent.com/5202330/48870610-2b563400-edea-11e8-93c1-c8bbd973726b.png)  \n    \n- ### Transpile to JS code (not related to completion anyhow, but whatever)\n    \n    ![Transpile to JS code](https://user-images.githubusercontent.com/5202330/51703012-293c6b80-200d-11e9-9479-e51c5f7bbfaf.png)  \n    \n## Completion sources\n    \n- ### Argument type resolution based on what was passed to the function\n    ![Keep Track of What is Passed to the Function](https://user-images.githubusercontent.com/5202330/48870882-280f7800-edeb-11e8-9a72-fe66b1af1fd5.png)\n    \n    ![Infer type based on function usage when inside function](https://user-images.githubusercontent.com/5202330/48870975-88061e80-edeb-11e8-9501-c525a2a92e6a.png)\n    \n    Extremely useful for small private helper functions - you don't need to document args in each of them to get completion.\n    \n- ### Keys from PDOStatement::fetch() if your Database is connected to IDEA\n    ![PDO completion](https://user-images.githubusercontent.com/5202330/34743879-3e690ff0-f583-11e7-8dee-dd8c86b78917.png)\n    \n- ### All built-in array functions I could find are supported\n    ![built-ins](https://user-images.githubusercontent.com/5202330/48871378-2e9eef00-eded-11e8-8bbc-26c9d675cbeb.png)\n    \n    ![static key built-ins](https://user-images.githubusercontent.com/5202330/48871517-bd137080-eded-11e8-9208-3725d81b960a.png)\n    \n    \n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003chr/\u003e\n\u003chr/\u003e\n\n## Steps to compile plugin into a `.jar` follow:\n\n- Start creating a new project in _[Intelliji Idea](https://www.jetbrains.com/idea/)_.\n- Select `Intelliji Platform Plugin`.\n- Select a _phpstorm_ or _IDEA Ultimate_ installation directory as `Project SDK` (java version is 8).\n- Select `deep-assoc-completion` project folder as `Project location`.\n- In `Project Structure -\u003e Libraries` add `php/lib/php.jar`, `php/lib/php-openapi.jar` and `twig/lib/twig.jar` from `YourPhpStormDirectory/plugins/[php|twig]` (in case of _IDEA Ultimate_, the `php` and `twig` plugins should be installed, and the location is `HomeOrMyDocumentsDir/.IntellijIdea20XX.X/config/plugins/[php|twig]/lib`).\n- In `Project Structure -\u003e Modules -\u003e Dependencies` set `Scope` of `php`, `php-openapi` and `twig` to `Provided`.\n\nTo build a jar use `Build -\u003e Prepare Plugin ... For Deployment`. To debug use `Run -\u003e Debug`. Since phpstorm project takes about a minute to start, you must find `Run -\u003e Reload Changed Classes` very useful for micro changes.\n\nTo use compiled `.jar` in your phpstorm go to `Settings -\u003e Plugins -\u003e Install plugin from disk` and select the `.jar` we compiled earlier.\n\n_________________________________________________________\n\nShutout my thanks to the [JetBrains](https://jb.gg/OpenSource) for continuously supplying me an open source IDE license for this plugin development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklesun%2Fdeep-assoc-completion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklesun%2Fdeep-assoc-completion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklesun%2Fdeep-assoc-completion/lists"}