8000 Fixes the stack traces of the deprecation logs · symfony/symfony@09f4895 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09f4895

Browse files
committed
Fixes the stack traces of the deprecation logs
1 parent 074a4bf commit 09f4895

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
{% if index == 2 %}
170170
<ul class="sf-call-stack" id="{{ id }}" class="hidden">
171171
{% endif %}
172+
172173
{% if call.class is defined %}
173174
{% set from = call.class|abbr_class ~ '::' ~ call.function|abbr_method() %}
174175
{% elseif call.function is defined %}
@@ -179,7 +180,14 @@
179180
{% set from = '-' %}
180181
{% endif %}
181182

182-
<li><span class="text-small">Called from</span> {{ call.file is defined and call.line is defined ? call.file|format_file(call.line, from) : from|raw }}</li>
183+
{% set file_name = (call.file is defined and call.line is defined) ? call.file|replace({'\\': '/'})|split('/')|last %}
184+
185+
<li>
186+
{{ from|raw }}
187+
{% if file_name %}
188+
<span class="text-small">(called from {{ call.file|format_file(call.line, file_name)|raw }})</span>
189+
{% endif %}
190+
</li>
183191

184192
{% if index == stack|length - 1 %}
185193
</ul>

0 commit comments

Comments
 (0)
0