minor #4115 [Doc] Document OPTIMIZE_TEXT_NODES (smnandre)

This PR was merged into the 3.x branch.

Discussion
----------

[Doc] Document OPTIMIZE_TEXT_NODES

(and remove obselete OPTIMIZE_VAR_ACCESS)

Commits
-------

491a8417 Document OPTIMIZE_TEXT_NODES
This commit is contained in:
Fabien Potencier
2024-07-01 14:33:44 +02:00
+2 -2
View File
@@ -563,8 +563,8 @@ Twig supports the following optimizations:
* ``\Twig\NodeVisitor\OptimizerNodeVisitor::OPTIMIZE_RAW_FILTER``, removes the ``raw``
filter whenever possible.
* ``\Twig\NodeVisitor\OptimizerNodeVisitor::OPTIMIZE_VAR_ACCESS``, simplifies the creation
and access of variables in the compiled templates whenever possible.
* ``\Twig\NodeVisitor\OptimizerNodeVisitor::OPTIMIZE_TEXT_NODES``, optimizes the text
nodes by merging consecutive text nodes into a single one.
Exceptions
----------