Updated the "Symfony Config" panel in the profiler
This commit is contained in:
parent
e765849215
commit
0e454f3021
@ -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 {{ collector.symfonystate in ['eom', 'eol'] ? 'were' : 'are' }} fixed until</th>
|
||||
<th>Security issues {{ collector.symfonystate == 'eol' ? 'were' : '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="https://symfony.com/roadmap?version={{ collector.symfonyminorversion }}#checker">View roadmap</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<h2>PHP Configuration</h2>
|
||||
|
@ -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 {
|
||||
|
@ -83,6 +83,11 @@ class ConfigDataCollector extends DataCollector
|
||||
}
|
||||
|
||||
$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');
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,6 +131,39 @@ class ConfigDataCollector extends DataCollector
|
||||
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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user