You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I open this issue to start a conversation and possibly find solution for yielding support for twig4.
Twig 3.9 introduced the use_yield option, which will be the only strategy in twig4. Read the changelog here.
Pull request #154 added support for the internal changes that were made in 3.9, but still relies on echo and the output buffer. (use_yield is off).
The yii2-twig library creates twig functions for yii's View helper functions (beginBody, endBody, beginPage etc...), which will echo their contents, which does not work in twig3.9 with use_yield. Note: endPage will modify the current output buffer (replacing the placeholders), which already has a workaround from 2.5.0.
I think a solution needs to be found to support yielding, because echo is deprecated from twig3.9 and will be removed in twig4.
I open this issue to start a conversation and possibly find solution for yielding support for twig4.
Twig 3.9 introduced the
use_yield
option, which will be the only strategy in twig4. Read the changelog here.Pull request #154 added support for the internal changes that were made in 3.9, but still relies on echo and the output buffer. (use_yield is off).
The
yii2-twig
library creates twig functions for yii's View helper functions (beginBody, endBody, beginPage etc...), which will echo their contents, which does not work intwig3.9
with use_yield. Note: endPage will modify the current output buffer (replacing the placeholders), which already has a workaround from2.5.0
.I think a solution needs to be found to support yielding, because
echo
is deprecated fromtwig3.9
and will be removed intwig4
.CC: @schmunk42 @eluhr
The text was updated successfully, but these errors were encountered: