Merge branch '3.x' into 4.x

* 3.x:
  Deprecate returning null from TokenParserInterface::parse()
This commit is contained in:
Fabien Potencier
2024-08-24 10:53:41 +02:00
+3 -2
View File
@@ -192,9 +192,10 @@ class Parser
$subparser->setParser($this);
$node = $subparser->parse($token);
if (null !== $node) {
$rv[] = $node;
if (!$node) {
trigger_deprecation('twig/twig', '3.12', 'Returning "null" from "%s" is deprecated and forbidden by "TokenParserInterface".', $subparser::class);
}
$rv[] = $node;
break;
default: