rms*_*ers 5 twig phpstorm symfony4
PhpStorm version: 2018.2
Symfony Plugin Version: 0.16.165
Symfony version: 4.1.3
OS: Windows 10
Run Code Online (Sandbox Code Playgroud)
我不明白为什么,但我的树枝页面中的每个包含和扩展都包含有关丢失模板的警告突出显示。我所有的树枝页面都在模板文件夹中。
代码可以工作,但是当我想在 git 中提交时,我会收到关于它们的抱怨。
我已经尝试了“使用 Symfony 插件在 PhpStorm 中缺少 Twig 模板”中的所有答案,但均无济于事。
命名空间已经设置。
据我所知,Twig 显示了正确的配置。
$ 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: ','
Run Code Online (Sandbox Code Playgroud)
twig.yaml
twig:
paths: ['%kernel.project_dir%/templates']
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
Run Code Online (Sandbox Code Playgroud)