Merge branch '3.x' into 4.x

* 3.x:
  Add an additional example in the docs
  Fix ignored parenthesis in expressions
  Tweak previous merge
  Added details in the doc of filters and functions of IntlExtension
  Add more information about the filter and the negative operators
  Update plural.rst: Fixing filter name
This commit is contained in:
Fabien Potencier
2024-09-29 17:54:25 +02:00
24 changed files with 141 additions and 40 deletions
+6 -1
View File
@@ -167,7 +167,12 @@ class ExpressionParser
$expr = $this->parseExpression();
$this->parser->getStream()->expect(Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed');
return $this->parsePostfixExpression($expr);
$expr = $this->parsePostfixExpression($expr);
if ($expr instanceof NegUnary) {
$expr->wrapInParentheses();
}
return $expr;
}
return $this->parsePrimaryExpression();