How to Check the Syntax of Your Twig TemplatesEdit this page
Warning: You are browsing the documentation for Symfony 3.2, which is no longer maintained.
Read the updated version of this page for Symfony 6.2 (the current stable version).
You can check for syntax errors in Twig templates using the
1 2 3 4 5
# You can check by filename: $ php bin/console lint:twig app/Resources/views/article/recent_list.html.twig # or by directory: $ php bin/console lint:twig app/Resources/views