-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken with Twig 2.10.0 #11
Comments
Have the same - had to switch back to twig 2.9 |
Same error with Twig 1.41.0 |
Same here. |
I just realized that filter and map are included in Twig 2.10 and Twig 1.41 thus making this extension unnecessary in those cases. |
@jean-gui yeah, right - I use it for group_by functionality |
I could be wrong, but it seems like the main issue is that this extension's public function getOperators()
{
return [
[
- '=>' => [
+ '==>' => [
'precedence' => 0,
'class' => '\DPolac\TwigLambda\NodeExpression\SimpleLambda'
],
],
[
- '=>' => [
+ '==>' => [
'precedence' => 0,
'class' => '\DPolac\TwigLambda\NodeExpression\LambdaWithArguments',
'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT
],
';' => [
'precedence' => 5,
'class' => '\DPolac\TwigLambda\NodeExpression\Arguments',
'associativity' => \Twig_ExpressionParser::OPERATOR_RIGHT
],
]
];
} I then updated my template code to use
I'm not sure what other better option there is besides than changing |
…=> operator in Twig 2.10
@gmhenderson, you are correct. I exended the LambdaExtension class and overrode the getOperators() method and it works again as expected. |
Twig 2.10.0 was recently released and it seems to be breaking this extension with the following message when calling the 'filter' filter :
The text was updated successfully, but these errors were encountered: