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
While using TwigPHP to parse a Twig template and apply some changes to the AST before it is sent to the compiler, we discovered that the compiler changes somes attributes of FilterExpression:
This is a violation of the purpose of a compiler: a compiler compiles an AST as-is without changing it. Would the AST needs to be changed, it must be done before it is sent to the compiler
This violation creates an obvious issue where changing the attributes of a FilterExpression node is reverted by the compiler - defeating the purpose of having an AST to begin with.
I'm not sure how spread this pattern is in TwigPHP code base. Hopefully not too much.
The text was updated successfully, but these errors were encountered:
While using TwigPHP to parse a Twig template and apply some changes to the AST before it is sent to the compiler, we discovered that the compiler changes somes attributes of FilterExpression:
Twig/src/Node/Expression/FilterExpression.php
Line 30 in 51cfad8
This is a violation of the purpose of a compiler: a compiler compiles an AST as-is without changing it. Would the AST needs to be changed, it must be done before it is sent to the compiler
This violation creates an obvious issue where changing the attributes of a FilterExpression node is reverted by the compiler - defeating the purpose of having an AST to begin with.
I'm not sure how spread this pattern is in TwigPHP code base. Hopefully not too much.
The text was updated successfully, but these errors were encountered: