Skip to content

Commit 96a5cdf

Browse files
committed
fixup command panel
1 parent 4096902 commit 96a5cdf

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\WebProfilerBundle\Controller;
1313

14-
use Symfony\Bundle\FrameworkBundle\Debug\CliRequest;
1514
use Symfony\Bundle\FullStack;
1615
use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler;
1716
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
@@ -88,10 +87,7 @@ public function panelAction(Request $request, string $token): Response
8887
}
8988

9089
if (null === $profileType) {
91-
$profileType = match ($profile->getVirtualType()) {
92-
CliRequest::class => 'command',
93-
default => 'request',
94-
};
90+
$profileType = $profile->getVirtualType() ?? 'request';
9591
}
9692

9793
if (null === $panel) {
@@ -423,10 +419,7 @@ private function renderWithCspNonces(Request $request, string $template, array $
423419
*/
424420
private function findProfiles(?string $ip = null, ?string $url = null, ?string $limit = null, ?string $method = null, ?string $start = null, ?string $end = null, string $statusCode = null, string $profileType = null): array
425421
{
426-
$virtualType = match ($profileType) {
427-
'command' => CliRequest::class,
428-
default => null,
429-
};
422+
$virtualType = 'request' === $profileType ? null : $profileType;
430423

431424
return $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode, $virtualType);
432425
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy