You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latter include tag is more popular in certain projects as the include function is then only called when trying to assign the inclusion result to a variable. When trying to output the include result, the tag syntax is preferred.
So please support both syntaxes as they are both valid.
You can add these lines to FunctionalTest.php:150 to check for the failure:
['{% set foo %}1{% endset %}{% include "foo.html.twig" with {foo: foo} %}', null],
['{% set foo %}1{% endset %}{% include "foo.html.twig" with {foo: foo} only %}', null],
The text was updated successfully, but these errors were encountered:
This is a follow-up to #49
While the twigcs now correctly allows the following code to pass:
Valid as per: https://twig.symfony.com/doc/2.x/functions/include.html
It does not support:
Valid as per: https://twig.symfony.com/doc/2.x/tags/include.html
The latter include tag is more popular in certain projects as the include function is then only called when trying to assign the inclusion result to a variable. When trying to output the include result, the tag syntax is preferred.
So please support both syntaxes as they are both valid.
You can add these lines to FunctionalTest.php:150 to check for the failure:
The text was updated successfully, but these errors were encountered: