Document that overriding MacroNode::compile() is not supported anymore

This commit is contained in:
Fabien Potencier
2026-08-27 13:07:26 +02:00
parent 7bd052dd91
commit 1205b8b6ca
+4 -1
View File
@@ -12,7 +12,10 @@ Classes
final in Twig 4.0. Use ``Twig\Markup`` directly instead of extending it.
* The ``Twig\Node\MacroNode`` class is considered final as of Twig 3.29 and
will be final in Twig 4.0.
will be final in Twig 4.0. Note that macros are compiled as closures stored
in a per-template registry as of Twig 3.29, so overriding
``MacroNode::compile()`` based on the previous contract (emitting a
``macro_``-prefixed method) is not supported anymore.
Functions
---------