klesun / deep-assoc-completion

A phpstorm plugin for associative array key typing and completion
Other
267 stars 17 forks source link

Autocomplete in Twig does not work #216

Open k0d3r1s opened 5 months ago

k0d3r1s commented 5 months ago

Hi. I'm trying to get this working in Symfony project with Twig but it does not seem to work.
I tried:

{# data-source = \App\Document\Receipt\ReceiptDocumentTask::test() #}
{# @var test = \App\Document\Receipt\ReceiptDocumentTask::test() #}

even this, even there is no point

{# @var test = \App\Document\Receipt\ReceiptDocumentTask #}

but nothing seems to be working, I can't get it to show neither test.user, user, test.user.fullName, user.fullName etc. :(
I have symfony support enabled, symfony 6.4, PhpStorm 2024.1 but it does not work in PhpStorm 2023.3.6 as well, running on macOS 14.4.1, plugin version 2022.08.03.001

my php class:

namespace App\Document\Receipt;

class ReceiptDocumentTask extends AbstractDocumentTask
{
    public static function test(): array
    {
        return [
            'user' => [
                'fullName' => 'string',
            ],
        ];
    }
}