3

Following code show a warning "template not found" in PHPStorm:

{% extends '_layout' %}.

When adding .twig this warning dissapears, but I'd like to keep extends and includes filetype agnostic.

What I've tried so far:

  1. Installing the Symfony plugin and enabling Twig support.
  2. Adding the templates folder as a Twig directory, as described here.
  3. Invalidate PHPStorm cache and restart.

Is there a way to fix this? Or should I use {% extends '_layout.twig' %}?

Using PHPStorm 2019.1

2
  • 1
    I've been working with Craft and PHP Storm for about 6 years, this is definitely a new issue with the IDE, maybe something in the 2019.1 release. I would be interested to know how to get round this too as I don't like to include files with extensions either.
    – Jamie Wade
    Apr 16 '19 at 9:30
  • You thinking it's a bug in PhpStorm? Not seeing anything already filed in youtrack.jetbrains.com/issues/…
    – Brad Bell
    Apr 18 '19 at 5:50
2

Was probably a bug in PHPStorm 2019.1.

Currently using 2019.1.2 and the warning disappeared.

Not the answer you're looking for? Browse other questions tagged or ask your own question.