5
votes
PhpStorm version: 2018.2
Symfony Plugin Version: 0.16.165
Symfony version: 4.1.3
OS: Windows 10

I don't understand why, but every include and extend in my twig pages contain warning highlights about missing templates. All my twig pages are in the templates folder.

The code works, but I get complaints about them when I want to commit in git.

I've tried all answers in "Missing Twig template in PhpStorm with Symfony Plugin" to no avail.

enter image description here

Namespace has already been set.

enter image description here

Twig is showing correct configuration as far as I can tell.

$ php bin/console debug:config twig

Current configuration for extension with alias "twig"
=====================================================

twig:
    paths:
        'C:\Linux\Cygwin\home\me\PhpstormProjects\MyApp\MyApp\vendor\knplabs\knp-menu\src\Knp\Menu/Resources/views': null
        'C:\Linux\Cygwin\home\me\PhpstormProjects\MyApp\MyApp/templates': null
    debug: true
    strict_variables: true
    exception_controller: 'twig.controller.exception::showAction'
    form_themes:
        - form_div_layout.html.twig
    globals: {  }
    autoescape: name
    autoescape_service: null
    autoescape_service_method: null
    cache: 'C:\Linux\Cygwin\home\me\PhpstormProjects\MyApp\MyApp\var\cache\dev/twig'
    charset: UTF-8
    default_path: 'C:\Linux\Cygwin\home\me\PhpstormProjects\MyApp\MyApp/templates'
    date:
        format: 'F j, Y H:i'
        interval_format: '%d days'
        timezone: null
    number_format:
        decimals: 0
        decimal_point: .
        thousands_separator: ','

twig.yaml

twig:
    paths: ['%kernel.project_dir%/templates']
    debug: '%kernel.debug%'
    strict_variables: '%kernel.debug%'
1

1 Answers

3
votes

I hadn't tried deleting the .idea folder because it doesn't show up in Project and assumed that Symfony 4 must have stopped using them as the question was aimed at Symfony 3.