8000 Do not display duration if there is none · MatTheCat/symfony@b5f34b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5f34b8

Browse files
committed
Do not display duration if there is none
1 parent f6b2dae commit b5f34b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318

319319
<tr>
320320
<td class="font-normal">{{ profiler_dump(listener.stub) }}</td>
321-
<td class="no-wrap">{{ '%0.2f'|format(listener.time * 1000) }} ms</td>
321+
<td class="no-wrap">{{ listener.time is null ? '(none)' : '%0.2f ms'|format(listener.time * 1000) }}</td>
322322
<td class="font-normal">{{ listener.response ? profiler_dump(listener.response) : '(none)' }}</td>
323323
</tr>
324324

@@ -362,7 +362,7 @@
362362
<td class="font-normal">{{ profiler_dump(authenticator.stub) }}</td>
363363
<td class="no-wrap">{{ source('@WebProfiler/Icon/' ~ (authenticator.supports ? 'yes' : 'no') ~ '.svg') }}</td>
364364
<td class="no-wrap">{{ authenticator.authenticated is not null ? source('@WebProfiler/Icon/' ~ (authenticator.authenticated ? 'yes' : 'no') ~ '.svg') : '' }}</td>
365-
<td class="no-wrap">{{ '%0.2f'|format(authenticator.duration * 1000) }} ms</td>
365+
<td class="no-wrap">{{ authenticator.duration is null ? '(none)' : '%0.2f ms'|format(authenticator.duration * 1000) }}</td>
366366
<td class="font-normal">{{ authenticator.passport ? profiler_dump(authenticator.passport) : '(none)' }}</td>
367367
<td class="font-normal">
368368
{% for badge in authenticator.badges ?? [] %}

src/Symfony/Component/Security/Http/Authenticator/Debug/TraceableAuthenticatorManagerListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function authenticate(RequestEvent $event): void
5252
'supports' => false,
5353
'stub' => $this->hasVardumper ? new ClassStub($skippedAuthenticator::class) : $skippedAuthenticator::class,
5454
'passport' => null,
55-
'duration' => 0,
55+
'duration' => null,
5656
'authenticated' => null,
5757
'badges' => [],
5858
];

0 commit comments

Comments
 (0)
0