Haehnchen / idea-php-symfony2-plugin

IntelliJ IDEA / PhpStorm Symfony Plugin
https://plugins.jetbrains.com/plugin/7219
MIT License
911 stars 137 forks source link

Twig component : no CTRL-click navigation to template for components with a name_prefix #2382

Open yched opened 4 months ago

yched commented 4 months ago

CTRL-click on <twig:MyComponent> in a template, is supposed to let the user choose between navigating to the component PHP class or to the component template : image

It seems this doesn't fully work for components with a named_prefix : CTRL-click brings directly to the PHP class, and doesn't offer to go to the template

Example :

twig_component:
    anonymous_template_directory: 'components/'
    defaults:
        App\Twig\Components\: 'components/'
        App\Twig\PrefixedComponents\: 
            template_directory: 'components/'
            name_prefix: Prefix

Then in a twig file using both components :

    <twig:MyComponent>Hello</twig:MyComponent>
    <twig:Prefix:MyComponent2>Hello</twig:Prefix:MyComponent2>

CTRL-click on the 1st shows the popup to chose between MyComponent.php or MyComponent.html.twig CTRL-click on the 2nd directly opens MyComponent2.php, I can't navigate to MyComponent2.html.twig