Open icedevelopment opened 3 years ago
Yes, I will see that. Thanks for your feedback !
As a side note {% dump %}
isn't detected either.
Yes, but this is not a real function which is forbidden.
True, technically its a tag in this case but I think it would be a very useful thing if this rule would detect it as well. According to the comments in Symfony\Bridge\Twig\TokenParser\DumpTokenParser the syntax should be:
{% dump %}
{% dump foo %}
{% dump foo, bar %}
but it looks like {% dump (foo) %}
is syntactically valid. On the other hand {% dump (foo, bar) %}
will throw an exception.
The ForbiddenFunctions rule added in #67 doesn't detect function calls with spaces before the first parenthesis.
Example:
won't be detected but
will be.
@Ciloe any chance you could slightly modify the parser to handle these cases?