From 8f26ed50d04a961064b4ef195107b4c02f939cf7 Mon Sep 17 00:00:00 2001 From: Alex Wybraniec Date: Sun, 2 Aug 2015 21:24:29 +0100 Subject: [PATCH] Update templating.rst Version 2.7 says that the parameter order has change from twig:lint to lint:twig me@host:/vagrant/_project$ php app/console twig:lint app/Resources/views The use of "twig:lint" command is deprecated since version 2.7 and will be removed in 3.0. Use the "lint:twig" instead. 8/8 valid files me@host:/vagrant/_project$ php app/console lint:twig app/Resources/views 8/8 valid files Also fixed example in paragraph above. --- book/templating.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/book/templating.rst b/book/templating.rst index e1159069d71..19ecf3fa61a 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1224,7 +1224,7 @@ automatically: .. versionadded:: 2.6 The global ``app.security`` variable (or the ``$app->getSecurity()`` - method in PHP templates) is deprecated as of Symfony 2.6. Use ``app.user`` + method in PHP templates) is deprecated as of Symfony 2.6. Use ``app.user`` (``$app->getUser()``) and ``is_granted()`` (``$view['security']->isGranted()``) instead. @@ -1595,16 +1595,16 @@ is ``true``. By default this means that the variables will be dumped in the Syntax Checking --------------- -You can check for syntax errors in Twig templates using the ``twig:lint`` +You can check for syntax errors in Twig templates using the ``lint:twig`` console command: .. code-block:: bash # You can check by filename: - $ php app/console twig:lint app/Resources/views/article/recent_list.html.twig + $ php app/console lint:twig app/Resources/views/article/recent_list.html.twig # or by directory: - $ php app/console twig:lint app/Resources/views + $ php app/console lint:twig app/Resources/views .. _template-formats: