From 24a789c9d8fe87e0a8d2137f4dc447f1ce179b5c Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 2 Dec 2016 11:29:05 +0100 Subject: [PATCH 1/4] Updated the "Symfony Config" panel in the profiler --- .../views/Collector/config.html.twig | 25 ++++++++++++ .../views/Profiler/profiler.css.twig | 4 ++ .../DataCollector/ConfigDataCollector.php | 39 +++++++++++++++++++ 3 files changed, 68 insertions(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index 46234cda974dd..e48029aeb0950 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -181,6 +181,31 @@ {% endif %} + + {% 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' } %} + + + + + + + + + + + + + + + + + +
Symfony StatusBugs are fixed untilSecurity issues are fixed until
+ {{ symfony_status[collector.symfonystate]|upper }} + {{ collector.symfonyeom }}{{ collector.symfonyeol }} + View roadmap +
{% endif %}

PHP Configuration

diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig index bb5aea2f444ae..bbd8b46e1c575 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig @@ -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 { diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 13db7c4314809..97085cec9b8d8 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -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'); } } @@ -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. * From 50bc99592d67713201a798c08ab00bb0b24be9f1 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 2 Dec 2016 11:35:07 +0100 Subject: [PATCH 2/4] Fixed CS issues --- .../Component/HttpKernel/DataCollector/ConfigDataCollector.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 97085cec9b8d8..b0524d857b49f 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -131,10 +131,9 @@ public function getSymfonyState() return $this->data['symfony_state']; } - /** * Returns the minor Symfony version used (without patch numbers of extra - * suffix like "RC", "beta", etc.) + * suffix like "RC", "beta", etc.). * * @return string */ From 1236e48e3858b59a216ed3d43e2af20d3cd0b5f3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 2 Dec 2016 11:37:55 +0100 Subject: [PATCH 3/4] Improve the grammar of the messages --- .../Resources/views/Collector/config.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index e48029aeb0950..c96bb92b9ffb1 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -188,8 +188,8 @@ Symfony Status - Bugs are fixed until - Security issues are fixed until + Bugs {{ collector.symfonystate in ['eom', 'eol'] ? 'were' : 'are' }} fixed until + Security issues {{ collector.symfonystate == 'eol' ? 'were' : 'are' }} fixed until From cd67fb8e2c2892b8540d5cfb21788350e4c44cbc Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 2 Dec 2016 12:07:59 +0100 Subject: [PATCH 4/4] Always use https --- .../Resources/views/Collector/config.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig index c96bb92b9ffb1..20160c1a4e2f5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -201,7 +201,7 @@ {{ collector.symfonyeom }} {{ collector.symfonyeol }} - View roadmap + View roadmap