Method "Twig\Parser::getExpressionParser()" is deprecated
I don't know if this project is still ongoing, but it would be great if following deprecation issue would be resolved:
Since twig/twig 3.21: Method "Twig\Parser::getExpressionParser()" is deprecated, use "parseExpression()" instead.
Br,
Thank you for reporting this issue! would you contribute a pull request?
How did you find the deprecation error?
Thank you for reporting this issue! would you contribute a pull request?
How did you find the deprecation error?
Hello, sorry for the late reply. I found that the culprit was inside the i18n package after the application was throwing the mentioned error, since I am using it in one of my projects.
I will try to make a pull request as soon as possible. The solution is to replace $this->parser->getExpressionParser()->parseExpression(); with $this->parser->parseExpression(); in the TransTokenParser.php file.
Another option, as a quick remedy is to just suppress it with the '@' operator for now.
https://twig.symfony.com/doc/3.x/deprecated.html
Br,