8000 [WebProfilerBundle] Show the kernel class in the profiler instead of the kernel name by javiereguiluz · Pull Request #24717 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[WebProfilerBundle] Show the kernel class in the profiler instead of the kernel name #24717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Show the kernel class in the profiler instead of the kernel name
  • Loading branch information
javiereguiluz committed Oct 28, 2017
commit 150cfd559f0b431c97c2df3866a272f1f0f0c3a2
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
</span>
</div>

{% if 'n/a' is not same as(collector.appname) %}
{% if 'n/a' is not same as(collector.kernelclass) %}
<div class="sf-toolbar-info-piece">
<b>Kernel name</b>
<span>{{ collector.appname }}</span>
<b>Kernel class</b>
<span>{{ collector.kernelclass }}</span>
</div>
{% endif %}

Expand Down Expand Up @@ -161,10 +161,10 @@
<span class="label">Symfony version</span>
</div>

{% if 'n/a' != collector.appname %}
{% if 'n/a' != collector.kernelclass %}
<div class="metric">
<span class="value">{{ collector.appname }}</span>
<span class="label">Application name</span>
<span class="value">{{ collector.kernelclass }}</span>
<span class="label">Kernel class</span>
</div>
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function collect(Request $request, Response $response, \Exception $except
'token' => $response->headers->get('X-Debug-Token'),
'symfony_version' => Kernel::VERSION,
'symfony_state' => 'unknown',
'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a',
'kernel_class' => isset($this->kernel) ? get_class($this->kernel) : 'n/a',
'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a',
'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a',
'php_version' => PHP_VERSION,
Expand Down Expand Up @@ -116,6 +116,11 @@ public function getApplicationVersion()
return $this->data['app_version'];
}

public function getKernelClass()
{
return $this->data['kernel_class'];
}

/**
* Gets the token.
*
Expand Down
0