Merge branch '2.x' into 3.x

* 2.x:
  deprecated returning "false" to remove a Node from NodeVisitorInterface::leaveNode()
This commit is contained in:
Fabien Potencier
2019-04-26 11:48:29 +02:00
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -17,6 +17,7 @@
* 2.9.0 (2019-XX-XX)
* deprecated returning "false" to remove a Node from NodeVisitorInterface::leaveNode()
* allowed Twig\NodeVisitor\NodeVisitorInterface::leaveNode() to return "null" instead of "false" (same meaning)
* deprecated the "filter" tag (use the "apply" tag instead)
* added the "apply" tag as a replacement for the "filter" tag
+4
View File
@@ -70,6 +70,10 @@ final class NodeTraverser
$node->setNode($k, $m);
}
} else {
if (false === $m) {
@trigger_error('Returning "false" to remove a Node from NodeVisitorInterface::leaveNode() is deprecated since Twig version 2.9; return "null" instead.', E_USER_DEPRECATED);
}
$node->removeNode($k);
}
}