Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto suggestions for Twig templates broke since PhpStorm 2020.1.4 #1553

Open
syteknet-core opened this issue Nov 11, 2020 · 4 comments
Open
Labels

Comments

@syteknet-core
Copy link

syteknet-core commented Nov 11, 2020

when working with Twig Templates, references to classes had working auto suggestions. This feature is broke since PhpStorm 2020.1.4

ex.

{# auto suggestion, for the classes, works fine with PhpStorm 2020.1.4 #}
{# after typing "@var test" the next typed characters opens the auto suggestion dialog #}
{# @var test \App\Service\FooService #}
  • in PhpStorm 2020.1.4 (Symfony Plugin Version 0.20.201) you will receive auto suggestions for the classes when you want to change it. Above this version it does not show any suggestions at all.

  • Auto Completion for the test var and jumping to the "FooService" Class works in any PhpStorm version, just the auto suggestions seem to be broke.

@syteknet-core
Copy link
Author

To validate this error you can open the demo project and edit the "templates/base.html.twig".

Demo Project: demo_twig_auto_suggestion.zip

@Haehnchen Haehnchen added the todo label Apr 6, 2024
@Haehnchen Haehnchen added fixed and removed todo labels Apr 6, 2024
Haehnchen added a commit that referenced this issue Apr 6, 2024
#1553 reimplement Twig "@var" type doc class completion with custom prefix matching
@drjayvee
Copy link

I just noticed that suggestions and even Ctrl-Q seem completely broken now with the latest PHPStorm + plugin. I also cannot navigate to classes in {# @var #} tags at all.

I've already disabled/enabled the plugin and invalidated PHPStorm caches, but that didn't help.

@drjayvee
Copy link

Reinstalling the plugin helped!

By the way, I'd like to get your opinion on #2024. Could you perhaps even change the plugin such that refactoring a method updates calls in Twig templates as well? That would be awesome.

@Haehnchen
Copy link
Owner

Twig templates as well

would be nice but how the core Twig plugin is working, its too much work to done. But yes there some branches and preimplementation also rebased against 2024.1 API. so the only way would be "to bridge" Twig plugin with much logic here inside the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants