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

Completion for variables of template rendering #1052

Closed
Haehnchen opened this issue Oct 11, 2017 · 3 comments
Closed

Completion for variables of template rendering #1052

Haehnchen opened this issue Oct 11, 2017 · 3 comments
Labels

Comments

@Haehnchen
Copy link
Owner

Provide completion for template rendering parameter

foobar('foo.html.twig', [
  'foobar' => ...
]);
{{ foobar }}
{% if foobar %}
...
Haehnchen added a commit that referenced this issue Oct 15, 2017
Haehnchen added a commit that referenced this issue Oct 15, 2017
Haehnchen added a commit that referenced this issue Oct 15, 2017
Haehnchen added a commit that referenced this issue Nov 1, 2017
… variables completion #1052; use Annotation plugin for template name DocBlock extraction and support "template" property
Haehnchen added a commit that referenced this issue Nov 1, 2017
@pueppiblue
Copy link

pueppiblue commented Nov 16, 2017

0.15.159 broke autocomplete for template parameters

as well as no autocompletion for app global variable

 # someController
return $this->render(foo/bar.html.twig', array(
            'foo' => $foo
));
# bar.html.twig
{{ foo }}
  • foo does not autocomplete itself nor provide any methods or its type.

  • Noticed that on PhpStorm 2017.3 EAP after plugin update.

  • Went to 2017.2.4 to double-check this (still with older plugin version installed):
    {{ foo }} worked as intended alas twig global {{ app }} did not.

  • updated symfony plugin on 2017.2.4 =>
    no autocompletion for {{ foo }} either

  • oddly while indexing is running autocompletion for parameters does work

@pueppiblue
Copy link

Narrowed it to symfony: "3.3.*"
On 2.8 for example, it still works.

@Haehnchen
Copy link
Owner Author

Haehnchen commented Nov 17, 2017

@pueppiblue you issue should be fixed in next release including: beb0da7 note: ControllerTrait since Symfony 3.3

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

2 participants