Skip to content

Commit ccf6e4a

Browse files
committed
favor Twig's include() function over the include tag
1 parent 347d26e commit ccf6e4a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/command.html.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<p>No arguments were set</p>
7676
</div>
7777
{% else %}
78-
{% include '@WebProfiler/Profiler/table.html.twig' with { data: collector.arguments, labels: ['Argument', 'Value'], maxDepth: 2 } only %}
78+
{{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.arguments, labels: ['Argument', 'Value'], maxDepth: 2 }, with_context=false) }}
7979
{% endif %}
8080

8181
<h3>Options</h3>
@@ -85,7 +85,7 @@
8585
<p>No options were set</p>
8686
</div>
8787
{% else %}
88-
{% include '@WebProfiler/Profiler/table.html.twig' with { data: collector.options, labels: ['Option', 'Value'], maxDepth: 2 } only %}
88+
{{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.options, labels: ['Option', 'Value'], maxDepth: 2 }, with_context=false) }}
8989
{% endif %}
9090

9191
{% if collector.interactive %}
@@ -100,7 +100,7 @@
100100
<p>No inputs were set</p>
101101
</div>
102102
{% else %}
103-
{% include '@WebProfiler/Profiler/table.html.twig' with { data: collector.interactiveInputs, labels: ['Input', 'Value'], maxDepth: 2 } only %}
103+
{{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.interactiveInputs, labels: ['Input', 'Value'], maxDepth: 2 }, with_context=false) }}
104104
{% endif %}
105105
{% endif %}
106106

@@ -111,7 +111,7 @@
111111
<p>No application inputs are set</p>
112112
</div>
113113
{% else %}
114-
{% include '@WebProfiler/Profiler/table.html.twig' with { data: collector.applicationInputs, labels: ['Input', 'Value'], maxDepth: 2 } only %}
114+
{{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.applicationInputs, labels: ['Input', 'Value'], maxDepth: 2 }, with_context=false) }}
115115
{% endif %}
116116
</div>
117117
</div>

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
{% if profile is defined %}
1010
{% set request_collector = profile.collectors.request|default(false) %}
1111

12-
{% include '@WebProfiler/Profiler/_%s_summary.html.twig'|format(profile_type) with {
12+
{{ include('@WebProfiler/Profiler/_%s_summary.html.twig'|format(profile_type), {
1313
profile: profile,
1414
command_collector: profile.collectors.command|default(false) ,
1515
request_collector: request_collector,
1616
request: request,
1717
token: token
18-
} only %}
18+
}, with_context=false) }}
1919
{% endif %}
2020
{% endblock %}
2121
</div>

0 commit comments

Comments
 (0)