10000 Updated the "Symfony Config" panel in the profiler by javiereguiluz · Pull Request #20722 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Updated the "Symfony Config" panel in the profiler #20722

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
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Updated the "Symfony Config" panel in the profiler
  • Loading branch information
javiereguiluz committed Dec 2, 2016
commit 24a789c9d8fe87e0a8d2137f4dc447f1ce179b5c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,31 @@
</div>
{% endif %}
</div>

{% set symfony_status = { dev: 'Unstable Version', stable: 'Stable Version', eom: 'Maintenance Ended', eol: 'Version Expired' } %}
{% set symfony_status_class = { dev: 'warning', stable: 'success', eom: 'warning', eol: 'error' } %}
<table>
<thead class="small">
<tr>
<th>Symfony Status</th>
<th>Bugs are fixed until</th>
<th>Security issues are fixed until</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td class="font-normal">
<span class="label status-{{ symfony_status_class[collector.symfonystate] }}">{{ symfony_status[collector.symfonystate]|upper }}</span>
</td>
<td class="font-normal">{{ collector.symfonyeom }}</td>
<td class="font-normal">{{ collector.symfonyeol }}</td>
<td class="font-normal">
<a href="//symfony.com/roadmap?version={{ collector.symfonyminorversion }}#checker">View roadmap</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use a https link all the time here

</td>
</tr>
</tbody>
</table>
{% endif %}

<h2>PHP Configuration</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ table thead th {
table thead th.key {
width: 19%;
}
table thead.small th {
font-size: 12px;
padding: 4px 10px;
}

table tbody th,
table tbody td {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public function collect(Request $request, Response $response, \Exception $except
}

$this->data['symfony_state'] = $this->determineSymfonyState();
$this->data['symfony_minor_version'] = sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION);
$eom = \DateTime::createFromFormat('m/Y', Kernel::END_OF_MAINTENANCE);
$eol = \DateTime::createFromFormat('m/Y', Kernel::END_OF_LIFE);
$this->data['symfony_eom'] = $eom->format('F Y');
$this->data['symfony_eol'] = $eol->format('F Y');
}
}

Expand Down Expand Up @@ -126,6 +131,40 @@ public function getSymfonyState()
return $this->data['symfony_state'];
}


/**
* Returns the minor Symfony version used (without patch numbers of extra
* suffix like "RC", "beta", etc.)
*
* @return string
*/
public function getSymfonyMinorVersion()
{
return $this->data['symfony_minor_version'];
}

/**
* Returns the human redable date when this Symfony version ends its
* maintenance period.
*
* @return string
*/
public function getSymfonyEom()
{
return $this->data['symfony_eom'];
}

/**
* Returns the human redable date when this Symfony version reaches its
* "end of life" and won't receive bugs or security fixes.
*
* @return string
*/
public function getSymfonyEol()
{
return $this->data['symfony_eol'];
}

/**
* Gets the PHP version.
*
Expand Down
0