Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0e454f3

Browse filesBrowse files
javiereguiluzfabpot
authored andcommitted
Updated the "Symfony Config" panel in the profiler
1 parent e765849 commit 0e454f3
Copy full SHA for 0e454f3

File tree

3 files changed

+67
-0
lines changed
Filter options

3 files changed

+67
-0
lines changed

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,31 @@
181181
</div>
182182
{% endif %}
183183
</div>
184+
185+
{% set symfony_status = { dev: 'Unstable Version', stable: 'Stable Version', eom: 'Maintenance Ended', eol: 'Version Expired' } %}
186+
{% set symfony_status_class = { dev: 'warning', stable: 'success', eom: 'warning', eol: 'error' } %}
187+
<table>
188+
<thead class="small">
189+
<tr>
190+
<th>Symfony Status</th>
191+
<th>Bugs {{ collector.symfonystate in ['eom', 'eol'] ? 'were' : 'are' }} fixed until</th>
192+
<th>Security issues {{ collector.symfonystate == 'eol' ? 'were' : 'are' }} fixed until</th>
193+
<th></th>
194+
</tr>
195+
</thead>
196+
<tbody>
197+
<tr>
198+
<td class="font-normal">
199+
<span class="label status-{{ symfony_status_class[collector.symfonystate] }}">{{ symfony_status[collector.symfonystate]|upper }}</span>
200+
</td>
201+
<td class="font-normal">{{ collector.symfonyeom }}</td>
202+
<td class="font-normal">{{ collector.symfonyeol }}</td>
203+
<td class="font-normal">
204+
<a href="https://symfony.com/roadmap?version={{ collector.symfonyminorversion }}#checker">View roadmap</a>
205+
</td>
206+
</tr>
207+
</tbody>
208+
</table>
184209
{% endif %}
185210

186211
<h2>PHP Configuration</h2>

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ table thead th {
166166
table thead th.key {
167167
width: 19%;
168168
}
169+
table thead.small th {
170+
font-size: 12px;
171+
padding: 4px 10px;
172+
}
169173

170174
table tbody th,
171175
table tbody td {

‎src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ public function collect(Request $request, Response $response, \Exception $except
8383
}
8484

8585
$this->data['symfony_state'] = $this->determineSymfonyState();
86+
$this->data['symfony_minor_version'] = sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION);
87+
$eom = \DateTime::createFromFormat('m/Y', Kernel::END_OF_MAINTENANCE);
88+
$eol = \DateTime::createFromFormat('m/Y', Kernel::END_OF_LIFE);
89+
$this->data['symfony_eom'] = $eom->format('F Y');
90+
$this->data['symfony_eol'] = $eol->format('F Y');
8691
}
8792
}
8893

@@ -126,6 +131,39 @@ public function getSymfonyState()
126131
return $this->data['symfony_state'];
127132
}
128133

134+
/**
135+
* Returns the minor Symfony version used (without patch numbers of extra
136+
* suffix like "RC", "beta", etc.).
137+
*
138+
* @return string
139+
*/
140+
public function getSymfonyMinorVersion()
141+
{
142+
return $this->data['symfony_minor_version'];
143+
}
144+
145+
/**
146+
* Returns the human redable date when this Symfony version ends its
147+
* maintenance period.
148+
*
149+
* @return string
150+
*/
151+
public function getSymfonyEom()
152+
{
153+
return $this->data['symfony_eom'];
154+
}
155+
156+
/**
157+
* Returns the human redable date when this Symfony version reaches its
158+
* "end of life" and won't receive bugs or security fixes.
159+
*
160+
* @return string
161+
*/
162+
public function getSymfonyEol()
163+
{
164+
return $this->data['symfony_eol'];
165+
}
166+
129167
/**
130168
* Gets the PHP version.
131169
*

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.