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

Bert H
  • 190
  • 10
  • 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 09:30
  • You thinking it's a bug in PhpStorm? Not seeing anything already filed in https://youtrack.jetbrains.com/issues/WI?q=twig%20extension%20template%20not%20found&f=false – Brad Bell Apr 18 '19 at 05:50

1 Answers1

2

Was probably a bug in PHPStorm 2019.1.

Currently using 2019.1.2 and the warning disappeared.

Bert H
  • 190
  • 10