Skip to content

Commit 7f908ba

Browse files
committed
minor #4660 Add documentation for use_yield option (hschletz)
This PR was merged into the 3.x branch. Discussion ---------- Add documentation for use_yield option Documentation was present in the source code, but missing in the docs. Commits ------- b8827b4 Add documentation for use_yield option
2 parents 403bd9d + b8827b4 commit 7f908ba

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

doc/api.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@ The following options are available:
145145
(default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
146146
disable).
147147

148+
* ``use_yield`` *boolean*
149+
150+
``true``: forces templates to exclusively use ``yield`` instead of ``echo``
151+
(all extensions must be yield ready)
152+
153+
``false`` (default): allows templates to use a mix of ``yield`` and ``echo``
154+
calls to allow for a progressive migration.
155+
156+
Switch to ``true`` when possible as this will be the only supported mode in
157+
Twig 4.0.
158+
148159
Loaders
149160
-------
150161

0 commit comments

Comments
 (0)