Add a deprecation notice when using AbstractNodeVisitor (deprecated since 2.9)

This commit is contained in:
Fabien Potencier
2024-04-14 10:33:37 +02:00
parent fe2bdd2b66
commit 41d702d6be
3 changed files with 9 additions and 2 deletions
+1
View File
@@ -1,5 +1,6 @@
# 3.9.0 (2024-XX-XX)
* Deprecate AbstractNodeVisitor
* Add a new "yield" mode for output generation;
Node implementations that use "echo" or "print" should use "yield" instead;
all Node implementations should be flagged with `#[YieldReady]` once they've been made ready for "yield";
+6
View File
@@ -17,3 +17,9 @@ Extensions
* All functions defined in Twig extensions are marked as internal as of Twig
3.9.0, and will be removed in Twig 4.0. They have been replaced by internal
methods on their respective extension classes.
Node Visitors
-------------
* The ``Twig\NodeVisitor\AbstractNodeVisitor`` class is deprecated, implement the
``Twig\NodeVisitor\NodeVisitorInterface`` interface instead.
+2 -2
View File
@@ -17,9 +17,9 @@ use Twig\Node\Node;
/**
* Used to make node visitors compatible with Twig 1.x and 2.x.
*
* To be removed in Twig 3.1.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 3.9 (to be removed in 4.0)
*/
abstract class AbstractNodeVisitor implements NodeVisitorInterface
{