Skip to content
Advertisement

Unable to find template Symfony 4

When I updated from Symfony 3.4 to Symfony 4 and displayed the system with a browser, the following error appeared.
Changing the views directory is a lot of work and I don’t want to do it as much as possible. Is there any good way?
Error Code

JavaScript

Code
framework.yaml

JavaScript

twig.yaml

JavaScript

SecurityController.php

JavaScript

Version
Symfony 4.0
PHP 7.3
twig/twig 2.14
twig/templating 4.0
sensio/framework-extra-bundle 5.2.4

Advertisement

Answer

Setting the path to twig.yaml and the accompanying changes worked.

twig.yaml

JavaScript

Controller

JavaScript

~.html.twig

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement