SymfonyWorld Online 2020
100% online
30+ talks + workshops
Live + Replay watch talks later

How to Check the Syntax of Your Twig Templates

3.4 version
Maintained Unmaintained

How to Check the Syntax of Your Twig Templates

You can check for syntax errors in Twig templates using the lint:twig console command:

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

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.