Twig component : no CTRL-click navigation to template for components with a name_prefix
yched opened this issue · 0 comments
yched commented
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 :
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
- MyComponent defined in
src/Twig/Components/MyComponent.php
templates/components/MyComponent.html.twig
- MyComponent2 defined in
src/Twig/PrefixedComponents/MyComponent2.php
templates/components/MyComponent2.html.twig
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