File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ use the full path of the template where the macro is defined:
382382 <twig:Alert>
383383 {# ❌ this won't work #}
384384 {% from _self import message_formatter %}
385-
385+
386386 {# ✅ this works as expected #}
387387 {% from 'path/of/this/template.html.twig' import message_formatter %}
388388
@@ -1553,6 +1553,12 @@ are called additional times, the cached value is used.
15531553 Computed methods only work for component methods with no required
15541554 arguments.
15551555
1556+ .. warning ::
1557+
1558+ Ensure to not use the ``ExposeInTemplate `` attribute on a computed method,
1559+ otherwise the method will be called twice instead of only once, leading to
1560+ unnecessary overhead and potential performance issues.
1561+
15561562Events
15571563------
15581564
You can’t perform that action at this time.
0 commit comments