mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-27 22:26:10 +00:00
Merge branch '3.x' into 4.x
* 3.x: Deprecate returning null from TokenParserInterface::parse()
This commit is contained in:
+3
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user