Merge branch '3.x' into 4.x

* 3.x:
  use getShareDir as an indicator of Symfony version
  Add 'invoke' to filters index
  [Core] Fix cycle() with non-countable ArrayAccess+Traversable objects
  Update .gitattributes to exclude phpstan configs
  Bump version
  Prepare the 3.22.1 release
  Update CHANGELOG
  `CoreExtension` : Make error message more readable
  Add caution note for random function usage
  Add throw tag to parse methods
This commit is contained in:
Fabien Potencier
2025-12-05 09:58:08 +01:00
9 changed files with 27 additions and 5 deletions
@@ -11,12 +11,16 @@
namespace Twig\ExpressionParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\AbstractExpression;
use Twig\Parser;
use Twig\Token;
interface InfixExpressionParserInterface extends ExpressionParserInterface
{
/**
* @throws SyntaxError
*/
public function parse(Parser $parser, AbstractExpression $left, Token $token): AbstractExpression;
public function getAssociativity(): InfixAssociativity;
@@ -11,11 +11,15 @@
namespace Twig\ExpressionParser;
use Twig\Error\SyntaxError;
use Twig\Node\Expression\AbstractExpression;
use Twig\Parser;
use Twig\Token;
interface PrefixExpressionParserInterface extends ExpressionParserInterface
{
/**
* @throws SyntaxError
*/
public function parse(Parser $parser, Token $token): AbstractExpression;
}