From ebe0889a38a4eda0252fd9feb2843e152890fd83 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Apr 2015 10:55:07 +0200 Subject: [PATCH 001/976] Revert "removed 3.0 constraints from 2.7 composer files" This reverts commit 5503804cf91f4ede81b94b34609653c013139038. --- src/Symfony/Bridge/Doctrine/composer.json | 20 ++++---- src/Symfony/Bridge/Monolog/composer.json | 8 +-- src/Symfony/Bridge/ProxyManager/composer.json | 6 +-- src/Symfony/Bridge/Swiftmailer/composer.json | 2 +- src/Symfony/Bridge/Twig/composer.json | 30 +++++------ src/Symfony/Bundle/DebugBundle/composer.json | 12 ++--- .../Bundle/FrameworkBundle/composer.json | 50 +++++++++---------- .../Bundle/SecurityBundle/composer.json | 34 ++++++------- src/Symfony/Bundle/TwigBundle/composer.json | 22 ++++---- .../Bundle/WebProfilerBundle/composer.json | 16 +++--- src/Symfony/Component/Asset/composer.json | 2 +- .../Component/BrowserKit/composer.json | 8 +-- .../Component/ClassLoader/composer.json | 4 +- src/Symfony/Component/Config/composer.json | 4 +- src/Symfony/Component/Console/composer.json | 6 +-- .../Component/CssSelector/composer.json | 2 +- src/Symfony/Component/Debug/composer.json | 8 +-- .../DependencyInjection/composer.json | 8 +-- .../Component/DomCrawler/composer.json | 4 +- .../Component/EventDispatcher/composer.json | 10 ++-- .../ExpressionLanguage/composer.json | 2 +- .../Component/Filesystem/composer.json | 2 +- src/Symfony/Component/Finder/composer.json | 2 +- src/Symfony/Component/Form/composer.json | 18 +++---- .../Component/HttpFoundation/composer.json | 4 +- .../Component/HttpKernel/composer.json | 34 ++++++------- src/Symfony/Component/Intl/composer.json | 4 +- src/Symfony/Component/Locale/composer.json | 4 +- .../Component/OptionsResolver/composer.json | 2 +- src/Symfony/Component/Process/composer.json | 2 +- .../Component/PropertyAccess/composer.json | 2 +- src/Symfony/Component/Routing/composer.json | 10 ++-- .../Component/Security/Acl/composer.json | 4 +- .../Component/Security/Core/composer.json | 12 ++--- .../Component/Security/Csrf/composer.json | 6 +-- .../Component/Security/Http/composer.json | 14 +++--- src/Symfony/Component/Security/composer.json | 18 +++---- .../Component/Serializer/composer.json | 8 +-- src/Symfony/Component/Stopwatch/composer.json | 2 +- .../Component/Templating/composer.json | 2 +- .../Component/Translation/composer.json | 6 +-- src/Symfony/Component/Validator/composer.json | 16 +++--- src/Symfony/Component/VarDumper/composer.json | 2 +- src/Symfony/Component/Yaml/composer.json | 2 +- 44 files changed, 217 insertions(+), 217 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 2037d6d0bd22..52f702469b97 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -20,16 +20,16 @@ "doctrine/common": "~2.3" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.2", - "symfony/dependency-injection": "~2.2", - "symfony/form": "~2.7", - "symfony/http-kernel": "~2.2", - "symfony/property-access": "~2.3", - "symfony/security": "~2.2", - "symfony/expression-language": "~2.2", - "symfony/validator": "~2.5,>=2.5.5", - "symfony/translation": "~2.0,>=2.0.5", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/stopwatch": "~2.2|~3.0.0", + "symfony/dependency-injection": "~2.2|~3.0.0", + "symfony/form": "~2.7|~3.0.0", + "symfony/http-kernel": "~2.2|~3.0.0", + "symfony/property-access": "~2.3|~3.0.0", + "symfony/security": "~2.2|~3.0.0", + "symfony/expression-language": "~2.2|~3.0.0", + "symfony/validator": "~2.5,>=2.5.5|~3.0.0", + "symfony/translation": "~2.0,>=2.0.5|~3.0.0", "doctrine/data-fixtures": "1.0.*", "doctrine/dbal": "~2.2", "doctrine/orm": "~2.2,>=2.2.3" diff --git a/src/Symfony/Bridge/Monolog/composer.json b/src/Symfony/Bridge/Monolog/composer.json index 939baf0644b4..bf81763b638e 100644 --- a/src/Symfony/Bridge/Monolog/composer.json +++ b/src/Symfony/Bridge/Monolog/composer.json @@ -20,10 +20,10 @@ "monolog/monolog": "~1.11" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/http-kernel": "~2.4", - "symfony/console": "~2.4", - "symfony/event-dispatcher": "~2.2" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/http-kernel": "~2.4|~3.0.0", + "symfony/console": "~2.4|~3.0.0", + "symfony/event-dispatcher": "~2.2|~3.0.0" }, "suggest": { "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.", diff --git a/src/Symfony/Bridge/ProxyManager/composer.json b/src/Symfony/Bridge/ProxyManager/composer.json index ea7e8aba9721..123b93b03e1f 100644 --- a/src/Symfony/Bridge/ProxyManager/composer.json +++ b/src/Symfony/Bridge/ProxyManager/composer.json @@ -17,12 +17,12 @@ ], "require": { "php": ">=5.3.9", - "symfony/dependency-injection": "~2.3", + "symfony/dependency-injection": "~2.3|~3.0.0", "ocramius/proxy-manager": "~0.4|~1.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/config": "~2.3" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/config": "~2.3|~3.0.0" }, "autoload": { "psr-0": { diff --git a/src/Symfony/Bridge/Swiftmailer/composer.json b/src/Symfony/Bridge/Swiftmailer/composer.json index 2d2bf35f2427..49ef1f572370 100644 --- a/src/Symfony/Bridge/Swiftmailer/composer.json +++ b/src/Symfony/Bridge/Swiftmailer/composer.json @@ -20,7 +20,7 @@ "swiftmailer/swiftmailer": ">=4.2.0,<6.0-dev" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "suggest": { "symfony/http-kernel": "" diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index f27437fa73ca..3bc4bc8e2a8a 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -20,21 +20,21 @@ "twig/twig": "~1.18" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/asset": "~2.7", - "symfony/finder": "~2.3", - "symfony/form": "~2.7", - "symfony/http-kernel": "~2.3", - "symfony/intl": "~2.3", - "symfony/routing": "~2.2", - "symfony/templating": "~2.1", - "symfony/translation": "~2.7", - "symfony/yaml": "~2.0,>=2.0.5", - "symfony/security": "~2.6", - "symfony/stopwatch": "~2.2", - "symfony/console": "~2.7", - "symfony/var-dumper": "~2.6", - "symfony/expression-language": "~2.4" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/asset": "~2.7|~3.0.0", + "symfony/finder": "~2.3|~3.0.0", + "symfony/form": "~2.7|~3.0.0", + "symfony/http-kernel": "~2.3|~3.0.0", + "symfony/intl": "~2.3|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/templating": "~2.1|~3.0.0", + "symfony/translation": "~2.7|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0", + "symfony/security": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.2|~3.0.0", + "symfony/console": "~2.7|~3.0.0", + "symfony/var-dumper": "~2.6|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0" }, "suggest": { "symfony/finder": "", diff --git a/src/Symfony/Bundle/DebugBundle/composer.json b/src/Symfony/Bundle/DebugBundle/composer.json index ca55aba84c4b..3e669094c29b 100644 --- a/src/Symfony/Bundle/DebugBundle/composer.json +++ b/src/Symfony/Bundle/DebugBundle/composer.json @@ -17,14 +17,14 @@ ], "require": { "php": ">=5.3.9", - "symfony/http-kernel": "~2.6", - "symfony/twig-bridge": "~2.6", - "symfony/var-dumper": "~2.6" + "symfony/http-kernel": "~2.6|~3.0.0", + "symfony/twig-bridge": "~2.6|~3.0.0", + "symfony/var-dumper": "~2.6|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/config": "~2.3", - "symfony/dependency-injection": "~2.3" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/config": "~2.3|~3.0.0", + "symfony/dependency-injection": "~2.3|~3.0.0" }, "suggest": { "symfony/config": "For service container configuration", diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index c48c702268a1..cdd66ef59002 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -17,36 +17,36 @@ ], "require": { "php": ">=5.3.9", - "symfony/asset": "~2.7", + "symfony/asset": "~2.7|~3.0.0", "symfony/dependency-injection" : "~2.6,>=2.6.2", "symfony/config" : "~2.4", - "symfony/event-dispatcher": "~2.5", - "symfony/http-foundation": "~2.4.9|~2.5,>=2.5.4", - "symfony/http-kernel": "~2.7", - "symfony/filesystem": "~2.3", - "symfony/routing": "~2.6,>2.6.4", - "symfony/security-core": "~2.6", - "symfony/security-csrf": "~2.6", - "symfony/stopwatch": "~2.3", - "symfony/templating": "~2.1", - "symfony/translation": "~2.7", + "symfony/event-dispatcher": "~2.5|~3.0.0", + "symfony/http-foundation": "~2.4.9|~2.5,>=2.5.4|~3.0.0", + "symfony/http-kernel": "~2.7|~3.0.0", + "symfony/filesystem": "~2.3|~3.0.0", + "symfony/routing": "~2.6,>2.6.4|~3.0.0", + "symfony/security-core": "~2.6|~3.0.0", + "symfony/security-csrf": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0", + "symfony/templating": "~2.1|~3.0.0", + "symfony/translation": "~2.7|~3.0.0", "doctrine/annotations": "~1.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/browser-kit": "~2.4", - "symfony/console": "~2.6", - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/dom-crawler": "~2.0,>=2.0.5", - "symfony/finder": "~2.0,>=2.0.5", - "symfony/intl": "~2.3", - "symfony/security": "~2.6", - "symfony/form": "~2.7", - "symfony/class-loader": "~2.1", - "symfony/expression-language": "~2.6", - "symfony/process": "~2.0,>=2.0.5", - "symfony/validator": "~2.5", - "symfony/yaml": "~2.0,>=2.0.5" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/browser-kit": "~2.4|~3.0.0", + "symfony/console": "~2.6|~3.0.0", + "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", + "symfony/finder": "~2.0,>=2.0.5|~3.0.0", + "symfony/intl": "~2.3|~3.0.0", + "symfony/security": "~2.6|~3.0.0", + "symfony/form": "~2.7|~3.0.0", + "symfony/class-loader": "~2.1|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/process": "~2.0,>=2.0.5|~3.0.0", + "symfony/validator": "~2.5|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" }, "suggest": { "symfony/console": "For using the console commands", diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index 00c70a6d2f30..3e4a91761c0c 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -17,25 +17,25 @@ ], "require": { "php": ">=5.3.9", - "symfony/security": "~2.7", - "symfony/http-kernel": "~2.2" + "symfony/security": "~2.7|~3.0.0", + "symfony/http-kernel": "~2.2|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/browser-kit": "~2.4", - "symfony/console": "~2.7", - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6,>=2.6.6", - "symfony/dom-crawler": "~2.0,>=2.0.5", - "symfony/form": "~2.7", - "symfony/framework-bundle": "~2.7", - "symfony/http-foundation": "~2.3", - "symfony/twig-bundle": "~2.7", - "symfony/twig-bridge": "~2.7", - "symfony/process": "~2.0,>=2.0.5", - "symfony/validator": "~2.5", - "symfony/yaml": "~2.0,>=2.0.5", - "symfony/expression-language": "~2.6", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/browser-kit": "~2.4|~3.0.0", + "symfony/console": "~2.7|~3.0.0", + "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6,>=2.6.6|~3.0.0", + "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", + "symfony/form": "~2.7|~3.0.0", + "symfony/framework-bundle": "~2.7|~3.0.0", + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/twig-bundle": "~2.7|~3.0.0", + "symfony/twig-bridge": "~2.7|~3.0.0", + "symfony/process": "~2.0,>=2.0.5|~3.0.0", + "symfony/validator": "~2.5|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", "doctrine/doctrine-bundle": "~1.2", "twig/twig": "~1.12", "ircmaxell/password-compat": "~1.0" diff --git a/src/Symfony/Bundle/TwigBundle/composer.json b/src/Symfony/Bundle/TwigBundle/composer.json index 0aed024910de..cb8a143bd562 100644 --- a/src/Symfony/Bundle/TwigBundle/composer.json +++ b/src/Symfony/Bundle/TwigBundle/composer.json @@ -17,20 +17,20 @@ ], "require": { "php": ">=5.3.9", - "symfony/asset": "~2.7", - "symfony/twig-bridge": "~2.7", - "symfony/http-foundation": "~2.5", + "symfony/asset": "~2.7|~3.0.0", + "symfony/twig-bridge": "~2.7|~3.0.0", + "symfony/http-foundation": "~2.5|~3.0.0", "symfony/http-kernel": "~2.7" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.2", - "symfony/dependency-injection": "~2.6,>=2.6.6", - "symfony/expression-language": "~2.4", - "symfony/config": "~2.2", - "symfony/routing": "~2.1", - "symfony/templating": "~2.1", - "symfony/framework-bundle": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/stopwatch": "~2.2|~3.0.0", + "symfony/dependency-injection": "~2.6,>=2.6.6|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/routing": "~2.1|~3.0.0", + "symfony/templating": "~2.1|~3.0.0", + "symfony/framework-bundle": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Bundle\\TwigBundle\\": "" } diff --git a/src/Symfony/Bundle/WebProfilerBundle/composer.json b/src/Symfony/Bundle/WebProfilerBundle/composer.json index 4db37bab1a78..2af5c45d1d74 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/composer.json +++ b/src/Symfony/Bundle/WebProfilerBundle/composer.json @@ -17,16 +17,16 @@ ], "require": { "php": ">=5.3.9", - "symfony/http-kernel": "~2.4", - "symfony/routing": "~2.2", - "symfony/twig-bridge": "~2.7" + "symfony/http-kernel": "~2.4|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/twig-bridge": "~2.7|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/config": "~2.2", - "symfony/console": "~2.3", - "symfony/dependency-injection": "~2.2", - "symfony/stopwatch": "~2.2" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/console": "~2.3|~3.0.0", + "symfony/dependency-injection": "~2.2|~3.0.0", + "symfony/stopwatch": "~2.2|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Bundle\\WebProfilerBundle\\": "" } diff --git a/src/Symfony/Component/Asset/composer.json b/src/Symfony/Component/Asset/composer.json index 58319bd33cd1..177a12970a91 100644 --- a/src/Symfony/Component/Asset/composer.json +++ b/src/Symfony/Component/Asset/composer.json @@ -22,7 +22,7 @@ "symfony/http-foundation": "" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", + "symfony/phpunit-bridge": "~2.7|~3.0.0", "symfony/http-foundation": "~2.4" }, "autoload": { diff --git a/src/Symfony/Component/BrowserKit/composer.json b/src/Symfony/Component/BrowserKit/composer.json index e5488e6ae76c..cbfc5a681d2d 100644 --- a/src/Symfony/Component/BrowserKit/composer.json +++ b/src/Symfony/Component/BrowserKit/composer.json @@ -17,12 +17,12 @@ ], "require": { "php": ">=5.3.9", - "symfony/dom-crawler": "~2.0,>=2.0.5" + "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.0,>=2.0.5", - "symfony/css-selector": "~2.0,>=2.0.5" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/process": "~2.0,>=2.0.5|~3.0.0", + "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0" }, "suggest": { "symfony/process": "" diff --git a/src/Symfony/Component/ClassLoader/composer.json b/src/Symfony/Component/ClassLoader/composer.json index 519e2fa22598..409435c7a193 100644 --- a/src/Symfony/Component/ClassLoader/composer.json +++ b/src/Symfony/Component/ClassLoader/composer.json @@ -20,8 +20,8 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/finder": "~2.0,>=2.0.5" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/finder": "~2.0,>=2.0.5|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\ClassLoader\\": "" } diff --git a/src/Symfony/Component/Config/composer.json b/src/Symfony/Component/Config/composer.json index bd5409da664c..8ba3609687d0 100644 --- a/src/Symfony/Component/Config/composer.json +++ b/src/Symfony/Component/Config/composer.json @@ -17,10 +17,10 @@ ], "require": { "php": ">=5.3.9", - "symfony/filesystem": "~2.3" + "symfony/filesystem": "~2.3|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\Config\\": "" } diff --git a/src/Symfony/Component/Console/composer.json b/src/Symfony/Component/Console/composer.json index 6f78399623ed..f11d243b0adc 100644 --- a/src/Symfony/Component/Console/composer.json +++ b/src/Symfony/Component/Console/composer.json @@ -19,9 +19,9 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/event-dispatcher": "~2.1", - "symfony/process": "~2.1", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0", "psr/log": "~1.0" }, "suggest": { diff --git a/src/Symfony/Component/CssSelector/composer.json b/src/Symfony/Component/CssSelector/composer.json index 723b855fc34e..004c378aaac2 100644 --- a/src/Symfony/Component/CssSelector/composer.json +++ b/src/Symfony/Component/CssSelector/composer.json @@ -23,7 +23,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\CssSelector\\": "" } diff --git a/src/Symfony/Component/Debug/composer.json b/src/Symfony/Component/Debug/composer.json index 81aa1b3c6ca3..dc94bac7150e 100644 --- a/src/Symfony/Component/Debug/composer.json +++ b/src/Symfony/Component/Debug/composer.json @@ -23,10 +23,10 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/class-loader": "~2.2", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2", - "symfony/http-foundation": "~2.1" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0", + "symfony/http-foundation": "~2.1|~3.0.0" }, "suggest": { "symfony/http-foundation": "", diff --git a/src/Symfony/Component/DependencyInjection/composer.json b/src/Symfony/Component/DependencyInjection/composer.json index d0312ca3ec14..615e7b30d11a 100644 --- a/src/Symfony/Component/DependencyInjection/composer.json +++ b/src/Symfony/Component/DependencyInjection/composer.json @@ -19,10 +19,10 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/yaml": "~2.1", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.6" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/yaml": "~2.1|~3.0.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0" }, "conflict": { "symfony/expression-language": "<2.6" diff --git a/src/Symfony/Component/DomCrawler/composer.json b/src/Symfony/Component/DomCrawler/composer.json index ecb18a4e4f84..3390cbfa1540 100644 --- a/src/Symfony/Component/DomCrawler/composer.json +++ b/src/Symfony/Component/DomCrawler/composer.json @@ -19,8 +19,8 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/css-selector": "~2.3" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/css-selector": "~2.3|~3.0.0" }, "suggest": { "symfony/css-selector": "" diff --git a/src/Symfony/Component/EventDispatcher/composer.json b/src/Symfony/Component/EventDispatcher/composer.json index 8795917c3743..9b762b90fcdc 100644 --- a/src/Symfony/Component/EventDispatcher/composer.json +++ b/src/Symfony/Component/EventDispatcher/composer.json @@ -19,11 +19,11 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/config": "~2.0,>=2.0.5", - "symfony/stopwatch": "~2.3", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0", "psr/log": "~1.0" }, "suggest": { diff --git a/src/Symfony/Component/ExpressionLanguage/composer.json b/src/Symfony/Component/ExpressionLanguage/composer.json index 42ff70ec9a2a..98e51310c252 100644 --- a/src/Symfony/Component/ExpressionLanguage/composer.json +++ b/src/Symfony/Component/ExpressionLanguage/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\ExpressionLanguage\\": "" } diff --git a/src/Symfony/Component/Filesystem/composer.json b/src/Symfony/Component/Filesystem/composer.json index 10c705b77f66..5df8ae7d031d 100644 --- a/src/Symfony/Component/Filesystem/composer.json +++ b/src/Symfony/Component/Filesystem/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\Filesystem\\": "" } diff --git a/src/Symfony/Component/Finder/composer.json b/src/Symfony/Component/Finder/composer.json index 68873e7a25f9..c38df483ee37 100644 --- a/src/Symfony/Component/Finder/composer.json +++ b/src/Symfony/Component/Finder/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\Finder\\": "" } diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json index c12ecc9d51bf..9a0346c2b6cf 100644 --- a/src/Symfony/Component/Form/composer.json +++ b/src/Symfony/Component/Form/composer.json @@ -17,19 +17,19 @@ ], "require": { "php": ">=5.3.9", - "symfony/event-dispatcher": "~2.1", - "symfony/intl": "~2.3", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/intl": "~2.3|~3.0.0", "symfony/options-resolver": "~2.6", - "symfony/property-access": "~2.3" + "symfony/property-access": "~2.3|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", + "symfony/phpunit-bridge": "~2.7|~3.0.0", "doctrine/collections": "~1.0", - "symfony/validator": "~2.6", - "symfony/http-foundation": "~2.2", - "symfony/http-kernel": "~2.4", - "symfony/security-csrf": "~2.4", - "symfony/translation": "~2.0,>=2.0.5" + "symfony/validator": "~2.6|~3.0.0", + "symfony/http-foundation": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.4|~3.0.0", + "symfony/security-csrf": "~2.4|~3.0.0", + "symfony/translation": "~2.0,>=2.0.5|~3.0.0" }, "conflict": { "symfony/doctrine-bridge": "<2.7", diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index 348022a20c51..dd25e4b8079a 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -19,8 +19,8 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/expression-language": "~2.4" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" }, diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index 268b2ee0c664..b90cd1e01dae 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -17,28 +17,28 @@ ], "require": { "php": ">=5.3.9", - "symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2", - "symfony/http-foundation": "~2.5,>=2.5.4", + "symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2|~3.0.0", + "symfony/http-foundation": "~2.5,>=2.5.4|~3.0.0", "symfony/debug": "~2.6,>=2.6.2", "psr/log": "~1.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/browser-kit": "~2.3", - "symfony/class-loader": "~2.1", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/browser-kit": "~2.3|~3.0.0", + "symfony/class-loader": "~2.1|~3.0.0", "symfony/config": "~2.7", - "symfony/console": "~2.3", - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.2", - "symfony/dom-crawler": "~2.0,>=2.0.5", - "symfony/expression-language": "~2.4", - "symfony/finder": "~2.0,>=2.0.5", - "symfony/process": "~2.0,>=2.0.5", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.3", - "symfony/templating": "~2.2", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/var-dumper": "~2.6" + "symfony/console": "~2.3|~3.0.0", + "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.2|~3.0.0", + "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/finder": "~2.0,>=2.0.5|~3.0.0", + "symfony/process": "~2.0,>=2.0.5|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0", + "symfony/templating": "~2.2|~3.0.0", + "symfony/translation": "~2.0,>=2.0.5|~3.0.0", + "symfony/var-dumper": "~2.6|~3.0.0" }, "conflict": { "symfony/config": "<2.7" diff --git a/src/Symfony/Component/Intl/composer.json b/src/Symfony/Component/Intl/composer.json index cdc61f159cf9..e73247864f97 100644 --- a/src/Symfony/Component/Intl/composer.json +++ b/src/Symfony/Component/Intl/composer.json @@ -27,8 +27,8 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/filesystem": "~2.1" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/filesystem": "~2.1|~3.0.0" }, "suggest": { "ext-intl": "to use the component with locales other than \"en\"" diff --git a/src/Symfony/Component/Locale/composer.json b/src/Symfony/Component/Locale/composer.json index 290365a0f9dd..3adf477b2fd9 100644 --- a/src/Symfony/Component/Locale/composer.json +++ b/src/Symfony/Component/Locale/composer.json @@ -17,10 +17,10 @@ ], "require": { "php": ">=5.3.9", - "symfony/intl": "~2.3" + "symfony/intl": "~2.3|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\Locale\\": "" } diff --git a/src/Symfony/Component/OptionsResolver/composer.json b/src/Symfony/Component/OptionsResolver/composer.json index 1852bda6fa5f..51c68a3badb7 100644 --- a/src/Symfony/Component/OptionsResolver/composer.json +++ b/src/Symfony/Component/OptionsResolver/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\OptionsResolver\\": "" } diff --git a/src/Symfony/Component/Process/composer.json b/src/Symfony/Component/Process/composer.json index d6381528f27b..e6b1a6e4ea79 100644 --- a/src/Symfony/Component/Process/composer.json +++ b/src/Symfony/Component/Process/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\Process\\": "" } diff --git a/src/Symfony/Component/PropertyAccess/composer.json b/src/Symfony/Component/PropertyAccess/composer.json index 12a5e3c46ca7..5110239dbb6b 100644 --- a/src/Symfony/Component/PropertyAccess/composer.json +++ b/src/Symfony/Component/PropertyAccess/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\PropertyAccess\\": "" } diff --git a/src/Symfony/Component/Routing/composer.json b/src/Symfony/Component/Routing/composer.json index 5672ddcd709e..7f21b979ffa9 100644 --- a/src/Symfony/Component/Routing/composer.json +++ b/src/Symfony/Component/Routing/composer.json @@ -19,11 +19,11 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/config": "~2.7", - "symfony/http-foundation": "~2.3", - "symfony/yaml": "~2.0,>=2.0.5", - "symfony/expression-language": "~2.4", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/config": "~2.7|~3.0.0", + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", "psr/log": "~1.0" diff --git a/src/Symfony/Component/Security/Acl/composer.json b/src/Symfony/Component/Security/Acl/composer.json index feb666a998ce..2c0401fb29ab 100644 --- a/src/Symfony/Component/Security/Acl/composer.json +++ b/src/Symfony/Component/Security/Acl/composer.json @@ -17,10 +17,10 @@ ], "require": { "php": ">=5.3.9", - "symfony/security-core": "~2.4" + "symfony/security-core": "~2.4|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", + "symfony/phpunit-bridge": "~2.7|~3.0.0", "doctrine/common": "~2.2", "doctrine/dbal": "~2.2", "psr/log": "~1.0" diff --git a/src/Symfony/Component/Security/Core/composer.json b/src/Symfony/Component/Security/Core/composer.json index a9825c0fb853..f5e317902bc3 100644 --- a/src/Symfony/Component/Security/Core/composer.json +++ b/src/Symfony/Component/Security/Core/composer.json @@ -19,12 +19,12 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/event-dispatcher": "~2.1", - "symfony/expression-language": "~2.6", - "symfony/http-foundation": "~2.4", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/validator": "~2.5,>=2.5.5", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/http-foundation": "~2.4|~3.0.0", + "symfony/translation": "~2.0,>=2.0.5|~3.0.0", + "symfony/validator": "~2.5,>=2.5.5|~3.0.0", "psr/log": "~1.0", "ircmaxell/password-compat": "1.0.*" }, diff --git a/src/Symfony/Component/Security/Csrf/composer.json b/src/Symfony/Component/Security/Csrf/composer.json index 88c39b2fe14d..4d4ff6a94280 100644 --- a/src/Symfony/Component/Security/Csrf/composer.json +++ b/src/Symfony/Component/Security/Csrf/composer.json @@ -17,11 +17,11 @@ ], "require": { "php": ">=5.3.9", - "symfony/security-core": "~2.4" + "symfony/security-core": "~2.4|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/http-foundation": "~2.1" + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/http-foundation": "~2.1|~3.0.0" }, "suggest": { "symfony/http-foundation": "For using the class SessionTokenStorage." diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json index 4fa4f7685b80..80a038708d75 100644 --- a/src/Symfony/Component/Security/Http/composer.json +++ b/src/Symfony/Component/Security/Http/composer.json @@ -17,15 +17,15 @@ ], "require": { "php": ">=5.3.9", - "symfony/security-core": "~2.6", - "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.4", - "symfony/http-kernel": "~2.4" + "symfony/security-core": "~2.6|~3.0.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/http-foundation": "~2.4|~3.0.0", + "symfony/http-kernel": "~2.4|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/routing": "~2.2", - "symfony/security-csrf": "~2.4", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/security-csrf": "~2.4|~3.0.0", "psr/log": "~1.0" }, "suggest": { diff --git a/src/Symfony/Component/Security/composer.json b/src/Symfony/Component/Security/composer.json index 67fe8095b2ec..af7fad74f0a2 100644 --- a/src/Symfony/Component/Security/composer.json +++ b/src/Symfony/Component/Security/composer.json @@ -17,9 +17,9 @@ ], "require": { "php": ">=5.3.9", - "symfony/event-dispatcher": "~2.2", - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.4" + "symfony/event-dispatcher": "~2.2|~3.0.0", + "symfony/http-foundation": "~2.1|~3.0.0", + "symfony/http-kernel": "~2.4|~3.0.0" }, "replace": { "symfony/security-acl": "self.version", @@ -28,16 +28,16 @@ "symfony/security-http": "self.version" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/intl": "~2.3", - "symfony/routing": "~2.2", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/validator": "~2.5,>=2.5.5", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/intl": "~2.3|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/translation": "~2.0,>=2.0.5|~3.0.0", + "symfony/validator": "~2.5,>=2.5.5|~3.0.0", "doctrine/common": "~2.2", "doctrine/dbal": "~2.2", "psr/log": "~1.0", "ircmaxell/password-compat": "~1.0", - "symfony/expression-language": "~2.6" + "symfony/expression-language": "~2.6|~3.0.0" }, "suggest": { "symfony/class-loader": "For using the ACL generateSql script", diff --git a/src/Symfony/Component/Serializer/composer.json b/src/Symfony/Component/Serializer/composer.json index 110ea572e7f8..b88ea796d581 100644 --- a/src/Symfony/Component/Serializer/composer.json +++ b/src/Symfony/Component/Serializer/composer.json @@ -19,10 +19,10 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/yaml": "~2.0", - "symfony/config": "~2.2", - "symfony/property-access": "~2.3", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/yaml": "~2.0|~3.0.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/property-access": "~2.3|~3.0.0", "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0" }, diff --git a/src/Symfony/Component/Stopwatch/composer.json b/src/Symfony/Component/Stopwatch/composer.json index b64081decee4..95416bf0ad9a 100644 --- a/src/Symfony/Component/Stopwatch/composer.json +++ b/src/Symfony/Component/Stopwatch/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\Stopwatch\\": "" } diff --git a/src/Symfony/Component/Templating/composer.json b/src/Symfony/Component/Templating/composer.json index e7370f4fc4e5..45b7a2d1b1bd 100644 --- a/src/Symfony/Component/Templating/composer.json +++ b/src/Symfony/Component/Templating/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", + "symfony/phpunit-bridge": "~2.7|~3.0.0", "psr/log": "~1.0" }, "suggest": { diff --git a/src/Symfony/Component/Translation/composer.json b/src/Symfony/Component/Translation/composer.json index 98c09984d321..6f8499900e7f 100644 --- a/src/Symfony/Component/Translation/composer.json +++ b/src/Symfony/Component/Translation/composer.json @@ -19,10 +19,10 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", + "symfony/phpunit-bridge": "~2.7|~3.0.0", "symfony/config": "~2.7", - "symfony/intl": "~2.3", - "symfony/yaml": "~2.2", + "symfony/intl": "~2.3|~3.0.0", + "symfony/yaml": "~2.2|~3.0.0", "psr/log": "~1.0" }, "conflict": { diff --git a/src/Symfony/Component/Validator/composer.json b/src/Symfony/Component/Validator/composer.json index bd589db5c0d4..82899712b45e 100644 --- a/src/Symfony/Component/Validator/composer.json +++ b/src/Symfony/Component/Validator/composer.json @@ -17,16 +17,16 @@ ], "require": { "php": ">=5.3.9", - "symfony/translation": "~2.4" + "symfony/translation": "~2.4|~3.0.0" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7", - "symfony/http-foundation": "~2.1", - "symfony/intl": "~2.3", - "symfony/yaml": "~2.0,>=2.0.5", - "symfony/config": "~2.2", - "symfony/property-access": "~2.3", - "symfony/expression-language": "~2.4", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/http-foundation": "~2.1|~3.0.0", + "symfony/intl": "~2.3|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/property-access": "~2.3|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", "egulias/email-validator": "~1.2,>=1.2.1" diff --git a/src/Symfony/Component/VarDumper/composer.json b/src/Symfony/Component/VarDumper/composer.json index dbd0142201df..0b59b5d67a90 100644 --- a/src/Symfony/Component/VarDumper/composer.json +++ b/src/Symfony/Component/VarDumper/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "suggest": { "ext-symfony_debug": "" diff --git a/src/Symfony/Component/Yaml/composer.json b/src/Symfony/Component/Yaml/composer.json index 4a93aea67ab8..bc3ffa021a42 100644 --- a/src/Symfony/Component/Yaml/composer.json +++ b/src/Symfony/Component/Yaml/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "autoload": { "psr-0": { "Symfony\\Component\\Yaml\\": "" } From 38374f983cae994750abc52d79fb13222096da0a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Apr 2015 10:56:33 +0200 Subject: [PATCH 002/976] updated version to 2.8 --- composer.json | 2 +- src/Symfony/Bridge/Doctrine/composer.json | 2 +- src/Symfony/Bridge/Monolog/composer.json | 2 +- src/Symfony/Bridge/PhpUnit/composer.json | 2 +- src/Symfony/Bridge/ProxyManager/composer.json | 2 +- src/Symfony/Bridge/Swiftmailer/composer.json | 2 +- src/Symfony/Bridge/Twig/composer.json | 2 +- src/Symfony/Bundle/DebugBundle/composer.json | 2 +- src/Symfony/Bundle/FrameworkBundle/composer.json | 2 +- src/Symfony/Bundle/SecurityBundle/composer.json | 2 +- src/Symfony/Bundle/TwigBundle/composer.json | 2 +- src/Symfony/Bundle/WebProfilerBundle/composer.json | 2 +- src/Symfony/Component/Asset/composer.json | 2 +- src/Symfony/Component/BrowserKit/composer.json | 2 +- src/Symfony/Component/ClassLoader/composer.json | 2 +- src/Symfony/Component/Config/composer.json | 2 +- src/Symfony/Component/Console/composer.json | 2 +- src/Symfony/Component/CssSelector/composer.json | 2 +- src/Symfony/Component/Debug/composer.json | 2 +- src/Symfony/Component/DependencyInjection/composer.json | 2 +- src/Symfony/Component/DomCrawler/composer.json | 2 +- src/Symfony/Component/EventDispatcher/composer.json | 2 +- src/Symfony/Component/ExpressionLanguage/composer.json | 2 +- src/Symfony/Component/Filesystem/composer.json | 2 +- src/Symfony/Component/Finder/composer.json | 2 +- src/Symfony/Component/Form/README.md | 2 +- src/Symfony/Component/Form/composer.json | 2 +- src/Symfony/Component/HttpFoundation/composer.json | 2 +- src/Symfony/Component/HttpKernel/Kernel.php | 6 +++--- src/Symfony/Component/HttpKernel/composer.json | 2 +- src/Symfony/Component/Intl/README.md | 2 +- src/Symfony/Component/Intl/composer.json | 2 +- src/Symfony/Component/Locale/composer.json | 2 +- src/Symfony/Component/OptionsResolver/composer.json | 2 +- src/Symfony/Component/Process/composer.json | 2 +- src/Symfony/Component/PropertyAccess/composer.json | 2 +- src/Symfony/Component/Routing/composer.json | 2 +- src/Symfony/Component/Security/Acl/README.md | 2 +- src/Symfony/Component/Security/Acl/composer.json | 2 +- src/Symfony/Component/Security/Core/README.md | 2 +- src/Symfony/Component/Security/Core/composer.json | 2 +- src/Symfony/Component/Security/Csrf/README.md | 2 +- src/Symfony/Component/Security/Csrf/composer.json | 2 +- src/Symfony/Component/Security/Http/README.md | 2 +- src/Symfony/Component/Security/Http/composer.json | 2 +- src/Symfony/Component/Security/README.md | 2 +- src/Symfony/Component/Security/composer.json | 2 +- src/Symfony/Component/Serializer/composer.json | 2 +- src/Symfony/Component/Stopwatch/composer.json | 2 +- src/Symfony/Component/Templating/composer.json | 2 +- src/Symfony/Component/Translation/README.md | 2 +- src/Symfony/Component/Translation/composer.json | 2 +- src/Symfony/Component/Validator/README.md | 2 +- src/Symfony/Component/Validator/composer.json | 2 +- src/Symfony/Component/VarDumper/composer.json | 2 +- src/Symfony/Component/Yaml/composer.json | 2 +- 56 files changed, 58 insertions(+), 58 deletions(-) diff --git a/composer.json b/composer.json index 5a4ab5357b32..7ccf293f6965 100644 --- a/composer.json +++ b/composer.json @@ -98,7 +98,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 52f702469b97..951f7131b998 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -48,7 +48,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bridge/Monolog/composer.json b/src/Symfony/Bridge/Monolog/composer.json index bf81763b638e..9a1eed7405b6 100644 --- a/src/Symfony/Bridge/Monolog/composer.json +++ b/src/Symfony/Bridge/Monolog/composer.json @@ -37,7 +37,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bridge/PhpUnit/composer.json b/src/Symfony/Bridge/PhpUnit/composer.json index ab5036991700..1648adefd000 100644 --- a/src/Symfony/Bridge/PhpUnit/composer.json +++ b/src/Symfony/Bridge/PhpUnit/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bridge/ProxyManager/composer.json b/src/Symfony/Bridge/ProxyManager/composer.json index 123b93b03e1f..b01eefdd6b01 100644 --- a/src/Symfony/Bridge/ProxyManager/composer.json +++ b/src/Symfony/Bridge/ProxyManager/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bridge/Swiftmailer/composer.json b/src/Symfony/Bridge/Swiftmailer/composer.json index 49ef1f572370..35d488642cdc 100644 --- a/src/Symfony/Bridge/Swiftmailer/composer.json +++ b/src/Symfony/Bridge/Swiftmailer/composer.json @@ -32,7 +32,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bridge/Twig/composer.json b/src/Symfony/Bridge/Twig/composer.json index 3bc4bc8e2a8a..864fb1a48036 100644 --- a/src/Symfony/Bridge/Twig/composer.json +++ b/src/Symfony/Bridge/Twig/composer.json @@ -57,7 +57,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bundle/DebugBundle/composer.json b/src/Symfony/Bundle/DebugBundle/composer.json index 3e669094c29b..fd09f8e14f38 100644 --- a/src/Symfony/Bundle/DebugBundle/composer.json +++ b/src/Symfony/Bundle/DebugBundle/composer.json @@ -37,7 +37,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index cdd66ef59002..88d9379e7bef 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -63,7 +63,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index 3e4a91761c0c..2391ecd960e4 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -47,7 +47,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bundle/TwigBundle/composer.json b/src/Symfony/Bundle/TwigBundle/composer.json index cb8a143bd562..074a8a4d6631 100644 --- a/src/Symfony/Bundle/TwigBundle/composer.json +++ b/src/Symfony/Bundle/TwigBundle/composer.json @@ -39,7 +39,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Bundle/WebProfilerBundle/composer.json b/src/Symfony/Bundle/WebProfilerBundle/composer.json index 2af5c45d1d74..57e31017ead4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/composer.json +++ b/src/Symfony/Bundle/WebProfilerBundle/composer.json @@ -35,7 +35,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Asset/composer.json b/src/Symfony/Component/Asset/composer.json index 177a12970a91..8febcc276b36 100644 --- a/src/Symfony/Component/Asset/composer.json +++ b/src/Symfony/Component/Asset/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/BrowserKit/composer.json b/src/Symfony/Component/BrowserKit/composer.json index cbfc5a681d2d..7e1fd182692e 100644 --- a/src/Symfony/Component/BrowserKit/composer.json +++ b/src/Symfony/Component/BrowserKit/composer.json @@ -34,7 +34,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/ClassLoader/composer.json b/src/Symfony/Component/ClassLoader/composer.json index 409435c7a193..9231979ca27f 100644 --- a/src/Symfony/Component/ClassLoader/composer.json +++ b/src/Symfony/Component/ClassLoader/composer.json @@ -29,7 +29,7 @@ "target-dir": "Symfony/Component/ClassLoader", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Config/composer.json b/src/Symfony/Component/Config/composer.json index 8ba3609687d0..4e831363b2ea 100644 --- a/src/Symfony/Component/Config/composer.json +++ b/src/Symfony/Component/Config/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Console/composer.json b/src/Symfony/Component/Console/composer.json index f11d243b0adc..754cbe781204 100644 --- a/src/Symfony/Component/Console/composer.json +++ b/src/Symfony/Component/Console/composer.json @@ -36,7 +36,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/CssSelector/composer.json b/src/Symfony/Component/CssSelector/composer.json index 004c378aaac2..63dcc504e2e5 100644 --- a/src/Symfony/Component/CssSelector/composer.json +++ b/src/Symfony/Component/CssSelector/composer.json @@ -32,7 +32,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Debug/composer.json b/src/Symfony/Component/Debug/composer.json index dc94bac7150e..2d9ec8406e1f 100644 --- a/src/Symfony/Component/Debug/composer.json +++ b/src/Symfony/Component/Debug/composer.json @@ -39,7 +39,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/DependencyInjection/composer.json b/src/Symfony/Component/DependencyInjection/composer.json index 615e7b30d11a..b2101fdf3eed 100644 --- a/src/Symfony/Component/DependencyInjection/composer.json +++ b/src/Symfony/Component/DependencyInjection/composer.json @@ -39,7 +39,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/DomCrawler/composer.json b/src/Symfony/Component/DomCrawler/composer.json index 3390cbfa1540..59719595b343 100644 --- a/src/Symfony/Component/DomCrawler/composer.json +++ b/src/Symfony/Component/DomCrawler/composer.json @@ -32,7 +32,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/EventDispatcher/composer.json b/src/Symfony/Component/EventDispatcher/composer.json index 9b762b90fcdc..8a4e9df91d50 100644 --- a/src/Symfony/Component/EventDispatcher/composer.json +++ b/src/Symfony/Component/EventDispatcher/composer.json @@ -37,7 +37,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/ExpressionLanguage/composer.json b/src/Symfony/Component/ExpressionLanguage/composer.json index 98e51310c252..8de111d7c38e 100644 --- a/src/Symfony/Component/ExpressionLanguage/composer.json +++ b/src/Symfony/Component/ExpressionLanguage/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Filesystem/composer.json b/src/Symfony/Component/Filesystem/composer.json index 5df8ae7d031d..b4f9f617d07c 100644 --- a/src/Symfony/Component/Filesystem/composer.json +++ b/src/Symfony/Component/Filesystem/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Finder/composer.json b/src/Symfony/Component/Finder/composer.json index c38df483ee37..db033a289c20 100644 --- a/src/Symfony/Component/Finder/composer.json +++ b/src/Symfony/Component/Finder/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Form/README.md b/src/Symfony/Component/Form/README.md index 298a99d0127c..b164f8414ce2 100644 --- a/src/Symfony/Component/Form/README.md +++ b/src/Symfony/Component/Form/README.md @@ -14,7 +14,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/FormServiceProvid Documentation: -http://symfony.com/doc/2.7/book/forms.html +http://symfony.com/doc/2.8/book/forms.html Resources --------- diff --git a/src/Symfony/Component/Form/composer.json b/src/Symfony/Component/Form/composer.json index 9a0346c2b6cf..5136dcb90622 100644 --- a/src/Symfony/Component/Form/composer.json +++ b/src/Symfony/Component/Form/composer.json @@ -49,7 +49,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/HttpFoundation/composer.json b/src/Symfony/Component/HttpFoundation/composer.json index dd25e4b8079a..a80631fcde35 100644 --- a/src/Symfony/Component/HttpFoundation/composer.json +++ b/src/Symfony/Component/HttpFoundation/composer.json @@ -30,7 +30,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index fe7657ff27b1..a8c5e047196b 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -60,10 +60,10 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.0-DEV'; - const VERSION_ID = '20700'; + const VERSION = '2.8.0-DEV'; + const VERSION_ID = '20800'; const MAJOR_VERSION = '2'; - const MINOR_VERSION = '7'; + const MINOR_VERSION = '8'; const RELEASE_VERSION = '0'; const EXTRA_VERSION = 'DEV'; diff --git a/src/Symfony/Component/HttpKernel/composer.json b/src/Symfony/Component/HttpKernel/composer.json index b90cd1e01dae..5a17aff1e0a9 100644 --- a/src/Symfony/Component/HttpKernel/composer.json +++ b/src/Symfony/Component/HttpKernel/composer.json @@ -59,7 +59,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Intl/README.md b/src/Symfony/Component/Intl/README.md index d35582f38036..61081755a5ae 100644 --- a/src/Symfony/Component/Intl/README.md +++ b/src/Symfony/Component/Intl/README.md @@ -22,4 +22,4 @@ You can run the unit tests with the following command: $ phpunit [0]: http://www.php.net/manual/en/intl.setup.php -[1]: http://symfony.com/doc/2.7/components/intl.html +[1]: http://symfony.com/doc/2.8/components/intl.html diff --git a/src/Symfony/Component/Intl/composer.json b/src/Symfony/Component/Intl/composer.json index e73247864f97..e67bb69910fb 100644 --- a/src/Symfony/Component/Intl/composer.json +++ b/src/Symfony/Component/Intl/composer.json @@ -42,7 +42,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Locale/composer.json b/src/Symfony/Component/Locale/composer.json index 3adf477b2fd9..2525b566bd36 100644 --- a/src/Symfony/Component/Locale/composer.json +++ b/src/Symfony/Component/Locale/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/OptionsResolver/composer.json b/src/Symfony/Component/OptionsResolver/composer.json index 51c68a3badb7..40fd1465e45a 100644 --- a/src/Symfony/Component/OptionsResolver/composer.json +++ b/src/Symfony/Component/OptionsResolver/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Process/composer.json b/src/Symfony/Component/Process/composer.json index e6b1a6e4ea79..eb52158460ea 100644 --- a/src/Symfony/Component/Process/composer.json +++ b/src/Symfony/Component/Process/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/PropertyAccess/composer.json b/src/Symfony/Component/PropertyAccess/composer.json index 5110239dbb6b..294fe830e1f2 100644 --- a/src/Symfony/Component/PropertyAccess/composer.json +++ b/src/Symfony/Component/PropertyAccess/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Routing/composer.json b/src/Symfony/Component/Routing/composer.json index 7f21b979ffa9..e4a95fed607e 100644 --- a/src/Symfony/Component/Routing/composer.json +++ b/src/Symfony/Component/Routing/composer.json @@ -44,7 +44,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Security/Acl/README.md b/src/Symfony/Component/Security/Acl/README.md index 4b68d909ead5..40e067843172 100644 --- a/src/Symfony/Component/Security/Acl/README.md +++ b/src/Symfony/Component/Security/Acl/README.md @@ -11,7 +11,7 @@ Resources Documentation: -http://symfony.com/doc/2.7/book/security.html +http://symfony.com/doc/2.8/book/security.html Tests ----- diff --git a/src/Symfony/Component/Security/Acl/composer.json b/src/Symfony/Component/Security/Acl/composer.json index 2c0401fb29ab..31f43f198d01 100644 --- a/src/Symfony/Component/Security/Acl/composer.json +++ b/src/Symfony/Component/Security/Acl/composer.json @@ -37,7 +37,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Security/Core/README.md b/src/Symfony/Component/Security/Core/README.md index 8e05a92d4d60..d7ccf687577c 100644 --- a/src/Symfony/Component/Security/Core/README.md +++ b/src/Symfony/Component/Security/Core/README.md @@ -11,7 +11,7 @@ Resources Documentation: -http://symfony.com/doc/2.7/book/security.html +http://symfony.com/doc/2.8/book/security.html Tests ----- diff --git a/src/Symfony/Component/Security/Core/composer.json b/src/Symfony/Component/Security/Core/composer.json index f5e317902bc3..1b7e523409ba 100644 --- a/src/Symfony/Component/Security/Core/composer.json +++ b/src/Symfony/Component/Security/Core/composer.json @@ -42,7 +42,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Security/Csrf/README.md b/src/Symfony/Component/Security/Csrf/README.md index 30d7bb284943..91c22cf55cea 100644 --- a/src/Symfony/Component/Security/Csrf/README.md +++ b/src/Symfony/Component/Security/Csrf/README.md @@ -9,7 +9,7 @@ Resources Documentation: -http://symfony.com/doc/2.7/book/security.html +http://symfony.com/doc/2.8/book/security.html Tests ----- diff --git a/src/Symfony/Component/Security/Csrf/composer.json b/src/Symfony/Component/Security/Csrf/composer.json index 4d4ff6a94280..8311d62c056c 100644 --- a/src/Symfony/Component/Security/Csrf/composer.json +++ b/src/Symfony/Component/Security/Csrf/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Security/Http/README.md b/src/Symfony/Component/Security/Http/README.md index 35437f28cbe3..9e3d88de6850 100644 --- a/src/Symfony/Component/Security/Http/README.md +++ b/src/Symfony/Component/Security/Http/README.md @@ -11,7 +11,7 @@ Resources Documentation: -http://symfony.com/doc/2.7/book/security.html +http://symfony.com/doc/2.8/book/security.html Tests ----- diff --git a/src/Symfony/Component/Security/Http/composer.json b/src/Symfony/Component/Security/Http/composer.json index 80a038708d75..9c4dc1d54af6 100644 --- a/src/Symfony/Component/Security/Http/composer.json +++ b/src/Symfony/Component/Security/Http/composer.json @@ -39,7 +39,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Security/README.md b/src/Symfony/Component/Security/README.md index 173897d184ae..312c973830e1 100644 --- a/src/Symfony/Component/Security/README.md +++ b/src/Symfony/Component/Security/README.md @@ -11,7 +11,7 @@ Resources Documentation: -http://symfony.com/doc/2.7/book/security.html +http://symfony.com/doc/2.8/book/security.html Tests ----- diff --git a/src/Symfony/Component/Security/composer.json b/src/Symfony/Component/Security/composer.json index af7fad74f0a2..307759a88786 100644 --- a/src/Symfony/Component/Security/composer.json +++ b/src/Symfony/Component/Security/composer.json @@ -55,7 +55,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Serializer/composer.json b/src/Symfony/Component/Serializer/composer.json index b88ea796d581..a30a1be2d09d 100644 --- a/src/Symfony/Component/Serializer/composer.json +++ b/src/Symfony/Component/Serializer/composer.json @@ -40,7 +40,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Stopwatch/composer.json b/src/Symfony/Component/Stopwatch/composer.json index 95416bf0ad9a..d963fd09fdca 100644 --- a/src/Symfony/Component/Stopwatch/composer.json +++ b/src/Symfony/Component/Stopwatch/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Templating/composer.json b/src/Symfony/Component/Templating/composer.json index 45b7a2d1b1bd..9800b0667c59 100644 --- a/src/Symfony/Component/Templating/composer.json +++ b/src/Symfony/Component/Templating/composer.json @@ -32,7 +32,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Translation/README.md b/src/Symfony/Component/Translation/README.md index 4910b4883d67..ceebb067c476 100644 --- a/src/Symfony/Component/Translation/README.md +++ b/src/Symfony/Component/Translation/README.md @@ -28,7 +28,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/TranslationServic Documentation: -http://symfony.com/doc/2.7/book/translation.html +http://symfony.com/doc/2.8/book/translation.html You can run the unit tests with the following command: diff --git a/src/Symfony/Component/Translation/composer.json b/src/Symfony/Component/Translation/composer.json index 6f8499900e7f..af3fe6dceeb1 100644 --- a/src/Symfony/Component/Translation/composer.json +++ b/src/Symfony/Component/Translation/composer.json @@ -40,7 +40,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Validator/README.md b/src/Symfony/Component/Validator/README.md index 0c9bc5071947..39c1e3b47264 100644 --- a/src/Symfony/Component/Validator/README.md +++ b/src/Symfony/Component/Validator/README.md @@ -113,7 +113,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/ValidatorServiceP Documentation: -http://symfony.com/doc/2.7/book/validation.html +http://symfony.com/doc/2.8/book/validation.html JSR-303 Specification: diff --git a/src/Symfony/Component/Validator/composer.json b/src/Symfony/Component/Validator/composer.json index 82899712b45e..8c3b8b9ed767 100644 --- a/src/Symfony/Component/Validator/composer.json +++ b/src/Symfony/Component/Validator/composer.json @@ -49,7 +49,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/VarDumper/composer.json b/src/Symfony/Component/VarDumper/composer.json index 0b59b5d67a90..911f402da3a0 100644 --- a/src/Symfony/Component/VarDumper/composer.json +++ b/src/Symfony/Component/VarDumper/composer.json @@ -32,7 +32,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/src/Symfony/Component/Yaml/composer.json b/src/Symfony/Component/Yaml/composer.json index bc3ffa021a42..cc432aa2c443 100644 --- a/src/Symfony/Component/Yaml/composer.json +++ b/src/Symfony/Component/Yaml/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } From 3694e5ec35a8be6283134f4542b0f3efc26208d3 Mon Sep 17 00:00:00 2001 From: Abdellatif Ait boudad Date: Wed, 15 Apr 2015 01:53:15 +0100 Subject: [PATCH 003/976] [Translation] added FileLoader. --- .../Translation/Loader/CsvFileLoader.php | 21 +------ .../Translation/Loader/FileLoader.php | 62 +++++++++++++++++++ .../Translation/Loader/IniFileLoader.php | 23 +------ .../Translation/Loader/JsonFileLoader.php | 23 +------ .../Translation/Loader/MoFileLoader.php | 40 +----------- .../Translation/Loader/PhpFileLoader.php | 25 +------- .../Translation/Loader/PoFileLoader.php | 40 +----------- .../Translation/Loader/YamlFileLoader.php | 31 +--------- 8 files changed, 83 insertions(+), 182 deletions(-) create mode 100644 src/Symfony/Component/Translation/Loader/FileLoader.php diff --git a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php index ddcf595baf72..b6f0966371df 100644 --- a/src/Symfony/Component/Translation/Loader/CsvFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/CsvFileLoader.php @@ -11,9 +11,7 @@ namespace Symfony\Component\Translation\Loader; -use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; /** * CsvFileLoader loads translations from CSV files. @@ -22,7 +20,7 @@ * * @api */ -class CsvFileLoader extends ArrayLoader +class CsvFileLoader extends FileLoader { private $delimiter = ';'; private $enclosure = '"'; @@ -30,19 +28,9 @@ class CsvFileLoader extends ArrayLoader /** * {@inheritdoc} - * - * @api */ - public function load($resource, $locale, $domain = 'messages') + protected function loadResource($resource) { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - $messages = array(); try { @@ -70,10 +58,7 @@ public function load($resource, $locale, $domain = 'messages') } } - $catalogue = parent::load($messages, $locale, $domain); - $catalogue->addResource(new FileResource($resource)); - - return $catalogue; + return $messages; } /** diff --git a/src/Symfony/Component/Translation/Loader/FileLoader.php b/src/Symfony/Component/Translation/Loader/FileLoader.php new file mode 100644 index 000000000000..a55dc185aca8 --- /dev/null +++ b/src/Symfony/Component/Translation/Loader/FileLoader.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Loader; + +use Symfony\Component\Translation\Exception\InvalidResourceException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\Resource\FileResource; + +/** + * @author Abdellatif Ait boudad + */ +abstract class FileLoader extends ArrayLoader +{ + /** + * {@inheritdoc} + */ + public function load($resource, $locale, $domain = 'messages') + { + if (!stream_is_local($resource)) { + throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); + } + + if (!file_exists($resource)) { + throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); + } + + $messages = $this->loadResource($resource); + + // empty resource + if (null === $messages) { + $messages = array(); + } + + // not an array + if (!is_array($messages)) { + throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); + } + + $catalogue = parent::load($messages, $locale, $domain); + $catalogue->addResource(new FileResource($resource)); + + return $catalogue; + } + + /* + * @param string $resource + * + * @return array + * + * @throws InvalidResourceException If stream content has an invalid format. + */ + abstract protected function loadResource($resource); +} diff --git a/src/Symfony/Component/Translation/Loader/IniFileLoader.php b/src/Symfony/Component/Translation/Loader/IniFileLoader.php index 3f01ab4e9989..11d9b272e0a3 100644 --- a/src/Symfony/Component/Translation/Loader/IniFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/IniFileLoader.php @@ -11,35 +11,18 @@ namespace Symfony\Component\Translation\Loader; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; - /** * IniFileLoader loads translations from an ini file. * * @author stealth35 */ -class IniFileLoader extends ArrayLoader +class IniFileLoader extends FileLoader { /** * {@inheritdoc} */ - public function load($resource, $locale, $domain = 'messages') + protected function loadResource($resource) { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - $messages = parse_ini_file($resource, true); - - $catalogue = parent::load($messages, $locale, $domain); - $catalogue->addResource(new FileResource($resource)); - - return $catalogue; + return parse_ini_file($resource, true); } } diff --git a/src/Symfony/Component/Translation/Loader/JsonFileLoader.php b/src/Symfony/Component/Translation/Loader/JsonFileLoader.php index 8327c63b57f1..bd59659cf43a 100644 --- a/src/Symfony/Component/Translation/Loader/JsonFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/JsonFileLoader.php @@ -12,43 +12,26 @@ namespace Symfony\Component\Translation\Loader; use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; /** * JsonFileLoader loads translations from an json file. * * @author singles */ -class JsonFileLoader extends ArrayLoader implements LoaderInterface +class JsonFileLoader extends FileLoader { /** * {@inheritdoc} */ - public function load($resource, $locale, $domain = 'messages') + protected function loadResource($resource) { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - $messages = json_decode(file_get_contents($resource), true); if (0 < $errorCode = json_last_error()) { throw new InvalidResourceException(sprintf('Error parsing JSON - %s', $this->getJSONErrorMessage($errorCode))); } - if (null === $messages) { - $messages = array(); - } - - $catalogue = parent::load($messages, $locale, $domain); - $catalogue->addResource(new FileResource($resource)); - - return $catalogue; + return $messages; } /** diff --git a/src/Symfony/Component/Translation/Loader/MoFileLoader.php b/src/Symfony/Component/Translation/Loader/MoFileLoader.php index 9cab3f0d8da7..2354c33860cb 100644 --- a/src/Symfony/Component/Translation/Loader/MoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/MoFileLoader.php @@ -12,13 +12,11 @@ namespace Symfony\Component\Translation\Loader; use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; /** * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) */ -class MoFileLoader extends ArrayLoader +class MoFileLoader extends FileLoader { /** * Magic used for validating the format of a MO file as well as @@ -43,45 +41,13 @@ class MoFileLoader extends ArrayLoader */ const MO_HEADER_SIZE = 28; - public function load($resource, $locale, $domain = 'messages') - { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - $messages = $this->parse($resource); - - // empty file - if (null === $messages) { - $messages = array(); - } - - // not an array - if (!is_array($messages)) { - throw new InvalidResourceException(sprintf('The file "%s" must contain a valid mo file.', $resource)); - } - - $catalogue = parent::load($messages, $locale, $domain); - $catalogue->addResource(new FileResource($resource)); - - return $catalogue; - } - /** * Parses machine object (MO) format, independent of the machine's endian it * was created on. Both 32bit and 64bit systems are supported. * - * @param resource $resource - * - * @return array - * - * @throws InvalidResourceException If stream content has an invalid format. + * {@inheritdoc} */ - private function parse($resource) + protected function loadResource($resource) { $stream = fopen($resource, 'r'); diff --git a/src/Symfony/Component/Translation/Loader/PhpFileLoader.php b/src/Symfony/Component/Translation/Loader/PhpFileLoader.php index 1cc9d06d9c99..88f4cdb113a0 100644 --- a/src/Symfony/Component/Translation/Loader/PhpFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/PhpFileLoader.php @@ -11,10 +11,6 @@ namespace Symfony\Component\Translation\Loader; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; - /** * PhpFileLoader loads translations from PHP files returning an array of translations. * @@ -22,28 +18,13 @@ * * @api */ -class PhpFileLoader extends ArrayLoader +class PhpFileLoader extends FileLoader { /** * {@inheritdoc} - * - * @api */ - public function load($resource, $locale, $domain = 'messages') + protected function loadResource($resource) { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - $messages = require $resource; - - $catalogue = parent::load($messages, $locale, $domain); - $catalogue->addResource(new FileResource($resource)); - - return $catalogue; + return require $resource; } } diff --git a/src/Symfony/Component/Translation/Loader/PoFileLoader.php b/src/Symfony/Component/Translation/Loader/PoFileLoader.php index 8c8f1a297a29..84664d65a0ac 100644 --- a/src/Symfony/Component/Translation/Loader/PoFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/PoFileLoader.php @@ -11,44 +11,12 @@ namespace Symfony\Component\Translation\Loader; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; - /** * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) * @copyright Copyright (c) 2012, Clemens Tolboom */ -class PoFileLoader extends ArrayLoader +class PoFileLoader extends FileLoader { - public function load($resource, $locale, $domain = 'messages') - { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - $messages = $this->parse($resource); - - // empty file - if (null === $messages) { - $messages = array(); - } - - // not an array - if (!is_array($messages)) { - throw new InvalidResourceException(sprintf('The file "%s" must contain a valid po file.', $resource)); - } - - $catalogue = parent::load($messages, $locale, $domain); - $catalogue->addResource(new FileResource($resource)); - - return $catalogue; - } - /** * Parses portable object (PO) format. * @@ -90,11 +58,9 @@ public function load($resource, $locale, $domain = 'messages') * * Items with an empty id are ignored. * - * @param resource $resource - * - * @return array + * {@inheritdoc} */ - private function parse($resource) + protected function loadResource($resource) { $stream = fopen($resource, 'r'); diff --git a/src/Symfony/Component/Translation/Loader/YamlFileLoader.php b/src/Symfony/Component/Translation/Loader/YamlFileLoader.php index e50e0fa38541..2a735f798962 100644 --- a/src/Symfony/Component/Translation/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Translation/Loader/YamlFileLoader.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Translation\Loader; use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Yaml\Parser as YamlParser; use Symfony\Component\Yaml\Exception\ParseException; @@ -24,25 +22,15 @@ * * @api */ -class YamlFileLoader extends ArrayLoader +class YamlFileLoader extends FileLoader { private $yamlParser; /** * {@inheritdoc} - * - * @api */ - public function load($resource, $locale, $domain = 'messages') + protected function loadResource($resource) { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - if (null === $this->yamlParser) { $this->yamlParser = new YamlParser(); } @@ -53,19 +41,6 @@ public function load($resource, $locale, $domain = 'messages') throw new InvalidResourceException(sprintf('Error parsing YAML, invalid file "%s"', $resource), 0, $e); } - // empty file - if (null === $messages) { - $messages = array(); - } - - // not an array - if (!is_array($messages)) { - throw new InvalidResourceException(sprintf('The file "%s" must contain a YAML array.', $resource)); - } - - $catalogue = parent::load($messages, $locale, $domain); - $catalogue->addResource(new FileResource($resource)); - - return $catalogue; + return $messages; } } From fbe1a43990fc85adff8d41c91fd0730a52b1d472 Mon Sep 17 00:00:00 2001 From: Abdellatif Ait boudad Date: Thu, 16 Apr 2015 23:28:34 +0100 Subject: [PATCH 004/976] [FrameworkBundle][Server Command] add address port number option. --- .../FrameworkBundle/Command/ServerRunCommand.php | 16 +++++++++++----- .../Command/ServerStartCommand.php | 7 +++---- .../Command/ServerStopCommand.php | 8 +++++++- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php index 01a1e4da7ffd..919713cd0593 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php @@ -44,7 +44,8 @@ protected function configure() { $this ->setDefinition(array( - new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'), + new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'), + new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'), new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root', null), new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'), )) @@ -101,10 +102,15 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->writeln('Running PHP built-in server in production environment is NOT recommended!'); } - $output->writeln(sprintf("Server running on http://%s\n", $input->getArgument('address'))); + $address = $input->getArgument('address'); + if (false === strpos($address, ':')) { + $address = $address.':'.$input->getOption('port'); + } + + $output->writeln(sprintf("Server running on http://%s\n", $address)); $output->writeln('Quit the server with CONTROL-C.'); - if (null === $builder = $this->createPhpProcessBuilder($input, $output, $env)) { + if (null === $builder = $this->createPhpProcessBuilder($input, $output, $env, $address)) { return 1; } @@ -131,7 +137,7 @@ protected function execute(InputInterface $input, OutputInterface $output) return $process->getExitCode(); } - private function createPhpProcessBuilder(InputInterface $input, OutputInterface $output, $env) + private function createPhpProcessBuilder(InputInterface $input, OutputInterface $output, $env, $address) { $router = $input->getOption('router') ?: $this ->getContainer() @@ -154,6 +160,6 @@ private function createPhpProcessBuilder(InputInterface $input, OutputInterface return; } - return new ProcessBuilder(array($binary, '-S', $input->getArgument('address'), $router)); + return new ProcessBuilder(array($binary, '-S', $address, $router)); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php index 9110bb1b4337..c919dfa00c10 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php @@ -33,7 +33,8 @@ protected function configure() { $this ->setDefinition(array( - new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'), + new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'), + new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'), new InputOption('docroot', 'd', InputOption::VALUE_REQUIRED, 'Document root', null), new InputOption('router', 'r', InputOption::VALUE_REQUIRED, 'Path to custom router script'), )) @@ -101,9 +102,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $address = $input->getArgument('address'); if (false === strpos($address, ':')) { - $output->writeln('The address has to be of the form bind-address:port.'); - - return 1; + $address = $address.':'.$input->getOption('port'); } if ($this->isOtherServerProcessRunning($address)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php index 9b0656c220b6..c40952059a29 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php @@ -14,6 +14,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Input\InputOption; /** * Stops a background process running PHP's built-in web server. @@ -29,7 +30,8 @@ protected function configure() { $this ->setDefinition(array( - new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1:8000'), + new InputArgument('address', InputArgument::OPTIONAL, 'Address:port', '127.0.0.1'), + new InputOption('port', 'p', InputOption::VALUE_REQUIRED, 'Address port number', '8000'), )) ->setName('server:stop') ->setDescription('Stops PHP\'s built-in web server that was started with the server:start command') @@ -53,6 +55,10 @@ protected function configure() protected function execute(InputInterface $input, OutputInterface $output) { $address = $input->getArgument('address'); + if (false === strpos($address, ':')) { + $address = $address.':'.$input->getOption('port'); + } + $lockFile = $this->getLockFile($address); if (!file_exists($lockFile)) { From eb50b139d655dd8586562c1fa113f931f2bed040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 20 Apr 2015 23:40:49 +0200 Subject: [PATCH 005/976] [VarDumper] Added support for SplFileInfo --- .../Component/VarDumper/Caster/SplCaster.php | 50 +++++++++++++ .../VarDumper/Cloner/AbstractCloner.php | 1 + .../Tests/Caster/ReflectionCasterTest.php | 2 - .../VarDumper/Tests/Caster/SplCasterTest.php | 75 +++++++++++++++++++ 4 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php diff --git a/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/Symfony/Component/VarDumper/Caster/SplCaster.php index 79e8bb80b9af..edc73a7a714c 100644 --- a/src/Symfony/Component/VarDumper/Caster/SplCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -72,6 +72,56 @@ public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, S return $a; } + public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'path' => 'getPath', + 'filename' => 'getFilename', + 'basename' => 'getBasename', + 'pathname' => 'getPathname', + 'extension' => 'getExtension', + 'realPath' => 'getRealPath', + 'aTime' => 'getATime', + 'mTime' => 'getMTime', + 'cTime' => 'getCTime', + 'inode' => 'getInode', + 'size' => 'getSize', + 'perms' => 'getPerms', + 'owner' => 'getOwner', + 'group' => 'getGroup', + 'type' => 'getType', + 'writable' => 'isWritable', + 'readable' => 'isReadable', + 'executable' => 'isExecutable', + 'file' => 'isFile', + 'dir' => 'isDir', + 'link' => 'isLink', + 'linkTarget' => 'getLinkTarget', + ); + + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if (isset($a[$prefix.'perms'])) { + $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); + } + + static $mapDate = array('aTime', 'mTime', 'cTime'); + foreach ($mapDate as $key) { + if (isset($a[$prefix.$key])) { + $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); + } + } + + return $a; + } + public static function castFixedArray(\SplFixedArray $c, array $a, Stub $stub, $isNested) { $a += array( diff --git a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php index e4f7a7c0538b..b1efe6dbe427 100644 --- a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -78,6 +78,7 @@ abstract class AbstractCloner implements ClonerInterface 'ArrayObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castArrayObject', 'SplDoublyLinkedList' => 'Symfony\Component\VarDumper\Caster\SplCaster::castDoublyLinkedList', + 'SplFileInfo' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileInfo', 'SplFixedArray' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFixedArray', 'SplHeap' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', 'SplObjectStorage' => 'Symfony\Component\VarDumper\Caster\SplCaster::castObjectStorage', diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php index be4947278d5a..fe3c65042fd9 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php @@ -11,8 +11,6 @@ namespace Symfony\Component\VarDumper\Tests\Caster; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; use Symfony\Component\VarDumper\Test\VarDumperTestCase; /** diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php new file mode 100644 index 000000000000..6560acce40a5 --- /dev/null +++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use Symfony\Component\VarDumper\Test\VarDumperTestCase; + +/** + * @author Grégoire Pineau + */ +class SplCasterTest extends VarDumperTestCase +{ + public function getCastFileInfoTests() + { + return array( + array(__FILE__, <<<'EOTXT' +SplFileInfo { + path: "%s/src/Symfony/Component/VarDumper/Tests/Caster" + filename: "SplCasterTest.php" + basename: "SplCasterTest.php" + pathname: "%s/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php" + extension: "php" + realPath: "%s/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php" + aTime: %s-%s-%d %d:%d:%d + mTime: %s-%s-%d %d:%d:%d + cTime: %s-%s-%d %d:%d:%d + inode: %d + size: %d + perms: 0100644 + owner: 1000 + group: 1000 + type: "file" + writable: true + readable: true + executable: false + file: true + dir: false + link: false +} +EOTXT + ), + array('https://google.com/about', <<<'EOTXT' +SplFileInfo { + path: "https://google.com" + filename: "about" + basename: "about" + pathname: "https://google.com/about" + extension: "" + realPath: false + writable: false + readable: false + executable: false + file: false + dir: false + link: false +} +EOTXT + ), + ); + } + + /** @dataProvider getCastFileInfoTests */ + public function testCastFileInfo($file, $dump) + { + $this->assertDumpMatchesFormat($dump, new \SplFileInfo($file)); + } +} From e75c233b88fd1ef41c240201eac5d41390d54274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Tue, 21 Apr 2015 11:26:07 +0200 Subject: [PATCH 006/976] [VarDumper] Added support for SplFileObject --- .../Component/VarDumper/Caster/SplCaster.php | 55 +++++++++++++++++ .../VarDumper/Cloner/AbstractCloner.php | 1 + .../VarDumper/Tests/Caster/SplCasterTest.php | 61 +++++++++++++++++-- 3 files changed, 111 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/Symfony/Component/VarDumper/Caster/SplCaster.php index edc73a7a714c..a4d4760500d8 100644 --- a/src/Symfony/Component/VarDumper/Caster/SplCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -20,6 +20,13 @@ */ class SplCaster { + private static $splFileObjectFlags = array( + \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', + \SplFileObject::READ_AHEAD => 'READ_AHEAD', + \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', + \SplFileObject::READ_CSV => 'READ_CSV', + ); + public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) { $prefix = Caster::PREFIX_VIRTUAL; @@ -122,6 +129,54 @@ public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNe return $a; } + public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'csvControl' => 'getCsvControl', + 'flags' => 'getFlags', + 'maxLineLen' => 'getMaxLineLen', + 'fstat' => 'fstat', + 'eof' => 'eof', + 'key' => 'key', + ); + + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if (isset($a[$prefix.'flags'])) { + $flagsArray = array(); + foreach (self::$splFileObjectFlags as $value => $name) { + if ($a[$prefix.'flags'] & $value) { + $flagsArray[] = $name; + } + } + $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); + } + + if (isset($a[$prefix.'fstat'])) { + $fstat = $a[$prefix.'fstat']; + $fstat = array( + 'dev' => $fstat['dev'], + 'ino' => $fstat['ino'], + 'nlink' => $fstat['nlink'], + 'rdev' => $fstat['rdev'], + 'blksize' => $fstat['blksize'], + 'blocks' => $fstat['blocks'], + '…' => '…'.(count($fstat) - 6), + ); + + $a[$prefix.'fstat'] = $fstat; + } + + return $a; + } + public static function castFixedArray(\SplFixedArray $c, array $a, Stub $stub, $isNested) { $a += array( diff --git a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php index b1efe6dbe427..83cb921319dd 100644 --- a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -79,6 +79,7 @@ abstract class AbstractCloner implements ClonerInterface 'ArrayObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castArrayObject', 'SplDoublyLinkedList' => 'Symfony\Component\VarDumper\Caster\SplCaster::castDoublyLinkedList', 'SplFileInfo' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileInfo', + 'SplFileObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileObject', 'SplFixedArray' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFixedArray', 'SplHeap' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', 'SplObjectStorage' => 'Symfony\Component\VarDumper\Caster\SplCaster::castObjectStorage', diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php index 6560acce40a5..299a3f93f56a 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -23,20 +23,20 @@ public function getCastFileInfoTests() return array( array(__FILE__, <<<'EOTXT' SplFileInfo { - path: "%s/src/Symfony/Component/VarDumper/Tests/Caster" + path: "%s/Tests/Caster" filename: "SplCasterTest.php" basename: "SplCasterTest.php" - pathname: "%s/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php" + pathname: "%s/Tests/Caster/SplCasterTest.php" extension: "php" - realPath: "%s/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php" + realPath: "%s/Tests/Caster/SplCasterTest.php" aTime: %s-%s-%d %d:%d:%d mTime: %s-%s-%d %d:%d:%d cTime: %s-%s-%d %d:%d:%d inode: %d size: %d - perms: 0100644 - owner: 1000 - group: 1000 + perms: 0%d + owner: %d + group: %d type: "file" writable: true readable: true @@ -72,4 +72,53 @@ public function testCastFileInfo($file, $dump) { $this->assertDumpMatchesFormat($dump, new \SplFileInfo($file)); } + + public function testCastFileObject() + { + $var = new \SplFileObject(__FILE__); + $var->setFlags(\SplFileObject::DROP_NEW_LINE | \SplFileObject::SKIP_EMPTY); + $dump = <<<'EOTXT' +SplFileObject { + path: "%s/Tests/Caster" + filename: "SplCasterTest.php" + basename: "SplCasterTest.php" + pathname: "%s/Tests/Caster/SplCasterTest.php" + extension: "php" + realPath: "%s/Tests/Caster/SplCasterTest.php" + aTime: %s-%s-%d %d:%d:%d + mTime: %s-%s-%d %d:%d:%d + cTime: %s-%s-%d %d:%d:%d + inode: %d + size: %d + perms: 0%d + owner: %d + group: %d + type: "file" + writable: true + readable: true + executable: false + file: true + dir: false + link: false + csvControl: array:2 [ + 0 => "," + 1 => """ + ] + flags: DROP_NEW_LINE|SKIP_EMPTY + maxLineLen: 0 + fstat: array:7 [ + "dev" => %d + "ino" => %d + "nlink" => %d + "rdev" => 0 + "blksize" => %d + "blocks" => %d + "…" => "…20" + ] + eof: false + key: 0 +} +EOTXT; + $this->assertDumpMatchesFormat($dump, $var); + } } From 0642911ede99b3c072fb6b30d9433fc8afed80ff Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Tue, 21 Apr 2015 19:09:11 +0100 Subject: [PATCH 007/976] [FrameworkBundle] Add a doctrine cache service definition for validator mapping --- .../FrameworkBundle/Resources/config/validator.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml index ccfd44e5ca48..c0bf73a94e98 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml @@ -39,6 +39,16 @@ %validator.mapping.cache.prefix% + + + + + %validator.mapping.cache.prefix% + + + + + From ff4424a668252068ab22f56e4f4996196492be1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Tue, 21 Apr 2015 20:59:48 +0200 Subject: [PATCH 008/976] [Console] Bind the closure (code) to the Command if possible --- .../Component/Console/Command/Command.php | 7 ++++ .../Console/Tests/Command/CommandTest.php | 37 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 02e207eac775..0b968809938d 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -284,6 +284,13 @@ public function setCode($code) throw new \InvalidArgumentException('Invalid callable provided to Command::setCode.'); } + if (PHP_VERSION_ID >= 50400 && $code instanceof \Closure) { + $r = new \ReflectionFunction($code); + if (null === $r->getClosureThis()) { + $code = \Closure::bind($code, $this); + } + } + $this->code = $code; return $this; diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php index 08761163eb2d..42b2944ba77b 100644 --- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php +++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php @@ -293,6 +293,33 @@ public function testSetCode() $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); } + public function getSetCodeBindToClosureTests() + { + return array( + array(true, 'not bound to the command'), + array(false, 'bound to the command'), + ); + } + + /** @dataProvider getSetCodeBindToClosureTests */ + public function testSetCodeBindToClosure($previouslyBound, $expected) + { + if (PHP_VERSION_ID < 50400) { + $this->markTestSkipped('Test skipped, for PHP 5.4+ only.'); + } + + $code = createClosure(); + if ($previouslyBound) { + $code = $code->bindTo($this); + } + + $command = new \TestCommand(); + $command->setCode($code); + $tester = new CommandTester($command); + $tester->execute(array()); + $this->assertEquals('interact called'.PHP_EOL.$expected.PHP_EOL, $tester->getDisplay()); + } + public function testSetCodeWithNonClosureCallable() { $command = new \TestCommand(); @@ -346,3 +373,13 @@ public function testLegacyAsXml() $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/command_asxml.txt', $command->asXml(), '->asXml() returns an XML representation of the command'); } } + +// In order to get an unbound closure, we should create it outside a class +// scope. +function createClosure() +{ + return function(InputInterface $input, OutputInterface $output) + { + $output->writeln($this instanceof Command ? 'bound to the command' : 'not bound to the command'); + }; +} From 208ca94b67ad1cefc26d07bc663c3dc618181ad0 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 22 Apr 2015 14:35:58 +0200 Subject: [PATCH 009/976] [VarDumper] Allow preserving a subset of cut arrays --- .../VarDumper/Caster/CutArrayStub.php | 30 +++++++++++++++++++ .../Component/VarDumper/Caster/SplCaster.php | 13 +------- .../Component/VarDumper/Caster/StubCaster.php | 5 ++++ .../VarDumper/Cloner/AbstractCloner.php | 1 + .../VarDumper/Tests/Caster/SplCasterTest.php | 4 +-- 5 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 src/Symfony/Component/VarDumper/Caster/CutArrayStub.php diff --git a/src/Symfony/Component/VarDumper/Caster/CutArrayStub.php b/src/Symfony/Component/VarDumper/Caster/CutArrayStub.php new file mode 100644 index 000000000000..f2a803053a6c --- /dev/null +++ b/src/Symfony/Component/VarDumper/Caster/CutArrayStub.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a cut array. + * + * @author Nicolas Grekas + */ +class CutArrayStub extends CutStub +{ + public $preservedSubset; + + public function __construct(array $value, array $preservedKeys) + { + parent::__construct($value); + + $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); + $this->cut -= count($this->preservedSubset); + } +} diff --git a/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/Symfony/Component/VarDumper/Caster/SplCaster.php index a4d4760500d8..f4b1f47cf78e 100644 --- a/src/Symfony/Component/VarDumper/Caster/SplCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -160,18 +160,7 @@ public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $ } if (isset($a[$prefix.'fstat'])) { - $fstat = $a[$prefix.'fstat']; - $fstat = array( - 'dev' => $fstat['dev'], - 'ino' => $fstat['ino'], - 'nlink' => $fstat['nlink'], - 'rdev' => $fstat['rdev'], - 'blksize' => $fstat['blksize'], - 'blocks' => $fstat['blocks'], - '…' => '…'.(count($fstat) - 6), - ); - - $a[$prefix.'fstat'] = $fstat; + $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], array('dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks')); } return $a; diff --git a/src/Symfony/Component/VarDumper/Caster/StubCaster.php b/src/Symfony/Component/VarDumper/Caster/StubCaster.php index ab0f52e55ae9..542f8a19f4af 100644 --- a/src/Symfony/Component/VarDumper/Caster/StubCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/StubCaster.php @@ -33,6 +33,11 @@ public static function castStub(Stub $c, array $a, Stub $stub, $isNested) } } + public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, $isNested) + { + return $isNested ? $c->preservedSubset : $a; + } + public static function cutInternals($obj, array $a, Stub $stub, $isNested) { if ($isNested) { diff --git a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php index 83cb921319dd..180b1b373efa 100644 --- a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -23,6 +23,7 @@ abstract class AbstractCloner implements ClonerInterface { public static $defaultCasters = array( 'Symfony\Component\VarDumper\Caster\CutStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', + 'Symfony\Component\VarDumper\Caster\CutArrayStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castCutArray', 'Symfony\Component\VarDumper\Caster\ConstStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', 'Closure' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure', diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php index 299a3f93f56a..121428ccfede 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -106,14 +106,14 @@ public function testCastFileObject() ] flags: DROP_NEW_LINE|SKIP_EMPTY maxLineLen: 0 - fstat: array:7 [ + fstat: array:26 [ "dev" => %d "ino" => %d "nlink" => %d "rdev" => 0 "blksize" => %d "blocks" => %d - "…" => "…20" + …20 ] eof: false key: 0 From b941bd3c46c90021662b5e30d2b1c04b611d1047 Mon Sep 17 00:00:00 2001 From: Nicolas Dewez Date: Sun, 26 Apr 2015 12:57:37 +0200 Subject: [PATCH 010/976] Changed output for translation:debug command --- .../Command/TranslationDebugCommand.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index 14f139436882..238b6400d6e4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -168,7 +168,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } // Display header line - $headers = array('State(s)', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale)); + $headers = array('State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale)); foreach ($fallbackCatalogues as $fallbackCatalogue) { $headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale()); } @@ -215,26 +215,20 @@ protected function execute(InputInterface $input, OutputInterface $output) } else { $table->render($output); } - - $output->writeln(''); - $output->writeln('Legend:'); - $output->writeln(sprintf(' %s Missing message', $this->formatState(self::MESSAGE_MISSING))); - $output->writeln(sprintf(' %s Unused message', $this->formatState(self::MESSAGE_UNUSED))); - $output->writeln(sprintf(' %s Same as the fallback message', $this->formatState(self::MESSAGE_EQUALS_FALLBACK))); } private function formatState($state) { if (self::MESSAGE_MISSING === $state) { - return 'x'; + return 'missing'; } if (self::MESSAGE_UNUSED === $state) { - return 'o'; + return 'unused'; } if (self::MESSAGE_EQUALS_FALLBACK === $state) { - return '='; + return 'fallback'; } return $state; From 0e7fe7916fd13a3de81bb83adbbc8e111e1b7d07 Mon Sep 17 00:00:00 2001 From: Stefan Gehrig Date: Sat, 11 Apr 2015 18:38:38 +0200 Subject: [PATCH 011/976] added the --all option to the debug:translation command --- .../Command/TranslationDebugCommand.php | 234 +++++++++++------- 1 file changed, 147 insertions(+), 87 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index 238b6400d6e4..14d2d0392708 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -11,12 +11,14 @@ namespace Symfony\Bundle\FrameworkBundle\Command; -use Symfony\Component\Translation\Catalogue\MergeOperation; +use Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Translation\Catalogue\MergeOperation; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Translator; @@ -48,6 +50,7 @@ protected function configure() new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'), new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Displays only missing messages'), new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Displays only unused messages'), + new InputOption('all', null, InputOption::VALUE_NONE, 'Load messages from all registered bundles'), )) ->setDescription('Displays translation messages information') ->setHelp(<<php %command.full_name% en +You can display information about translations in all registered bundles in a specific locale: + + php %command.full_name% --all en + EOF ) ; @@ -91,129 +98,123 @@ protected function execute(InputInterface $input, OutputInterface $output) $locale = $input->getArgument('locale'); $domain = $input->getOption('domain'); + /** @var TranslationLoader $loader */ $loader = $this->getContainer()->get('translation.loader'); + /** @var Kernel $kernel */ $kernel = $this->getContainer()->get('kernel'); // Define Root Path to App folder - $rootPath = $kernel->getRootDir(); + $rootPaths = array($kernel->getRootDir()); // Override with provided Bundle info if (null !== $input->getArgument('bundle')) { try { - $rootPath = $kernel->getBundle($input->getArgument('bundle'))->getPath(); + $rootPaths = array($kernel->getBundle($input->getArgument('bundle'))->getPath()); } catch (\InvalidArgumentException $e) { // such a bundle does not exist, so treat the argument as path - $rootPath = $input->getArgument('bundle'); + $rootPaths = array($input->getArgument('bundle')); - if (!is_dir($rootPath)) { - throw new \InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $rootPath)); + if (!is_dir($rootPaths[0])) { + throw new \InvalidArgumentException( + sprintf('"%s" is neither an enabled bundle nor a directory.', $rootPaths[0]) + ); } } + } elseif ($input->getOption('all')) { + foreach ($kernel->getBundles() as $bundle) { + $rootPaths[] = $bundle->getPath(); + } } - // get bundle directory - $translationsPath = $rootPath.'/Resources/translations'; + foreach ($rootPaths as $rootPath) { + // get bundle directory + $translationsPath = $rootPath.'/Resources/translations'; - // Extract used messages - $extractedCatalogue = new MessageCatalogue($locale); - if (is_dir($rootPath.'/Resources/views')) { - $this->getContainer()->get('translation.extractor')->extract($rootPath.'/Resources/views', $extractedCatalogue); - } + $output->writeln(sprintf('Translations in %s', $translationsPath)); - // Load defined messages - $currentCatalogue = new MessageCatalogue($locale); - if (is_dir($translationsPath)) { - $loader->loadMessages($translationsPath, $currentCatalogue); - } - - // Merge defined and extracted messages to get all message ids - $mergeOperation = new MergeOperation($extractedCatalogue, $currentCatalogue); - $allMessages = $mergeOperation->getResult()->all($domain); - if (null !== $domain) { - $allMessages = array($domain => $allMessages); - } + // Extract used messages + $extractedCatalogue = $this->extractMessages($locale, $rootPath); - // No defined or extracted messages - if (empty($allMessages) || null !== $domain && empty($allMessages[$domain])) { - $outputMessage = sprintf('No defined or extracted messages for locale "%s"', $locale); + // Load defined messages + $currentCatalogue = $this->loadCurrentMessages($locale, $translationsPath, $loader); + // Merge defined and extracted messages to get all message ids + $mergeOperation = new MergeOperation($extractedCatalogue, $currentCatalogue); + $allMessages = $mergeOperation->getResult()->all($domain); if (null !== $domain) { - $outputMessage .= sprintf(' and domain "%s"', $domain); + $allMessages = array($domain => $allMessages); } - $output->writeln($outputMessage); - - return; - } + // No defined or extracted messages + if (empty($allMessages) || null !== $domain && empty($allMessages[$domain])) { + $outputMessage = sprintf('No defined or extracted messages for locale "%s"', $locale); - // Load the fallback catalogues - $fallbackCatalogues = array(); - $translator = $this->getContainer()->get('translator'); - if ($translator instanceof Translator) { - foreach ($translator->getFallbackLocales() as $fallbackLocale) { - if ($fallbackLocale === $locale) { - continue; + if (null !== $domain) { + $outputMessage .= sprintf(' and domain "%s"', $domain); } - $fallbackCatalogue = new MessageCatalogue($fallbackLocale); - $loader->loadMessages($translationsPath, $fallbackCatalogue); - $fallbackCatalogues[] = $fallbackCatalogue; - } - } + $output->writeln($outputMessage); - if (class_exists('Symfony\Component\Console\Helper\Table')) { - $table = new Table($output); - } else { - $table = $this->getHelperSet()->get('table'); - } + continue; + } - // Display header line - $headers = array('State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale)); - foreach ($fallbackCatalogues as $fallbackCatalogue) { - $headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale()); - } - $table->setHeaders($headers); + // Load the fallback catalogues + $fallbackCatalogues = $this->loadFallbackCatalogues($locale, $translationsPath, $loader); + if (class_exists('Symfony\Component\Console\Helper\Table')) { + $table = new Table($output); + } else { + $table = $this->getHelperSet()->get('table'); + } - // Iterate all message ids and determine their state - foreach ($allMessages as $domain => $messages) { - foreach (array_keys($messages) as $messageId) { - $value = $currentCatalogue->get($messageId, $domain); - $states = array(); + // Display header line + $headers = array('State', 'Domain', 'Id', sprintf('Message Preview (%s)', $locale)); + foreach ($fallbackCatalogues as $fallbackCatalogue) { + $headers[] = sprintf('Fallback Message Preview (%s)', $fallbackCatalogue->getLocale()); + } + $table->setHeaders($headers); + + // Iterate all message ids and determine their state + foreach ($allMessages as $domain => $messages) { + foreach (array_keys($messages) as $messageId) { + $value = $currentCatalogue->get($messageId, $domain); + $states = array(); + + if ($extractedCatalogue->defines($messageId, $domain)) { + if (!$currentCatalogue->defines($messageId, $domain)) { + $states[] = self::MESSAGE_MISSING; + } + } elseif ($currentCatalogue->defines($messageId, $domain)) { + $states[] = self::MESSAGE_UNUSED; + } - if ($extractedCatalogue->defines($messageId, $domain)) { - if (!$currentCatalogue->defines($messageId, $domain)) { - $states[] = self::MESSAGE_MISSING; + if (!in_array(self::MESSAGE_UNUSED, $states) && true === $input->getOption('only-unused') + || !in_array(self::MESSAGE_MISSING, $states) && true === $input->getOption('only-missing')) { + continue; } - } elseif ($currentCatalogue->defines($messageId, $domain)) { - $states[] = self::MESSAGE_UNUSED; - } - if (!in_array(self::MESSAGE_UNUSED, $states) && true === $input->getOption('only-unused') - || !in_array(self::MESSAGE_MISSING, $states) && true === $input->getOption('only-missing')) { - continue; - } + foreach ($fallbackCatalogues as $fallbackCatalogue) { + if ($fallbackCatalogue->defines($messageId, $domain) && $value === $fallbackCatalogue->get($messageId, $domain)) { + $states[] = self::MESSAGE_EQUALS_FALLBACK; - foreach ($fallbackCatalogues as $fallbackCatalogue) { - if ($fallbackCatalogue->defines($messageId, $domain) && $value === $fallbackCatalogue->get($messageId, $domain)) { - $states[] = self::MESSAGE_EQUALS_FALLBACK; + break; + } + } - break; + $row = array($this->formatStates($states), $domain, $this->formatId($messageId), $this->sanitizeString($value)); + foreach ($fallbackCatalogues as $fallbackCatalogue) { + $row[] = $this->sanitizeString($fallbackCatalogue->get($messageId, $domain)); } - } - $row = array($this->formatStates($states), $domain, $this->formatId($messageId), $this->sanitizeString($value)); - foreach ($fallbackCatalogues as $fallbackCatalogue) { - $row[] = $this->sanitizeString($fallbackCatalogue->get($messageId, $domain)); + $table->addRow($row); } - - $table->addRow($row); } - } - if (class_exists('Symfony\Component\Console\Helper\Table')) { - $table->render(); - } else { - $table->render($output); + if (class_exists('Symfony\Component\Console\Helper\Table')) { + $table->render(); + } else { + $table->render($output); + } + $output->writeln(''); } } @@ -263,4 +264,63 @@ private function sanitizeString($string, $length = 40) return $string; } + + /** + * @param string $locale + * @param string $rootPath + * + * @return MessageCatalogue + */ + private function extractMessages($locale, $rootPath) + { + $extractedCatalogue = new MessageCatalogue($locale); + if (is_dir($rootPath.'/Resources/views')) { + $this->getContainer()->get('translation.extractor')->extract($rootPath.'/Resources/views', $extractedCatalogue); + } + + return $extractedCatalogue; + } + + /** + * @param string $locale + * @param string $translationsPath + * @param TranslationLoader $loader + * + * @return MessageCatalogue + */ + private function loadCurrentMessages($locale, $translationsPath, TranslationLoader $loader) + { + $currentCatalogue = new MessageCatalogue($locale); + if (is_dir($translationsPath)) { + $loader->loadMessages($translationsPath, $currentCatalogue); + } + + return $currentCatalogue; + } + + /** + * @param string $locale + * @param string $translationsPath + * @param TranslationLoader $loader + * + * @return MessageCatalogue[] + */ + private function loadFallbackCatalogues($locale, $translationsPath, TranslationLoader $loader) + { + $fallbackCatalogues = array(); + $translator = $this->getContainer()->get('translator'); + if ($translator instanceof Translator) { + foreach ($translator->getFallbackLocales() as $fallbackLocale) { + if ($fallbackLocale === $locale) { + continue; + } + + $fallbackCatalogue = new MessageCatalogue($fallbackLocale); + $loader->loadMessages($translationsPath, $fallbackCatalogue); + $fallbackCatalogues[] = $fallbackCatalogue; + } + } + + return $fallbackCatalogues; + } } From 952929cb67614309556f876583cafafcf9e860a9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 5 May 2015 21:46:18 +0100 Subject: [PATCH 012/976] [FrameworkBundle][EventDispatcher] Add priorities to the debug:event-dispatcher command --- .../Console/Descriptor/JsonDescriptor.php | 20 ++++++--- .../Console/Descriptor/MarkdownDescriptor.php | 25 +++++++---- .../Console/Descriptor/TextDescriptor.php | 43 ++++++++++--------- .../Console/Descriptor/XmlDescriptor.php | 31 ++++++++----- .../Console/Descriptor/ObjectsProvider.php | 4 +- .../Descriptor/event_dispatcher_1_event1.json | 6 ++- .../Descriptor/event_dispatcher_1_event1.md | 2 + .../Descriptor/event_dispatcher_1_event1.txt | 12 +++--- .../Descriptor/event_dispatcher_1_event1.xml | 4 +- .../Descriptor/event_dispatcher_1_events.json | 9 ++-- .../Descriptor/event_dispatcher_1_events.md | 3 ++ .../Descriptor/event_dispatcher_1_events.txt | 22 +++++----- .../Descriptor/event_dispatcher_1_events.xml | 6 +-- .../ContainerAwareEventDispatcher.php | 4 +- .../Debug/TraceableEventDispatcher.php | 4 +- .../EventDispatcher/EventDispatcher.php | 6 ++- .../ImmutableEventDispatcher.php | 4 +- 17 files changed, 125 insertions(+), 80 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index e2da8cffe797..9c3a0648dd6b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -288,17 +288,27 @@ private function getEventDispatcherListenersData(EventDispatcherInterface $event { $data = array(); - $registeredListeners = $eventDispatcher->getListeners($event); + $registeredListeners = $eventDispatcher->getListeners($event, true); if (null !== $event) { - foreach ($registeredListeners as $listener) { - $data[] = $this->getCallableData($listener); + krsort($registeredListeners); + foreach ($registeredListeners as $priority => $listeners) { + foreach ($listeners as $listener) { + $listener = $this->getCallableData($listener); + $listener['priority'] = $priority; + $data[] = $listener; + } } } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { - foreach ($eventListeners as $eventListener) { - $data[$eventListened][] = $this->getCallableData($eventListener); + krsort($eventListeners); + foreach ($eventListeners as $priority => $listeners) { + foreach ($listeners as $listener) { + $listener = $this->getCallableData($listener); + $listener['priority'] = $priority; + $data[$eventListened][] = $listener; + } } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 84877461c832..a47ff781dd0b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -269,21 +269,30 @@ protected function describeEventDispatcherListeners(EventDispatcherInterface $ev $this->write(sprintf('# %s', $title)."\n"); - $registeredListeners = $eventDispatcher->getListeners($event); + $registeredListeners = $eventDispatcher->getListeners($event, true); if (null !== $event) { - foreach ($registeredListeners as $order => $listener) { - $this->write("\n".sprintf('## Listener %d', $order + 1)."\n"); - $this->describeCallable($listener); + krsort($registeredListeners); + $order = 1; + foreach ($registeredListeners as $priority => $listeners) { + foreach ($listeners as $listener) { + $this->write("\n".sprintf('## Listener %d', $order++)."\n"); + $this->describeCallable($listener); + $this->write(sprintf('- Priority: `%d`', $priority)."\n"); + } } } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { $this->write("\n".sprintf('## %s', $eventListened)."\n"); - - foreach ($eventListeners as $order => $eventListener) { - $this->write("\n".sprintf('### Listener %d', $order + 1)."\n"); - $this->describeCallable($eventListener); + krsort($eventListeners); + $order = 1; + foreach ($eventListeners as $priority => $listeners) { + foreach ($listeners as $listener) { + $this->write("\n".sprintf('### Listener %d', $order++)."\n"); + $this->describeCallable($listener); + $this->write(sprintf('- Priority: `%d`', $priority)."\n"); + } } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 56ffa455faca..47d717f2825f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -336,33 +336,16 @@ protected function describeEventDispatcherListeners(EventDispatcherInterface $ev $this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options); - $registeredListeners = $eventDispatcher->getListeners($event); + $registeredListeners = $eventDispatcher->getListeners($event, true); if (null !== $event) { $this->writeText("\n"); - $table = new Table($this->getOutput()); - $table->getStyle()->setCellHeaderFormat('%s'); - $table->setHeaders(array('Order', 'Callable')); - - foreach ($registeredListeners as $order => $listener) { - $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener))); - } - - $table->render(); + $this->renderEventListenerTable($registeredListeners); } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { $this->writeText(sprintf("\n[Event] %s\n", $eventListened), $options); - - $table = new Table($this->getOutput()); - $table->getStyle()->setCellHeaderFormat('%s'); - $table->setHeaders(array('Order', 'Callable')); - - foreach ($eventListeners as $order => $eventListener) { - $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener))); - } - - $table->render(); + $this->renderEventListenerTable($eventListeners); } } } @@ -375,6 +358,26 @@ protected function describeCallable($callable, array $options = array()) $this->writeText($this->formatCallable($callable), $options); } + /** + * @param array $array + */ + private function renderEventListenerTable(array $eventListeners) + { + $table = new Table($this->getOutput()); + $table->getStyle()->setCellHeaderFormat('%s'); + $table->setHeaders(array('Order', 'Callable', 'Priority')); + + krsort($eventListeners); + $order = 1; + foreach ($eventListeners as $priority => $listeners) { + foreach ($listeners as $listener) { + $table->addRow(array(sprintf('#%d', $order++), $this->formatCallable($listener), $priority)); + } + } + + $table->render(); + } + /** * @param array $array * diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index c37a9009fcff..e62c71a2a018 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -446,13 +446,9 @@ private function getEventDispatcherListenersDocument(EventDispatcherInterface $e $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->appendChild($eventDispatcherXML = $dom->createElement('event-dispatcher')); - $registeredListeners = $eventDispatcher->getListeners($event); + $registeredListeners = $eventDispatcher->getListeners($event, true); if (null !== $event) { - foreach ($registeredListeners as $listener) { - $callableXML = $this->getCallableDocument($listener); - - $eventDispatcherXML->appendChild($eventDispatcherXML->ownerDocument->importNode($callableXML->childNodes->item(0), true)); - } + $this->appendEventListenerDocument($eventDispatcherXML, $registeredListeners); } else { ksort($registeredListeners); @@ -460,17 +456,30 @@ private function getEventDispatcherListenersDocument(EventDispatcherInterface $e $eventDispatcherXML->appendChild($eventXML = $dom->createElement('event')); $eventXML->setAttribute('name', $eventListened); - foreach ($eventListeners as $eventListener) { - $callableXML = $this->getCallableDocument($eventListener); - - $eventXML->appendChild($eventXML->ownerDocument->importNode($callableXML->childNodes->item(0), true)); - } + $this->appendEventListenerDocument($eventXML, $eventListeners); } } return $dom; } + /** + * @param DOMElement $element + * @param array $eventListeners + */ + private function appendEventListenerDocument(\DOMElement $element, array $eventListeners) + { + krsort($eventListeners); + foreach ($eventListeners as $priority => $listeners) { + foreach ($listeners as $listener) { + $callableXML = $this->getCallableDocument($listener); + $callableXML->childNodes->item(0)->setAttribute('priority', $priority); + + $element->appendChild($element->ownerDocument->importNode($callableXML->childNodes->item(0), true)); + } + } + } + /** * @param callable $callable * diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php index 94db08b5bdc9..1ad6c286be1c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -157,8 +157,8 @@ public static function getEventDispatchers() { $eventDispatcher = new EventDispatcher(); - $eventDispatcher->addListener('event1', 'global_function'); - $eventDispatcher->addListener('event1', function () { return 'Closure'; }); + $eventDispatcher->addListener('event1', 'global_function', 255); + $eventDispatcher->addListener('event1', function () { return 'Closure'; }, -1); $eventDispatcher->addListener('event2', new CallableClass()); return array('event_dispatcher_1' => $eventDispatcher); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json index e40e130d453c..4b68f0cefc0e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json @@ -1,9 +1,11 @@ [ { "type": "function", - "name": "global_function" + "name": "global_function", + "priority": 255 }, { - "type": "closure" + "type": "closure", + "priority": -1 } ] diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md index 206c44f71752..98b81ecdce42 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md @@ -4,7 +4,9 @@ - Type: `function` - Name: `global_function` +- Priority: `255` ## Listener 2 - Type: `closure` +- Priority: `-1` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt index 22b17a19cfb9..45035d12d622 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt @@ -1,8 +1,8 @@ [event_dispatcher] Registered listeners for event event1 -+-------+-------------------+ -| Order | Callable | -+-------+-------------------+ -| #1 | global_function() | -| #2 | \Closure() | -+-------+-------------------+ ++-------+-------------------+----------+ +| Order | Callable | Priority | ++-------+-------------------+----------+ +| #1 | global_function() | 255 | +| #2 | \Closure() | -1 | ++-------+-------------------+----------+ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml index 4806f1f1280c..bc03189af7b8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml @@ -1,5 +1,5 @@ - - + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json index 56fc7a4f1e54..30772d9a4a21 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json @@ -2,16 +2,19 @@ "event1": [ { "type": "function", - "name": "global_function" + "name": "global_function", + "priority": 255 }, { - "type": "closure" + "type": "closure", + "priority": -1 } ], "event2": [ { "type": "object", - "name": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass" + "name": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass", + "priority": 0 } ] } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md index ad4b79e3117f..eb809789d5f1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md @@ -6,10 +6,12 @@ - Type: `function` - Name: `global_function` +- Priority: `255` ### Listener 2 - Type: `closure` +- Priority: `-1` ## event2 @@ -17,3 +19,4 @@ - Type: `object` - Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` +- Priority: `0` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt index 95a5b4648e93..88e5dc9c8969 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt @@ -1,16 +1,16 @@ [event_dispatcher] Registered listeners by event [Event] event1 -+-------+-------------------+ -| Order | Callable | -+-------+-------------------+ -| #1 | global_function() | -| #2 | \Closure() | -+-------+-------------------+ ++-------+-------------------+----------+ +| Order | Callable | Priority | ++-------+-------------------+----------+ +| #1 | global_function() | 255 | +| #2 | \Closure() | -1 | ++-------+-------------------+----------+ [Event] event2 -+-------+-----------------------------------------------------------------------------------+ -| Order | Callable | -+-------+-----------------------------------------------------------------------------------+ -| #1 | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() | -+-------+-----------------------------------------------------------------------------------+ ++-------+-----------------------------------------------------------------------------------+----------+ +| Order | Callable | Priority | ++-------+-----------------------------------------------------------------------------------+----------+ +| #1 | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() | 0 | ++-------+-----------------------------------------------------------------------------------+----------+ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml index 3e4b20d82379..d7443f974366 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml @@ -1,10 +1,10 @@ - - + + - + diff --git a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php index 76f0e387762a..e71da1fb6716 100644 --- a/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -118,7 +118,7 @@ public function hasListeners($eventName = null) /** * @see EventDispatcherInterface::getListeners() */ - public function getListeners($eventName = null) + public function getListeners($eventName = null, $withPriorities = false) { if (null === $eventName) { foreach ($this->listenerIds as $serviceEventName => $args) { @@ -128,7 +128,7 @@ public function getListeners($eventName = null) $this->lazyLoad($eventName); } - return parent::getListeners($eventName); + return parent::getListeners($eventName, $withPriorities); } /** diff --git a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php index 7653ccfb7175..0106f74f3a30 100644 --- a/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php @@ -94,9 +94,9 @@ public function removeSubscriber(EventSubscriberInterface $subscriber) /** * {@inheritdoc} */ - public function getListeners($eventName = null) + public function getListeners($eventName = null, $withPriorities = false) { - return $this->dispatcher->getListeners($eventName); + return $this->dispatcher->getListeners($eventName, $withPriorities); } /** diff --git a/src/Symfony/Component/EventDispatcher/EventDispatcher.php b/src/Symfony/Component/EventDispatcher/EventDispatcher.php index 46c11100b341..e3d587939f98 100644 --- a/src/Symfony/Component/EventDispatcher/EventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/EventDispatcher.php @@ -58,8 +58,12 @@ public function dispatch($eventName, Event $event = null) /** * @see EventDispatcherInterface::getListeners() */ - public function getListeners($eventName = null) + public function getListeners($eventName = null, $withPriorities = false) { + if (true === $withPriorities) { + return $eventName ? $this->listeners[$eventName] : array_filter($this->listeners); + } + if (null !== $eventName) { if (!isset($this->sorted[$eventName])) { $this->sortListeners($eventName); diff --git a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php index 7ef9ece75718..f979304e9cee 100644 --- a/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php +++ b/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php @@ -78,9 +78,9 @@ public function removeSubscriber(EventSubscriberInterface $subscriber) /** * {@inheritdoc} */ - public function getListeners($eventName = null) + public function getListeners($eventName = null, $withPriorities = false) { - return $this->dispatcher->getListeners($eventName); + return $this->dispatcher->getListeners($eventName, $withPriorities); } /** From 2869a32cf11811af1c8feeb0e51aac5ea8fffc9a Mon Sep 17 00:00:00 2001 From: Abdellatif Ait boudad Date: Mon, 4 May 2015 14:40:06 +0000 Subject: [PATCH 013/976] [Translator] deprecate getMessages in favor of getCatalogue. --- UPGRADE-2.8.md | 24 +++++++++++++++++++ .../Component/Translation/CHANGELOG.md | 4 ++++ .../Translation/Tests/TranslatorTest.php | 3 ++- .../Component/Translation/Translator.php | 2 ++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 UPGRADE-2.8.md diff --git a/UPGRADE-2.8.md b/UPGRADE-2.8.md new file mode 100644 index 000000000000..07c336c7c2ba --- /dev/null +++ b/UPGRADE-2.8.md @@ -0,0 +1,24 @@ +UPGRADE FROM 2.7 to 2.8 +======================= + +Translator +---------- + * The `getMessages()` method of the `Symfony\Component\Translation\Translator` was deprecated and will be removed in + Symfony 3.0. You should use the `getCatalogue()` method of the `Symfony\Component\Translation\TranslatorBagInterface`. + + Before: + + ```php + $messages = $translator->getMessages(); + ``` + + After: + + ```php + $catalogue = $translator->getCatalogue($locale); + $messages = $catalogue->all(); + + while ($catalogue = $catalogue->getFallbackCatalogue()) { + $messages = array_replace_recursive($catalogue->all(), $messages); + } + ``` diff --git a/src/Symfony/Component/Translation/CHANGELOG.md b/src/Symfony/Component/Translation/CHANGELOG.md index 157752ca7718..35f4087459dc 100644 --- a/src/Symfony/Component/Translation/CHANGELOG.md +++ b/src/Symfony/Component/Translation/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +2.8.0 +----- + * deprecated Translator::getMessages(), rely on the TranslatorBagInterface::getCatalogue() method instead. + 2.7.0 ----- diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php index 3ee9be019dd2..ec06e50b0d62 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -497,9 +497,10 @@ public function testTransChoiceFallbackWithNoTranslation() } /** + * @group legacy * @dataProvider dataProviderGetMessages */ - public function testGetMessages($resources, $locale, $expected) + public function testLegacyGetMessages($resources, $locale, $expected) { $locales = array_keys($resources); $_locale = !is_null($locale) ? $locale : reset($locales); diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 7ed987d41ee8..d9466cb07a91 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -292,6 +292,8 @@ protected function getLoaders() */ public function getMessages($locale = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Rely on the TranslatorBagInterface::getCatalogue() method instead', E_USER_DEPRECATED); + $catalogues = array(); $catalogues[] = $catalogue = $this->getCatalogue($locale); while ($catalogue = $catalogue->getFallbackCatalogue()) { From 128140eccf10eda4923c2a49d42a3e16f19c3653 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 6 May 2015 18:31:54 +0200 Subject: [PATCH 014/976] fixed CS --- .../Console/Descriptor/MarkdownDescriptor.php | 2 +- .../FrameworkBundle/Console/Descriptor/TextDescriptor.php | 8 ++++---- .../Tests/Console/Descriptor/ObjectsProvider.php | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index a47ff781dd0b..8231c874779d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -113,7 +113,7 @@ protected function describeContainerService($service, array $options = array()) } elseif ($service instanceof Definition) { $this->describeContainerDefinition($service, $childOptions); } else { - $this->write(sprintf("**`%s`:** `%s`", $options['id'], get_class($service))); + $this->write(sprintf('**`%s`:** `%s`', $options['id'], get_class($service))); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 47d717f2825f..691683206077 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -212,7 +212,7 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o foreach ($definition->getTag($showTag) as $key => $tag) { $tagValues = array(); foreach ($tagsNames as $tagName) { - $tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : ""; + $tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : ''; } if (0 === $key) { $table->addRow(array_merge(array($serviceId), $tagValues, array($definition->getClass()))); @@ -225,10 +225,10 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o } } elseif ($definition instanceof Alias) { $alias = $definition; - $table->addRow(array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, "") : array())); + $table->addRow(array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, '') : array())); } else { // we have no information (happens with "service_container") - $table->addRow(array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, "") : array())); + $table->addRow(array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, '') : array())); } } @@ -245,7 +245,7 @@ protected function describeContainerDefinition(Definition $definition, array $op : array(); $description[] = sprintf('Service Id %s', isset($options['id']) ? $options['id'] : '-'); - $description[] = sprintf('Class %s', $definition->getClass() ?: "-"); + $description[] = sprintf('Class %s', $definition->getClass() ?: '-'); $tags = $definition->getTags(); if (count($tags)) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php index 1ad6c286be1c..810038909d90 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -114,6 +114,7 @@ public static function getContainerDefinitions() /** * @deprecated since version 2.7, to be removed in 3.0 + * * @internal */ public static function getLegacyContainerDefinitions() From bba0a25798e115e2727f6e869dc1eace4f18595c Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 5 May 2015 20:36:55 +0100 Subject: [PATCH 015/976] [FrameworkBundle][DX] Add option to specify additional translation loading paths --- .../FrameworkBundle/DependencyInjection/Configuration.php | 4 ++++ .../DependencyInjection/FrameworkExtension.php | 7 +++++++ .../Resources/config/schema/symfony-1.0.xsd | 1 + .../Tests/DependencyInjection/ConfigurationTest.php | 1 + .../Tests/DependencyInjection/Fixtures/php/full.php | 1 + .../Fixtures/translations/test_paths.en.yml | 2 ++ .../Tests/DependencyInjection/Fixtures/xml/full.xml | 4 +++- .../Tests/DependencyInjection/Fixtures/yml/full.yml | 1 + .../Tests/DependencyInjection/FrameworkExtensionTest.php | 5 +++++ 9 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 8a73424d9463..d6dc31baedcc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -575,6 +575,7 @@ private function addTranslatorSection(ArrayNodeDefinition $rootNode) ->info('translator configuration') ->canBeEnabled() ->fixXmlConfig('fallback') + ->fixXmlConfig('path') ->children() ->arrayNode('fallbacks') ->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end() @@ -582,6 +583,9 @@ private function addTranslatorSection(ArrayNodeDefinition $rootNode) ->defaultValue(array('en')) ->end() ->booleanNode('logging')->defaultValue($this->debug)->end() + ->arrayNode('paths') + ->prototype('scalar')->end() + ->end() ->end() ->end() ->end() diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index a7d8aab22079..e2e8a8416385 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -692,6 +692,13 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder $dirs[] = $dir; } } + foreach ($config['paths'] as $dir) { + if (is_dir($dir)) { + $dirs[] = $dir; + } else { + throw new \UnexpectedValueException(sprintf('%s defined in translator.paths does not exist or is not a directory', $dir)); + } + } if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/translations')) { $dirs[] = $dir; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd index fa7aa2b2bd80..e1ca041e6114 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd @@ -183,6 +183,7 @@ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 617be624fdb9..f553d6387f26 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -146,6 +146,7 @@ protected static function getBundleDefaultConfig() 'enabled' => false, 'fallbacks' => array('en'), 'logging' => true, + 'paths' => array(), ), 'validation' => array( 'enabled' => false, diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php index 5022aeaf9f20..a035b56d7002 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php @@ -50,6 +50,7 @@ 'translator' => array( 'enabled' => true, 'fallback' => 'fr', + 'paths' => array('%kernel.root_dir%/Fixtures/translations'), ), 'validation' => array( 'enabled' => true, diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml new file mode 100644 index 000000000000..d4e682c47c9c --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml @@ -0,0 +1,2 @@ +custom: + paths: test diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml index 5b16a5979609..bf4537b910e8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml @@ -34,7 +34,9 @@ theme2 - + + %kernel.root_dir%/Fixtures/translations + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml index be1b41e25f89..47513b1f665b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml @@ -39,6 +39,7 @@ framework: translator: enabled: true fallback: fr + paths: ['%kernel.root_dir%/Fixtures/translations'] validation: enabled: true cache: apc diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 918c676afe1a..21ae0ac775dd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -244,6 +244,11 @@ public function testTranslator() $files, '->registerTranslatorConfiguration() finds Security translation resources' ); + $this->assertContains( + strtr(__DIR__.'/Fixtures/translations/test_paths.en.yml', '/', DIRECTORY_SEPARATOR), + $files, + '->registerTranslatorConfiguration() finds translation resources in custom paths' + ); $calls = $container->getDefinition('translator.default')->getMethodCalls(); $this->assertEquals(array('fr'), $calls[0][1][0]); From 5fdc650dfe928fb7ccc65226da336a7d5c13dfff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haso=C5=88?= Date: Wed, 7 Jan 2015 16:59:26 +0100 Subject: [PATCH 016/976] [WebProfilerBundle] Improved page for logs --- .../Bridge/Monolog/Handler/DebugHandler.php | 1 + .../views/Collector/logger.html.twig | 26 +++++++++++++------ .../views/Profiler/profiler.css.twig | 8 +++--- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php b/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php index c959a5a94fcb..f1046c96a6ad 100644 --- a/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/DebugHandler.php @@ -35,6 +35,7 @@ public function getLogs() 'priority' => $record['level'], 'priorityName' => $record['level_name'], 'context' => $record['context'], + 'channel' => isset($record['channel']) ? $record['channel'] : '', ); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 32a63b4b4ca5..b27d783ded3c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -87,20 +87,30 @@ {% if collector.logs %} - {% else %}

No logs available. @@ -120,13 +106,11 @@ {% macro display_message(log_index, log, is_deprecation) %} - {{ is_deprecation ? 'DEPRECATED' : log.priorityName }} - {{ log.message }} - {% if is_deprecation %} {% set stack = log.context.stack|default([]) %} {% set id = 'sf-call-stack-' ~ log_index %} - {{ log.message }} + DEPRECATED - {{ log.message }} {% if stack %} @@ -156,6 +140,7 @@ {% endif %} {% endfor %} {% else %} + {{ log.priorityName }} - {{ log.message }} {% if log.context is defined and log.context is not empty %}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig index 397b5e830592..0b7649e90ef6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -2,16 +2,22 @@ {% block toolbar %} {% set icon %} + {% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %} - - {{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB + {{ '%.1f'|format(collector.memory / 1024 / 1024) }} + MB {% endset %} {% set text %}

+ +
+ PHP memory limit + {{ collector.memoryLimit == -1 ? '∞' : '%.1f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB
{% endset %} - {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %} + {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false, 'block_status': status_color } %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 4d00a07d5fd8..8eaf168be160 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -16,26 +16,30 @@ {{ collector.controller }} {% endif %} {% endset %} - {% set request_status_code_color = (400 > collector.statuscode) ? ((200 == collector.statuscode) ? 'green' : 'yellow') : 'red'%} - {% set request_route = collector.route ? collector.route : 'NONE' %} + + {% set request_status_code_color = (400 > collector.statuscode) ? ((200 == collector.statuscode) ? 'green' : 'yellow') : 'red' %} + {% set icon %} - - {{ collector.statuscode }} - {{ request_handler }} + {{ collector.statuscode }} + {{ request_handler }} {% endset %} {% set text %} {% spaceless %}
- Status + HTTP status {{ collector.statuscode }} {{ collector.statustext }}
- Controller + Controller method {{ request_handler }}
+
+ Controller file + {{ collector.controller.class }} +
Route name - {{ request_route }} + {{ collector.route|default('NONE') }}
Has session diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index db807a721168..7aff16eb7082 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -16,18 +16,19 @@ {% endif %} {% block toolbar %} - {% set duration = collector.events|length ? '%.0f ms'|format(collector.duration) : 'n/a' %} + {% set duration = collector.events|length ? '%.0f'|format(collector.duration) : 'n/a' %} + {% set status_color = collector.events|length ? collector.duration > 1000 ? 'yellow' : '' %} {% set icon %} - - {{ duration }} + {{ duration }} + ms {% endset %} {% set text %}
Total time - {{ duration }} + {{ duration }} ms
{% endset %} - {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} + {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url, 'block_status': status_color } %} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig index 840e7cd1acc8..815ce29320fa 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig @@ -5,14 +5,11 @@ {% block toolbar %} {% if collector.messages|length %} {% set icon %} - - {% if collector.countMissings %} - {% set status_color = "red" %} - {% elseif collector.countFallbacks %} - {% set status_color = "yellow" %} - {% endif %} + + + {% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' : '' %} {% set error_count = collector.countMissings + collector.countFallbacks %} - {{ error_count ?: collector.countdefines }} + {{ error_count ?: collector.countdefines }} {% endset %} {% set text %} {% if collector.countMissings %} @@ -34,7 +31,7 @@
{% endif %} {% endset %} - {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} + {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url, 'block_status': status_color } %} {% endif %} {% endblock %} @@ -57,14 +54,6 @@ {% endblock %} {% block panelContent %} - {% set filter = request.query.get('state', '-1') %} - {% set filterOptions = { - '-1': '', - (constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_DEFINED')): 'Defined messages', - (constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING')): 'Missing messages', - (constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK')): 'Fallback messages', - } %} -

Translation Stats

@@ -80,22 +69,6 @@ - - - -
Missing messages
{{ collector.countMissings }}
Filter -
- - - -
-
@@ -107,7 +80,7 @@ Id Message Preview - {% for message in collector.messages if message.state == filter or filter == '-1' %} + {% for message in collector.messages %} {{ translator.state(message) }} {{ message.locale }} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 0ecd469bd073..5d102e137019 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -1,10 +1,13 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} - {% set time = collector.templatecount ? '%0.0f ms'|format(collector.time) : 'n/a' %} + {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %} {% set icon %} - Twig - {{ time }} + + Twig + {{ time }} + ms + {% endset %} {% set text %}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index e313380e5109..7cfcface334a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -180,7 +180,7 @@ requestCounter[0].textContent = requestStack.length; - var className = 'sf-toolbar-ajax-requests sf-toolbar-status'; + var className = 'sf-toolbar-ajax-requests sf-toolvar-value'; if (state == 'ok') { className += ' sf-toolbar-status-green'; } else if (state == 'error') { 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 fd3256534795..3e453b0a212c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig @@ -179,7 +179,7 @@ pre, code { width: 250px; margin-left: -100%; } -table td { +#collector-content table td { background-color: white; } h1 { @@ -273,15 +273,15 @@ ul.alt li { ul.alt li.even { background: #f1f7e2; } -ul.alt li.error, tr.error td { +ul.alt li.error { background-color: #f66; margin-bottom: 1px; } -ul.alt li.warning, tr.warning td { +ul.alt li.warning { background-color: #ffcc00; margin-bottom: 1px; } -ul.alt li.scream, ul.alt li.scream strong, tr.scream td, tr.scream strong { +ul.alt li.scream, ul.alt li.scream strong { color: gray; } ul.sf-call-stack li { diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 8d736a716dd3..c31156d750b6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -7,13 +7,7 @@ padding: 5px 5px 0; - background-color: #f7f7f7; - background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff)); - background-image: -o-linear-gradient(top, #e4e4e4, #ffffff); - background: linear-gradient(top, #e4e4e4, #ffffff); - - border-radius: 16px 0 0 0; + background-color: #222; z-index: 6000000; } @@ -26,39 +20,32 @@ } .sf-toolbarreset { - position: fixed; - background-color: #f7f7f7; + background-color: #222; + box-shadow: 0 -1px 0px rgba(0, 0, 0, 0.2); + bottom: 0; + color: #EEE; + font: 11px Arial, sans-serif; + height: 36px; left: 0; - right: 0; margin: 0; - padding: 0 40px 0 0; - z-index: 6000000; - font: 11px Verdana, Arial, sans-serif; + padding: 0 36px 0 0; + position: fixed; + right: 0; text-align: left; - color: #2f2f2f; - - background-image: -moz-linear-gradient(top, #e4e4e4, #ffffff); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e4e4e4), to(#ffffff)); - background-image: -o-linear-gradient(top, #e4e4e4, #ffffff); - background: linear-gradient(top, #e4e4e4, #ffffff); - - bottom: 0; - border-top: 1px solid #bbb; + z-index: 6000000; } .sf-toolbarreset abbr { - border-bottom: 1px dotted #000000; - cursor: help; -} -.sf-toolbarreset span, -.sf-toolbarreset div, -.sf-toolbarreset td, -.sf-toolbarreset th { - font-size: 11px; + border: none; + cursor: text; } .sf-toolbarreset img { width: auto; display: inline; } +.sf-toolbarreset svg, +.sf-toolbarreset img { + max-height: 24px; +} .sf-toolbarreset table { border-collapse: collapse; border-spacing: 0; @@ -70,42 +57,74 @@ table-layout: auto; } .sf-toolbarreset .hide-button { + background: #444; + cursor: pointer; display: block; position: absolute; top: 0; right: 0; - width: 40px; - height: 40px; + width: 36px; + height: 30px; cursor: pointer; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAAllBMVEXDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PExMTPz8/Q0NDR0dHT09Pb29vc3Nzf39/h4eHi4uLj4+P6+vr7+/v8/Pz9/f3///+Nh2QuAAAAIXRSTlMABgwPGBswMzk8QktRV4SKjZOWmaKlq7TAxszb3urt+fy1vNEpAAAAiklEQVQIHUXBBxKCQBREwRFzDqjoGh+C2YV//8u5Sll2S0E/dof1tKdKM6GyqCto7PjZRJIS/mbSELgXOSd/BzpKIH1ZefVWpDDTHsi8mZVnwImPi5ndCLbaAZk3M58Bay0h9VbeSvMpjDUAHj4jL55AW1rxN5fU2PLjIgVRzNdxVFOlGzvnJi0Fb1XNGBHA9uQOAAAAAElFTkSuQmCC'); - background-repeat: no-repeat; - background-position: 13px 11px; + padding-top: 6px; + text-align: center; +} +.sf-toolbarreset .hide-button svg { + max-height: 24px; + max-width: 24px; } .sf-toolbar-block { - white-space: nowrap; - color: #2f2f2f; + cursor: default; display: block; - min-height: 28px; - border-bottom: 1px solid #e4e4e4; - border-right: 1px solid #e4e4e4; - padding: 0; float: left; - cursor: default; + margin-right: 0px; + white-space: nowrap; +} +.sf-toolbar-block a:hover { + text-decoration: none; +} +.sf-toolbar-block-config-symfony, +.sf-toolbar-block-config-php { + float: right; + margin-left: 0; + margin-right: 0; +} +.sf-toolbar-block-time { + margin-right: 0; +} +.sf-toolbar-block-ajax { + display: none; } .sf-toolbar-block span { display: inline-block; } +.sf-toolbar-block .sf-toolbar-value { + color: #F5F5F5; + font-size: 13px; + line-height: 36px; + padding: 0; +} +.sf-toolbar-block .sf-toolbar-label { + color: #AAA; + font-size: 12px; +} +.sf-toolbar-block-config-php .sf-toolbar-label, +.sf-toolbar-block-config-symfony .sf-toolbar-label { + font-size: 11px; +} +.sf-toolbar-block-twig img { + opacity: .8; +} .sf-toolbar-block .sf-toolbar-info-piece { - line-height: 19px; - margin-bottom: 5px; + line-height: 1.4; + margin-bottom: 8px; } .sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { padding: 0px 5px; - border-radius: 5px; margin-bottom: 0px; vertical-align: top; } @@ -114,16 +133,26 @@ margin-bottom: 0; } -.sf-toolbar-block .sf-toolbar-info-piece a, -.sf-toolbar-block .sf-toolbar-info-piece abbr { - color: #2f2f2f; +.sf-toolbar-block .sf-toolbar-info-piece a { + color: #75D1EA; + text-decoration: underline; +} +.sf-toolbar-block .sf-toolbar-info-piece a:hover { + text-decoration: none; } .sf-toolbar-block .sf-toolbar-info-piece b { + color: #AAA; display: inline-block; + font-size: 11px; min-width: 110px; vertical-align: top; } +.sf-toolbar-block .sf-toolbar-info-piece span, +.sf-toolbar-block .sf-toolbar-info-piece abbr { + color: #F5F5F5; + font-size: 12px; +} .sf-toolbar-block .sf-toolbar-info-with-next-pointer:after { content: ' :: '; @@ -133,20 +162,16 @@ .sf-toolbar-block .sf-toolbar-info-with-delimiter { border-right: 1px solid #999; padding-right: 5px; + margin-right: 5px; } .sf-toolbar-block .sf-toolbar-info { + background-color: #444; + bottom: 36px; + color: #F5F5F5; display: none; - position: absolute; - background-color: #fff; - border: 1px solid #bbb; padding: 9px 0; - margin-left: -1px; - - bottom: 38px; - border-bottom-width: 0; - border-bottom: 1px solid #bbb; - border-radius: 4px 4px 0 0; + position: absolute; } .sf-toolbar-block .sf-toolbar-info:empty { @@ -165,43 +190,67 @@ min-height: 13px; } -.sf-toolbar-block .sf-toolbar-status abbr { - color: #fff; - border-bottom: 1px dotted black; -} - .sf-toolbar-block .sf-toolbar-status-green { background-color: #759e1a; } - .sf-toolbar-block .sf-toolbar-status-red { - background-color: #a33; + background-color: rgba(200,0,0, 0.8); } - .sf-toolbar-block .sf-toolbar-status-yellow { background-color: #ffcc00; color: #000; } - .sf-toolbar-block .sf-toolbar-status-black { background-color: #000; } +.sf-toolbar-block.sf-toolbar-status-green { + background-color: #759e1a; + color: #FFF; +} +.sf-toolbar-block.sf-toolbar-status-red { + background-color: rgba(200,0,0, 0.8); + color: #FFF; +} +.sf-toolbar-block.sf-toolbar-status-red svg > g > path { + fill: #FFF; +} +.sf-toolbar-block.sf-toolbar-status-yellow { + background-color: rgba(255,158,43, 0.8); + color: #FFF; +} +.sf-toolbar-block-request .sf-toolbar-status { + border-radius: 0 !important; + color: #FFF; + font-size: 14px; + margin-right: 4px; + padding: 10px; +} + +.sf-toolbar-status-green .sf-toolbar-label, +.sf-toolbar-status-yellow .sf-toolbar-label, +.sf-toolbar-status-red .sf-toolbar-label { + color: #FFF; +} + .sf-toolbar-block .sf-toolbar-icon { display: block; + padding: 0 10px; +} +.sf-toolbar-block-request .sf-toolbar-icon { + padding-left: 0; } +/* .sf-toolbar-block .sf-toolbar-icon > a, .sf-toolbar-block .sf-toolbar-icon > span { - display: block; - font-weight: normal; text-decoration: none; margin: 0; padding: 5px 8px; min-width: 20px; text-align: center; vertical-align: middle; -} +}*/ .sf-toolbar-block .sf-toolbar-icon > a, .sf-toolbar-block .sf-toolbar-icon > a:link @@ -216,11 +265,12 @@ .sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg { border-width: 0; vertical-align: middle; + position: relative; + top: -1px; } .sf-toolbar-block .sf-toolbar-icon img + span, .sf-toolbar-block .sf-toolbar-icon svg + span { - margin-left: 5px; - margin-top: 2px; + margin-left: 4px; } .sf-toolbar-block .sf-toolbar-icon .sf-toolbar-status { @@ -230,8 +280,6 @@ } .sf-toolbar-block .sf-toolbar-info-method { - border-bottom: 1px dashed #ccc; - cursor: help; } .sf-toolbar-block .sf-toolbar-info-method[onclick=""] { @@ -260,22 +308,13 @@ display: none; } -.sf-toolbarreset:hover { - box-shadow: rgba(0, 0, 0, 0.3) 0 0 50px; -} - .sf-toolbar-block:hover { - box-shadow: rgba(0, 0, 0, 0.35) 0 0 5px; - border-right: none; - margin-right: 1px; position: relative; } .sf-toolbar-block:hover .sf-toolbar-icon { - background-color: #fff; - border-top: 1px dotted #DDD; + background-color: #444; position: relative; - margin-top: -1px; z-index: 10002; } @@ -286,7 +325,7 @@ z-index: 10001; box-sizing: border-box; padding: 9px; - line-height: 19px; + line-height: 1.5; max-width: 480px; max-height: 480px; @@ -433,11 +472,3 @@ display: none; } } - -/***** Media query print: Do not print the Toolbar. *****/ -@media print { - .sf-toolbar { - display: none; - visibility: hidden; - } -} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index dbe3d0cdbf7b..dc769c9cad8c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -15,7 +15,7 @@ Sfjs.setPreference('toolbar/displayState', 'block'); "> - +
{% endif %} @@ -43,7 +43,7 @@ document.getElementById('sfMiniToolbar-{{ token }}').style.display = 'block'; Sfjs.setPreference('toolbar/displayState', 'none'); "> - + {{ include('@WebProfiler/Icon/close.svg.twig') }} {% endif %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig index ab4e07f93ec7..18292e8f1a20 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -1,5 +1,5 @@ -
{{ text|default('') }}
{% if link %}
{% endif %} From 27353463084f65e2ddec9504d39fdb8ff9d05204 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 8 Jul 2015 10:38:08 +0200 Subject: [PATCH 069/976] Fixed a minor markup error that broke the toolbar --- .../Resources/views/Profiler/toolbar.css.twig | 3 +++ .../Resources/views/Profiler/toolbar_item.html.twig | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 883165795e20..cfce041ac3cc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -89,6 +89,9 @@ margin-left: 0; margin-right: 0; } +.sf-toolbar-block-config svg { + padding-right: 4px; +} .sf-toolbar-block-time { margin-right: 0; } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig index 18292e8f1a20..6a8fa473e4b9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -1,5 +1,5 @@
- {% if link %}{% endif %}
{{ icon|default('') }}
{{ text|default('') }}
{% if link %}
{% endif %} From 51a79c92e6cc3d632e6132f99ef95b9c63829942 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 8 Jul 2015 11:40:01 +0200 Subject: [PATCH 070/976] Reorder toolbar panels --- .../Profiler/TemplateManager.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index 5d0fd277c51d..aa281b8da1a5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -72,6 +72,8 @@ public function getName(Profile $profile, $panel) public function getTemplates(Profile $profile) { $templates = $this->getNames($profile); + $templates = $this->reorderTemplates($templates); + foreach ($templates as $name => $template) { $templates[$name] = $this->twig->loadTemplate($template); } @@ -134,4 +136,47 @@ protected function templateExists($template) return false; } + + /** + * It changes the default order of collector templates to show them in a + * different order which is better for design and aesthetic reasons. + * + * @param array $templates + * @return array + */ + protected function reorderTemplates($templates) + { + $templates = $this->moveArrayElementToFirstPosition($templates, 'memory'); + $templates = $this->moveArrayElementToFirstPosition($templates, 'time'); + $templates = $this->moveArrayElementToFirstPosition($templates, 'request'); + + $templates = $this->moveArrayElementToLastPosition($templates, 'config'); + + return $templates; + } + + private function moveArrayElementToFirstPosition($array, $key) + { + if (!array_key_exists($key, $array)) { + return $array; + } + + $value = $array[$key]; + unset($array[$key]); + + return array_merge(array($key => $value), $array); + } + + private function moveArrayElementToLastPosition($array, $key) + { + if (!array_key_exists($key, $array)) { + return $array; + } + + $value = $array[$key]; + unset($array[$key]); + $array[$key] = $value; + + return $array; + } } From ef53850cb3e9139c2c88fa841a3e085111403bce Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 8 Jul 2015 12:13:55 +0200 Subject: [PATCH 071/976] More fixes and tweaks --- .../Profiler/TemplateManager.php | 1 + .../views/Collector/config.html.twig | 17 +++++------ .../views/Collector/request.html.twig | 9 ++++-- .../Resources/views/Profiler/toolbar.css.twig | 28 ++++++++++--------- 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index aa281b8da1a5..2a12198542bf 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -146,6 +146,7 @@ protected function templateExists($template) */ protected function reorderTemplates($templates) { + $templates = $this->moveArrayElementToFirstPosition($templates, 'twig'); $templates = $this->moveArrayElementToFirstPosition($templates, 'memory'); $templates = $this->moveArrayElementToFirstPosition($templates, 'time'); $templates = $this->moveArrayElementToFirstPosition($templates, 'request'); 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 a0705f6e4c7b..adfc00c8af5c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -33,14 +33,6 @@ {% endset %} {% set text %} - {% if collector.symfonyversion is defined %} - - {% endif %} - {% if collector.applicationname %}
{{ collector.applicationname }} {{ collector.applicationversion }} @@ -94,6 +86,15 @@ PHP SAPI {{ collector.sapiName }}
+ + {% if collector.symfonyversion is defined %} + + {% endif %} {% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: block_status }) }} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 43ef4403748a..68a1d025f9d6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -21,17 +21,19 @@ {% set icon %} {{ collector.statuscode }} - {{ request_handler }} + @ + {{ collector.route }} {% endset %} + {% set text %} {% spaceless %}
HTTP status - {{ collector.statuscode }} {{ collector.statustext }} + {{ collector.statuscode }} {{ collector.statustext }}
Controller method - {{ request_handler }} + {{ request_handler }}
Controller file @@ -47,6 +49,7 @@
{% endspaceless %} {% endset %} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index cfce041ac3cc..32511b929037 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -120,15 +120,19 @@ opacity: .8; } +.sf-toolbar-block .sf-toolbar-info { + display: table; +} .sf-toolbar-block .sf-toolbar-info-piece { + display: table-row; line-height: 1.4; margin-bottom: 8px; } .sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { - padding: 0px 5px; + border-radius: 0; + padding: 2px 5px; margin-bottom: 0px; - vertical-align: top; } .sf-toolbar-block .sf-toolbar-info-piece:last-child { @@ -145,10 +149,12 @@ .sf-toolbar-block .sf-toolbar-info-piece b { color: #AAA; - display: inline-block; + display: table-cell; font-size: 11px; - min-width: 110px; - vertical-align: top; + padding: 4px 8px 4px 4px; +} +.sf-toolbar-block .sf-toolbar-info-piece span { + } .sf-toolbar-block .sf-toolbar-info-piece span, .sf-toolbar-block .sf-toolbar-info-piece abbr { @@ -196,7 +202,7 @@ background-color: #759e1a; } .sf-toolbar-block .sf-toolbar-status-red { - background-color: rgba(200,0,0, 0.8); + background-color: rgba(200, 0, 0, 0.8); } .sf-toolbar-block .sf-toolbar-status-yellow { background-color: #ffcc00; @@ -211,7 +217,7 @@ color: #FFF; } .sf-toolbar-block.sf-toolbar-status-red { - background-color: rgba(200,0,0, 0.8); + background-color: rgba(200, 0, 0, 0.8); color: #FFF; } .sf-toolbar-block.sf-toolbar-status-red svg > g > path { @@ -292,12 +298,8 @@ .sf-toolbar-info-php {} .sf-toolbar-info-php-ext {} -.sf-toolbar-info-php-ext .sf-toolbar-status { - margin-left: 2px; -} - -.sf-toolbar-info-php-ext .sf-toolbar-status:first-child { - margin-left: 0; +.sf-toolbar-info-php-ext .sf-toolbar-status + .sf-toolbar-status { + margin-left: 4px; } .sf-toolbar-block a .sf-toolbar-info-piece-additional, From fac5391dab21061344aeee13c20be90307ce8a51 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 8 Jul 2015 15:54:44 +0200 Subject: [PATCH 072/976] Lots of minor improvements --- .../Resources/views/Profiler/toolbar.css.twig | 38 +++---------------- .../views/Profiler/toolbar_item.html.twig | 2 +- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 32511b929037..255a9b02d01d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -232,6 +232,7 @@ color: #FFF; font-size: 14px; margin-right: 4px; + max-height: 36px; padding: 10px; } @@ -389,55 +390,26 @@ /***** Override the setting when the toolbar is on the top *****/ {% if position == 'top' %} .sf-minitoolbar { - top: 0; bottom: auto; right: 0; - - background-color: #f7f7f7; - - background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff); - background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff)); - background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff); - background: linear-gradient(225deg, #e4e4e4, #ffffff); - - border-radius: 0 0 0 16px; + top: 0; } .sf-toolbarreset { - background-image: -moz-linear-gradient(225deg, #e4e4e4, #ffffff); - background-image: -webkit-gradient(linear, 100% 0%, 0% 0%, from(#e4e4e4), to(#ffffff)); - background-image: -o-linear-gradient(135deg, #e4e4e4, #ffffff); - background: linear-gradient(225deg, #e4e4e4, #ffffff); - - top: 0; bottom: auto; - border-bottom: 1px solid #bbb; + box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2); + top: 0; } .sf-toolbar-block .sf-toolbar-info { - top: 39px; bottom: auto; - border-top-width: 0; - border-radius: 0 0 4px 4px; - } - - .sf-toolbar-block:hover .sf-toolbar-icon { - border-top: none; - border-bottom: 1px dotted #DDD; - margin-top: 0; - margin-bottom: -1px; + top: 36px; } {% endif %} {% if not floatable %} .sf-toolbarreset { position: static; - background: #cbcbcb; - - background-image: -moz-linear-gradient(90deg, #cbcbcb, #e8e8e8) !important; - background-image: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#cbcbcb), to(#e8e8e8)) !important; - background-image: -o-linear-gradient(180deg, #cbcbcb, #e8e8e8) !important; - background: linear-gradient(90deg, #cbcbcb, #e8e8e8) !important; } {% endif %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig index 6a8fa473e4b9..2f30e05c9a6b 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_item.html.twig @@ -1,6 +1,6 @@
{% if link %}{% endif %}
{{ icon|default('') }}
-
{{ text|default('') }}
{% if link %}
{% endif %} +
{{ text|default('') }}
From acee052b686403ee84904c8ade376e9304304f22 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 8 Jul 2015 17:40:13 +0200 Subject: [PATCH 073/976] Finished the Ajax panel redesign --- .../Resources/views/Collector/ajax.html.twig | 9 ++-- .../views/Collector/request.html.twig | 13 +++-- .../Resources/views/Collector/twig.html.twig | 2 +- .../views/Profiler/base_js.html.twig | 13 ++--- .../Resources/views/Profiler/toolbar.css.twig | 50 +++++++++++-------- 5 files changed, 51 insertions(+), 36 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig index 3c7b99b0285c..fd9ee91c567f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig @@ -2,13 +2,13 @@ {% block toolbar %} {% set icon %} + {{ include('@WebProfiler/Icon/ajax.svg.twig') }} 0 - ajax {% endset %} + {% set text %}
- AJAX requests - +
@@ -24,5 +24,6 @@
{% endset %} - {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false }) }} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 68a1d025f9d6..1d0d805c4394 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -4,14 +4,19 @@ {% set request_handler %} {% if collector.controller.class is defined %} {% set link = collector.controller.file|file_link(collector.controller.line) %} + {% if link %}{% endif %} + + + {{ collector.controller.class|abbr_class }} + + {% if collector.controller.method %} - {{ collector.controller.class|abbr_class }} - + {{ collector.controller.method }} - {% else %} - {{ collector.controller.class|abbr_class }} {% endif %} + + {% if link %}{% endif %} {% else %} {{ collector.controller }} {% endif %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 629d06cf1136..959295a87e92 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -4,7 +4,7 @@ {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %} {% set icon %} - Twig + {{ include('@WebProfiler/Icon/twig.html.twig') }} {{ time }} ms diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index 29b1d5b363e1..cdf6818897d9 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -165,7 +165,7 @@ tbody.appendChild(rows); if (infoSpan) { - var text = requestStack.length + ' call' + (requestStack.length > 1 ? 's' : ''); + var text = requestStack.length + ' AJAX request' + (requestStack.length > 1 ? 's' : ''); infoSpan.textContent = text; } } else { @@ -181,15 +181,16 @@ requestCounter[0].textContent = requestStack.length; var className = 'sf-toolbar-ajax-requests sf-toolbar-value'; + requestCounter[0].className = className; + + var ajaxToolbarPanel = document.querySelectorAll('.sf-toolbar-block-ajax'); if (state == 'ok') { - className += ' sf-toolbar-status-green'; + ajaxToolbarPanel.className = 'sf-toolbar-status-green'; } else if (state == 'error') { - className += ' sf-toolbar-status-red'; + ajaxToolbarPanel.className = 'sf-toolbar-status-red'; } else { - className += ' sf-ajax-request-loading'; + ajaxToolbarPanel.className = 'sf-ajax-request-loading'; } - - requestCounter[0].className = className; }; var addEventListener; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 255a9b02d01d..77447e2f9c2f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -92,12 +92,6 @@ .sf-toolbar-block-config svg { padding-right: 4px; } -.sf-toolbar-block-time { - margin-right: 0; -} -.sf-toolbar-block-ajax { - display: none; -} .sf-toolbar-block span { display: inline-block; @@ -140,7 +134,7 @@ } .sf-toolbar-block .sf-toolbar-info-piece a { - color: #75D1EA; + color: #99CDD8; text-decoration: underline; } .sf-toolbar-block .sf-toolbar-info-piece a:hover { @@ -288,17 +282,13 @@ margin-top: 0; } -.sf-toolbar-block .sf-toolbar-info-method { +.sf-toolbar-block-time .sf-toolbar-icon { + padding-right: 5px; } - -.sf-toolbar-block .sf-toolbar-info-method[onclick=""] { - border-bottom: none; - cursor: inherit; +.sf-toolbar-block-memory .sf-toolbar-icon { + padding-left: 5px; } -.sf-toolbar-info-php {} -.sf-toolbar-info-php-ext {} - .sf-toolbar-info-php-ext .sf-toolbar-status + .sf-toolbar-status { margin-left: 4px; } @@ -339,14 +329,26 @@ overflow-y: auto; } -.sf-toolbar-ajax-requests th, .sf-toolbar-ajax-requests td { - border-bottom: 1px solid #ddd; - padding: 0 4px; - color: #2f2f2f; - background-color: #fff; +.sf-toolbar-info-piece b.sf-toolbar-ajax-info { + color: #F5F5F5; +} +.sf-toolbar-ajax-requests { + width: 100%; +} + +.sf-toolbar-ajax-requests td { + background-color: #444; + border-bottom: 1px solid #777; + color: #F5F5F5; + font-size: 12px; + padding: 4px; } .sf-toolbar-ajax-requests th { - background-color: #eee; + background-color: #222; + border-bottom: 0; + color: #AAA; + font-size: 11px; + padding: 4px; } .sf-ajax-request-url { max-width: 300px; @@ -354,6 +356,12 @@ overflow: hidden; text-overflow: ellipsis; } +.sf-toolbar-ajax-requests .sf-ajax-request-url a { + text-decoration: none; +} +.sf-toolbar-ajax-requests .sf-ajax-request-url a:hover { + text-decoration: underline; +} .sf-ajax-request-duration { text-align: right; } From af3dcb2a976f715e697eb7479e76ddebdca65210 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 8 Jul 2015 18:01:44 +0200 Subject: [PATCH 074/976] Minor Ajax tweaks --- .../Resources/views/Profiler/base_js.html.twig | 8 ++------ .../Resources/views/Profiler/toolbar.css.twig | 3 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index cdf6818897d9..03a242b62702 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -169,12 +169,8 @@ infoSpan.textContent = text; } } else { - var cell = document.createElement('td'); - cell.setAttribute('colspan', '4'); - cell.textContent = "No AJAX requests yet."; - var row = document.createElement('tr'); - row.appendChild(cell); - tbody.appendChild(row); + var ajaxToolbarPanel = document.querySelectorAll('.sf-toolbar-block-ajax'); + ajaxToolbarPanel[0].style.display = 'none'; } } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 77447e2f9c2f..6896555af7a3 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -343,6 +343,9 @@ font-size: 12px; padding: 4px; } +.sf-toolbar-ajax-requests tr:last-child td { + border-bottom: 0; +} .sf-toolbar-ajax-requests th { background-color: #222; border-bottom: 0; From 041d4243a1102d9e8dc9fab914f4da04c839302e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 09:23:43 +0200 Subject: [PATCH 075/976] Improved the Security toolbar panel --- .../views/Collector/security.html.twig | 22 ++++++----- .../Resources/views/Profiler/toolbar.css.twig | 39 ++++--------------- 2 files changed, 20 insertions(+), 41 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 1a1352ab320c..2ca6a02ee593 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -2,12 +2,17 @@ {% block toolbar %} {% if collector.tokenClass %} - {% set color_code = (collector.enabled and collector.authenticated) ? '' : 'yellow' %} - {% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %} - {% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %} + {% set is_authenticated = collector.enabled and collector.authenticated %} + {% set color_code = is_authenticated ? '' : 'yellow' %} {% else %} - {% set color_code = collector.enabled ? 'red' : '' %} + {% set color_code = collector.enabled ? 'red' : '' %} {% endif %} + + {% set icon %} + + {{ collector.user|default('n/a') }} + {% endset %} + {% set text %} {% if collector.tokenClass %}
@@ -16,7 +21,7 @@
Authenticated - {{ authentication_color_text }} + {{ is_authenticated ? 'Yes' : 'No' }}
{% if collector.tokenClass != null %}
@@ -30,11 +35,8 @@ The security is disabled. {% endif %} {% endset %} - {% set icon %} - - {% if collector.user %}{{ collector.user }}{% endif %} - {% endset %} - {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url, 'block_status': color_code } %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: color_code }) }} {% endblock %} {% block menu %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 6896555af7a3..4b8619f6b4b4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -202,9 +202,6 @@ background-color: #ffcc00; color: #000; } -.sf-toolbar-block .sf-toolbar-status-black { - background-color: #000; -} .sf-toolbar-block.sf-toolbar-status-green { background-color: #759e1a; @@ -221,6 +218,7 @@ background-color: rgba(255,158,43, 0.8); color: #FFF; } + .sf-toolbar-block-request .sf-toolbar-status { border-radius: 0 !important; color: #FFF; @@ -235,6 +233,11 @@ .sf-toolbar-status-red .sf-toolbar-label { color: #FFF; } +.sf-toolbar-status-green svg *, +.sf-toolbar-status-red svg *, +.sf-toolbar-status-yellow svg * { + fill: #FFF; +} .sf-toolbar-block .sf-toolbar-icon { display: block; @@ -244,27 +247,6 @@ padding-left: 0; } -/* -.sf-toolbar-block .sf-toolbar-icon > a, -.sf-toolbar-block .sf-toolbar-icon > span { - text-decoration: none; - margin: 0; - padding: 5px 8px; - min-width: 20px; - text-align: center; - vertical-align: middle; -}*/ - -.sf-toolbar-block .sf-toolbar-icon > a, -.sf-toolbar-block .sf-toolbar-icon > a:link -.sf-toolbar-block .sf-toolbar-icon > a:hover { - color: black !important; -} - -.sf-toolbar-block .sf-toolbar-icon > a[href]:after { - content: ""; -} - .sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg { border-width: 0; vertical-align: middle; @@ -272,16 +254,11 @@ top: -1px; } -.sf-toolbar-block .sf-toolbar-icon img + span, .sf-toolbar-block .sf-toolbar-icon svg + span { +.sf-toolbar-block .sf-toolbar-icon img + span, +.sf-toolbar-block .sf-toolbar-icon svg + span { margin-left: 4px; } -.sf-toolbar-block .sf-toolbar-icon .sf-toolbar-status { - border-radius: 12px; - border-bottom-left-radius: 0; - margin-top: 0; -} - .sf-toolbar-block-time .sf-toolbar-icon { padding-right: 5px; } From 77d522a8cb56219bcd6309af7958b95d0c821f98 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 10:28:18 +0200 Subject: [PATCH 076/976] Tweaked the translation panel --- .../views/Collector/config.html.twig | 8 ++-- .../views/Collector/translation.html.twig | 41 ++++++++++--------- .../Resources/views/Icon/ajax.svg.twig | 1 + .../Resources/views/Icon/close.svg.twig | 1 + .../Resources/views/Icon/symfony.svg.twig | 1 + .../Resources/views/Icon/translation.svg.twig | 1 + .../Resources/views/Icon/twig.html.twig | 1 + .../Resources/views/Profiler/toolbar.css.twig | 11 +++-- 8 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig 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 adfc00c8af5c..08babc2ea0f1 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -90,9 +90,11 @@ {% if collector.symfonyversion is defined %} {% endif %} {% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig index ed33872746f1..7eefbde73c86 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig @@ -5,32 +5,33 @@ {% block toolbar %} {% if collector.messages|length %} {% set icon %} - - + {{ include('@WebProfiler/Icon/translation.svg.twig') }} {% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' : '' %} {% set error_count = collector.countMissings + collector.countFallbacks %} {{ error_count ?: collector.countdefines }} {% endset %} + {% set text %} - {% if collector.countMissings %} -
- Missing messages - {{ collector.countMissings }} -
- {% endif %} - {% if collector.countFallbacks %} -
- Fallback messages - {{ collector.countFallbacks }} -
- {% endif %} - {% if collector.countdefines %} -
- Defined messages - {{ collector.countdefines }} -
- {% endif %} +
+ Missing messages + + {{ collector.countMissings|default(0) }} + +
+ +
+ Fallback messages + + {{ collector.countFallbacks|default(0) }} + +
+ +
+ Defined messages + {{ collector.countdefines|default(0) }} +
{% endset %} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} {% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig new file mode 100644 index 000000000000..ba77a3aa7f40 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig new file mode 100644 index 000000000000..70b4d589bc60 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig new file mode 100644 index 000000000000..da9802c3884e --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig new file mode 100644 index 000000000000..ed8601a2a945 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig new file mode 100644 index 000000000000..a8e72424cf20 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig @@ -0,0 +1 @@ +Twig diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 4b8619f6b4b4..20f50e1cfb05 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -193,18 +193,17 @@ } .sf-toolbar-block .sf-toolbar-status-green { - background-color: #759e1a; + background-color: rgba(117, 158, 43, 0.8); } .sf-toolbar-block .sf-toolbar-status-red { - background-color: rgba(200, 0, 0, 0.8); + background-color: rgba(200, 43, 43, 0.8); } .sf-toolbar-block .sf-toolbar-status-yellow { - background-color: #ffcc00; - color: #000; + background-color: rgba(255, 158, 43, 0.8); } .sf-toolbar-block.sf-toolbar-status-green { - background-color: #759e1a; + background-color: rgba(117, 158, 43, 0.8); color: #FFF; } .sf-toolbar-block.sf-toolbar-status-red { @@ -215,7 +214,7 @@ fill: #FFF; } .sf-toolbar-block.sf-toolbar-status-yellow { - background-color: rgba(255,158,43, 0.8); + background-color: rgba(255, 158, 43, 0.8); color: #FFF; } From c0bee9b7e7cdc03b140ba5bf4862caf97e1b1064 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 10:45:55 +0200 Subject: [PATCH 077/976] Tweaked the Twig panel --- .../Resources/views/Collector/twig.html.twig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 959295a87e92..20a07327cab4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -12,19 +12,19 @@ {% set text %}
Render Time - {{ time }} + {{ time }} ms
Template Calls - {{ collector.templatecount }} + {{ collector.templatecount }}
Block Calls - {{ collector.blockcount }} + {{ collector.blockcount }}
Macro Calls - {{ collector.macrocount }} + {{ collector.macrocount }}
{% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} From 2bccdd4a62f262092c4653ff2e70517623c2eb14 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 10:58:45 +0200 Subject: [PATCH 078/976] Minor CSS fixes --- .../Resources/views/Profiler/toolbar.css.twig | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 20f50e1cfb05..c6b9fa3e4d82 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -124,7 +124,6 @@ } .sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { - border-radius: 0; padding: 2px 5px; margin-bottom: 0px; } @@ -182,10 +181,9 @@ .sf-toolbar-block .sf-toolbar-status { display: inline-block; - color: #fff; + color: #FFF; background-color: #666; padding: 3px 6px; - border-radius: 3px; margin-bottom: 2px; vertical-align: middle; min-width: 6px; @@ -207,7 +205,7 @@ color: #FFF; } .sf-toolbar-block.sf-toolbar-status-red { - background-color: rgba(200, 0, 0, 0.8); + background-color: rgba(200, 43, 43, 0.8); color: #FFF; } .sf-toolbar-block.sf-toolbar-status-red svg > g > path { @@ -219,7 +217,6 @@ } .sf-toolbar-block-request .sf-toolbar-status { - border-radius: 0 !important; color: #FFF; font-size: 14px; margin-right: 4px; @@ -232,9 +229,9 @@ .sf-toolbar-status-red .sf-toolbar-label { color: #FFF; } -.sf-toolbar-status-green svg *, -.sf-toolbar-status-red svg *, -.sf-toolbar-status-yellow svg * { +.sf-toolbar-status-green svg > g > path, +.sf-toolbar-status-red svg > g > path, +.sf-toolbar-status-yellow svg > g > path { fill: #FFF; } From b25b6dd608e0646b8e265c34a4af789d30f5859b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 14:56:10 +0200 Subject: [PATCH 079/976] Finished "dump" panel and other minor tweaks --- .../Resources/views/Profiler/dump.html.twig | 14 ++++---- .../Resources/views/Collector/form.html.twig | 16 +++++++-- .../views/Collector/logger.html.twig | 36 +++++++++---------- .../views/Collector/memory.html.twig | 4 ++- .../Resources/views/Collector/time.html.twig | 14 ++++++-- .../Resources/views/Collector/twig.html.twig | 2 ++ .../Resources/views/Profiler/toolbar.css.twig | 19 ++++++++++ 7 files changed, 72 insertions(+), 33 deletions(-) diff --git a/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig index e7a8245fb3b0..2ce089908085 100644 --- a/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig +++ b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig @@ -5,17 +5,14 @@ {% if dumps_count %} {% set icon %} - - {{ dumps_count }} + + {{ dumps_count }} {% endset %} {% set text %} -
- dump() -
{% for dump in collector.getDumps('html') %}
- in + {% if dump.file %} {% set link = dump.file|file_link(dump.line) %} {% if link %} @@ -26,14 +23,15 @@ {% else %} {{ dump.name }} {% endif %} - line {{ dump.line }}: + + line {{ dump.line }} {{ dump.data|raw }}
{% endfor %} {% endset %} - {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': true } %} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }} {% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig index 979ef56d3159..27515f752295 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -4,8 +4,9 @@ {% block toolbar %} {% if collector.data.nb_errors > 0 or collector.data.forms|length %} + {% set status_color = collector.data.nb_errors ? 'red' : '' %} {% set icon %} - + {{ include('@WebProfiler/Icon/form.svg.twig') }} {% if collector.data.nb_errors %} {{ collector.data.nb_errors }} @@ -15,7 +16,18 @@ {% endset %} - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: collector.data.nb_errors ? 'red' : '' }) }} + {% set text %} +
+ Number of forms + {{ collector.data.forms|length }} +
+
+ Number of errors + {{ collector.data.nb_errors }} +
+ {% endset %} + + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} {% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 10858a531b6f..6344197eff6b 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -5,31 +5,29 @@ {% block toolbar %} {% if collector.counterrors or collector.countdeprecations or collector.countscreams %} {% set icon %} - {% set status_color = collector.counterrors ? 'red' : collector.countdeprecations ? 'yellow' : '' %} {% set error_count = collector.counterrors + collector.countdeprecations + collector.countscreams %} + {{ include('@WebProfiler/Icon/logger.svg.twig') }} {{ error_count }} {% endset %} + {% set text %} - {% if collector.counterrors %} -
- Errors - {{ collector.counterrors }} -
- {% endif %} - {% if collector.countdeprecations %} -
- Deprecated Calls - {{ collector.countdeprecations }} -
- {% endif %} - {% if collector.countscreams %} -
- Silenced Errors - {{ collector.countscreams }} -
- {% endif %} +
+ Errors + {{ collector.counterrors|default(0) }} +
+ +
+ Deprecated Calls + {{ collector.countdeprecations|default(0) }} +
+ +
+ Silenced Errors + {{ collector.countscreams|default(0) }} +
{% endset %} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} {% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig index af68792e1b17..b10159684303 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -8,6 +8,7 @@ MB {% endset %} + {% set text %}
Peak memory usage @@ -16,8 +17,9 @@
PHP memory limit - {{ collector.memoryLimit == -1 ? '∞' : '%.1f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB + {{ collector.memoryLimit == -1 ? '∞' : '%.0f'|format(collector.memoryLimit / 1024 / 1024)|escape }} MB
{% endset %} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: status_color }) }} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index 4b743f99024d..558a155bdb6b 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -16,18 +16,26 @@ {% endif %} {% block toolbar %} - {% set duration = collector.events|length ? '%.0f'|format(collector.duration) : 'n/a' %} + {% set total_time = collector.events|length ? '%.0f'|format(collector.duration) : 'n/a' %} + {% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %} {% set status_color = collector.events|length ? collector.duration > 1000 ? 'yellow' : '' %} + {% set icon %} - {{ duration }} + {{ total_time }} ms {% endset %} + {% set text %}
Total time - {{ duration }} ms + {{ total_time }} ms +
+
+ Initialization time + {{ initialization_time }} ms
{% endset %} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 20a07327cab4..293180757fd6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -9,6 +9,7 @@ ms {% endset %} + {% set text %}
Render Time @@ -27,6 +28,7 @@ {{ collector.macrocount }}
{% endset %} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index c6b9fa3e4d82..de56ad35db98 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -81,6 +81,7 @@ margin-right: 0px; white-space: nowrap; } +.sf-toolbar-block a, .sf-toolbar-block a:hover { text-decoration: none; } @@ -371,6 +372,24 @@ 100% { color: black; } } +.sf-toolbar-block-dump pre.sf-dump { + background-color: #222; + border-color: #777; + border-radius: 0; + margin: 6px 0 12px 0; + width: 200px; +} +.sf-toolbar-block-dump pre.sf-dump:last-child { + margin-bottom: 0; +} +.sf-toolbar-block-dump .sf-toolbar-info-piece .sf-toolbar-file-line { + color: #AAA; + margin-left: 4px; +} +.sf-toolbar-block-dump .sf-toolbar-info img { + display: none; +} + /***** Override the setting when the toolbar is on the top *****/ {% if position == 'top' %} .sf-minitoolbar { From 9d89841e3aaa708a0215db7ad866cfb52b6f2261 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 18:09:41 +0200 Subject: [PATCH 080/976] Finished the toolbar redesign --- .../views/Collector/config.html.twig | 20 +- .../views/Collector/memory.html.twig | 7 +- .../views/Collector/request.html.twig | 26 +- .../Resources/views/Collector/time.html.twig | 1 + .../Resources/views/Icon/form.svg.twig | 1 + .../Resources/views/Icon/logger.svg.twig | 1 + .../Resources/views/Icon/memory.svg.twig | 1 + .../Resources/views/Icon/symfony.svg.twig | 2 +- .../Resources/views/Icon/time.svg.twig | 1 + .../views/Profiler/base_js.html.twig | 8 +- .../Resources/views/Profiler/toolbar.css.twig | 227 +++++++++--------- 11 files changed, 152 insertions(+), 143 deletions(-) create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig create mode 100644 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig 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 08babc2ea0f1..4b66f4589a66 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -19,17 +19,15 @@ {% endif %} {% set icon %} - {% if collector.symfonyState is defined %} - - - {{ include('@WebProfiler/Icon/symfony.svg.twig') }} - - {{ collector.symfonyversion }} - - {% elseif collector.applicationname %} - {{ collector.applicationname }} - {{ collector.applicationversion }} - {% endif %} + {% if collector.symfonyState is defined %} + + {{ include('@WebProfiler/Icon/symfony.svg.twig') }} + + {{ collector.symfonyversion }} + {% elseif collector.applicationname %} + {{ collector.applicationname }} + {{ collector.applicationversion }} + {% endif %} {% endset %} {% set text %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig index b10159684303..5dd22697475e 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -3,10 +3,9 @@ {% block toolbar %} {% set icon %} {% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %} - - {{ '%.1f'|format(collector.memory / 1024 / 1024) }} - MB - + {{ include('@WebProfiler/Icon/memory.svg.twig') }} + {{ '%.1f'|format(collector.memory / 1024 / 1024) }} + MB {% endset %} {% set text %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 1d0d805c4394..25cecdc20102 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -1,24 +1,22 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} + + {% set request_handler %} {% if collector.controller.class is defined %} {% set link = collector.controller.file|file_link(collector.controller.line) %} - {% if link %}{% endif %} + {% if link %}{% else %}{% endif %} - - {{ collector.controller.class|abbr_class }} - + {{ collector.controller.class|abbr_class|striptags }} - {% if collector.controller.method %} - - {{ collector.controller.method }} - - {% endif %} + {%- if collector.controller.method -%} +  :: {{ collector.controller.method }} + {%- endif -%} - {% if link %}{% endif %} + {% if link %}{% else %}{% endif %} {% else %} - {{ collector.controller }} + {{ collector.controller }} {% endif %} {% endset %} @@ -26,8 +24,10 @@ {% set icon %} {{ collector.statuscode }} - @ - {{ collector.route }} + {% if collector.route %} + @ + {{ collector.route }} + {% endif %} {% endset %} {% set text %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index 558a155bdb6b..8b5330df6b06 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -21,6 +21,7 @@ {% set status_color = collector.events|length ? collector.duration > 1000 ? 'yellow' : '' %} {% set icon %} + {{ include('@WebProfiler/Icon/time.svg.twig') }} {{ total_time }} ms {% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig new file mode 100644 index 000000000000..07bd66550718 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig new file mode 100644 index 000000000000..b29b2071d40f --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig new file mode 100644 index 000000000000..90b195a52173 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig index da9802c3884e..d4136c0958e0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig @@ -1 +1 @@ - + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig new file mode 100644 index 000000000000..65f36710844f --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig @@ -0,0 +1 @@ + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index 03a242b62702..d0f51c42d2f4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -180,12 +180,10 @@ requestCounter[0].className = className; var ajaxToolbarPanel = document.querySelectorAll('.sf-toolbar-block-ajax'); - if (state == 'ok') { - ajaxToolbarPanel.className = 'sf-toolbar-status-green'; - } else if (state == 'error') { - ajaxToolbarPanel.className = 'sf-toolbar-status-red'; + if (state == 'error') { + Sfjs.addClass(ajaxToolbarPanel[0], 'sf-toolbar-status-red'); } else { - ajaxToolbarPanel.className = 'sf-ajax-request-loading'; + Sfjs.addClass(ajaxToolbarPanel[0], 'sf-ajax-request-loading'); } }; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index de56ad35db98..975ed9639f53 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -1,15 +1,12 @@ .sf-minitoolbar { + background-color: #222; + bottom: 0; display: none; - + height: 36px; + padding: 5px 6px 0; position: fixed; - bottom: 0; right: 0; - - padding: 5px 5px 0; - - background-color: #222; - - z-index: 6000000; + z-index: 9999; } .sf-toolbarreset * { @@ -21,8 +18,8 @@ .sf-toolbarreset { background-color: #222; - box-shadow: 0 -1px 0px rgba(0, 0, 0, 0.2); bottom: 0; + box-shadow: 0 -1px 0px rgba(0, 0, 0, 0.2); color: #EEE; font: 11px Arial, sans-serif; height: 36px; @@ -32,30 +29,16 @@ position: fixed; right: 0; text-align: left; - z-index: 6000000; + z-index: 9999; } .sf-toolbarreset abbr { border: none; cursor: text; } -.sf-toolbarreset img { - width: auto; - display: inline; -} .sf-toolbarreset svg, .sf-toolbarreset img { max-height: 24px; } -.sf-toolbarreset table { - border-collapse: collapse; - border-spacing: 0; - background-color: #000; - margin: 0; - padding: 0; - border: 0; - width: 100%; - table-layout: auto; -} .sf-toolbarreset .hide-button { background: #444; cursor: pointer; @@ -78,20 +61,17 @@ cursor: default; display: block; float: left; - margin-right: 0px; + height: 36px; + margin-right: 0; white-space: nowrap; } -.sf-toolbar-block a, -.sf-toolbar-block a:hover { +.sf-toolbar-block > a, +.sf-toolbar-block > a:hover { + display: block; text-decoration: none; } -.sf-toolbar-block-config { - float: right; - margin-left: 0; - margin-right: 0; -} .sf-toolbar-block-config svg { - padding-right: 4px; + max-height: 22px; } .sf-toolbar-block span { @@ -103,25 +83,33 @@ line-height: 36px; padding: 0; } -.sf-toolbar-block .sf-toolbar-label { +.sf-toolbar-block .sf-toolbar-label, +.sf-toolbar-block .sf-toolbar-class-separator { color: #AAA; font-size: 12px; } -.sf-toolbar-block-config-php .sf-toolbar-label, -.sf-toolbar-block-config-symfony .sf-toolbar-label { - font-size: 11px; -} +/* TODO: remove it when Twig uses SVG icons */ .sf-toolbar-block-twig img { opacity: .8; } .sf-toolbar-block .sf-toolbar-info { + border-collapse: collapse; display: table; } +.sf-toolbar-block .sf-toolbar-info-piece-group { + border-top: 1px solid #777; + margin-top: 4px; + padding-top: 4px; +} .sf-toolbar-block .sf-toolbar-info-piece { + /* this 'border-bottom' trick is needed because 'margin-bottom' doesn't work for table rows */ + border-bottom: solid transparent 3px; display: table-row; - line-height: 1.4; - margin-bottom: 8px; +} +.sf-toolbar-block .sf-toolbar-info-piece-additional, +.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { + display: none; } .sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { @@ -198,7 +186,7 @@ background-color: rgba(200, 43, 43, 0.8); } .sf-toolbar-block .sf-toolbar-status-yellow { - background-color: rgba(255, 158, 43, 0.8); + background-color: rgb(189, 132, 0); } .sf-toolbar-block.sf-toolbar-status-green { @@ -213,16 +201,21 @@ fill: #FFF; } .sf-toolbar-block.sf-toolbar-status-yellow { - background-color: rgba(255, 158, 43, 0.8); + background-color: rgb(189, 132, 0); color: #FFF; } .sf-toolbar-block-request .sf-toolbar-status { color: #FFF; font-size: 14px; - margin-right: 4px; max-height: 36px; - padding: 10px; + padding: 10px 7px; +} +.sf-toolbar-block-request .sf-toolbar-info-piece a { + text-decoration: none; +} +.sf-toolbar-block-request .sf-toolbar-info-piece a:hover { + text-decoration: underline; } .sf-toolbar-status-green .sf-toolbar-label, @@ -238,17 +231,23 @@ .sf-toolbar-block .sf-toolbar-icon { display: block; - padding: 0 10px; + height: 36px; + padding: 0 7px; } .sf-toolbar-block-request .sf-toolbar-icon { padding-left: 0; + padding-right: 0; } -.sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg { +.sf-toolbar-block .sf-toolbar-icon img, +.sf-toolbar-block .sf-toolbar-icon svg { border-width: 0; - vertical-align: middle; position: relative; - top: -1px; + top: 5px; +} +.sf-toolbar-block-translation .sf-toolbar-icon svg, +.sf-toolbar-block-config .sf-toolbar-icon svg { + top: 8px; } .sf-toolbar-block .sf-toolbar-icon img + span, @@ -256,27 +255,10 @@ margin-left: 4px; } -.sf-toolbar-block-time .sf-toolbar-icon { - padding-right: 5px; -} -.sf-toolbar-block-memory .sf-toolbar-icon { - padding-left: 5px; -} - .sf-toolbar-info-php-ext .sf-toolbar-status + .sf-toolbar-status { margin-left: 4px; } -.sf-toolbar-block a .sf-toolbar-info-piece-additional, -.sf-toolbar-block a .sf-toolbar-info-piece-additional-detail { - display: inline-block; -} - -.sf-toolbar-block a .sf-toolbar-info-piece-additional:empty, -.sf-toolbar-block a .sf-toolbar-info-piece-additional-detail:empty { - display: none; -} - .sf-toolbar-block:hover { position: relative; } @@ -289,13 +271,7 @@ .sf-toolbar-block:hover .sf-toolbar-info { display: block; - min-width: -webkit-calc(100% + 2px); - min-width: calc(100% + 2px); - z-index: 10001; - box-sizing: border-box; - padding: 9px; - line-height: 1.5; - + padding: 8px; max-width: 480px; max-height: 480px; word-wrap: break-word; @@ -309,7 +285,6 @@ .sf-toolbar-ajax-requests { width: 100%; } - .sf-toolbar-ajax-requests td { background-color: #444; border-bottom: 1px solid #777; @@ -342,9 +317,6 @@ .sf-ajax-request-duration { text-align: right; } -.sf-ajax-request-error { - color: #a33 !important; -} .sf-ajax-request-loading { -webkit-animation: sf-blink .5s ease-in-out infinite; -o-animation: sf-blink .5s ease-in-out infinite; @@ -352,24 +324,24 @@ animation: sf-blink .5s ease-in-out infinite; } @-webkit-keyframes sf-blink { - 0% { color: black; } - 50% { color: #bbb; } - 100% { color: black; } + 0% { background: #222; } + 50% { background: #444; } + 100% { background: #222; } } @-moz-keyframes sf-blink { - 0% { color: black; } - 50% { color: #bbb; } - 100% { color: black; } + 0% { background: #222; } + 50% { background: #444; } + 100% { background: #222; } } @-o-keyframes sf-blink { - 0% { color: black; } - 50% { color: #bbb; } - 100% { color: black; } + 0% { background: #222; } + 50% { background: #444; } + 100% { background: #222; } } @keyframes sf-blink { - 0% { color: black; } - 50% { color: #bbb; } - 100% { color: black; } + 0% { background: #222; } + 50% { background: #444; } + 100% { background: #222; } } .sf-toolbar-block-dump pre.sf-dump { @@ -390,7 +362,7 @@ display: none; } -/***** Override the setting when the toolbar is on the top *****/ +/* Override the setting when the toolbar is on the top */ {% if position == 'top' %} .sf-minitoolbar { bottom: auto; @@ -416,38 +388,75 @@ } {% endif %} -/***** Media query *****/ -@media screen and (max-width: 779px) { - .sf-toolbar-block .sf-toolbar-icon > * > :first-child ~ * { - display: none; +/* Responsive Design */ +.sf-toolbar-icon .sf-toolbar-label, +.sf-toolbar-icon .sf-toolbar-value { + display: none; +} +.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-label { + display: inline-block; +} + +@media (min-width: 768px) { +.navbar-brand::before { content: "768 px"; background: red; + color: white; + position: absolute; } + + .sf-toolbar-icon .sf-toolbar-label, + .sf-toolbar-icon .sf-toolbar-value { + display: inline; } - .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional, - .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail { - display: none !important; + .sf-toolbar-block .sf-toolbar-icon img, + .sf-toolbar-block .sf-toolbar-icon svg { + top: 6px; + } + .sf-toolbar-block-config .sf-toolbar-icon svg { + top: 8px; + } + .sf-toolbar-block-time .sf-toolbar-icon svg, + .sf-toolbar-block-memory .sf-toolbar-icon svg { + display: none; } -} -@media screen and (min-width: 880px) { - .sf-toolbar-block .sf-toolbar-icon a[href$="config"] .sf-toolbar-info-piece-additional { - display: inline-block; + .sf-toolbar-block .sf-toolbar-icon { + padding: 0 10px; + } + .sf-toolbar-block-time .sf-toolbar-icon { + padding-right: 5px; + } + .sf-toolbar-block-memory .sf-toolbar-icon { + padding-left: 5px; + } + .sf-toolbar-block-request .sf-toolbar-icon { + padding-left: 0; + } + .sf-toolbar-block-request .sf-toolbar-status { + margin-right: 4px; + padding: 10px; + } + .sf-toolbar-block-config { + float: right; + margin-left: 0; + margin-right: 0; } } -@media screen and (min-width: 980px) { - .sf-toolbar-block .sf-toolbar-icon a[href$="security"] .sf-toolbar-info-piece-additional { +@media (min-width: 1024px) { +.navbar-brand::before { content: "1024 px"; } + + .sf-toolbar-block .sf-toolbar-info-piece-additional, + .sf-toolbar-block .sf-toolbar-info-piece-additional-detail { display: inline-block; } -} -@media screen and (max-width: 1179px) { - .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional { + .sf-toolbar-block .sf-toolbar-info-piece-additional:empty, + .sf-toolbar-block .sf-toolbar-info-piece-additional-detail:empty { display: none; } } -@media screen and (max-width: 1439px) { - .sf-toolbar-block .sf-toolbar-icon > * > .sf-toolbar-info-piece-additional-detail { - display: none; - } +@media (min-width: 1200px) { +.navbar-brand::before { content: "1200 px"; } + } From e14fb6d5c9f65d99aae169e136293da6e8d9ba8e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 18:11:29 +0200 Subject: [PATCH 081/976] Fixed a minor syntax issue --- .../Bundle/WebProfilerBundle/Profiler/TemplateManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index 2a12198542bf..7be8c7296a33 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -141,7 +141,7 @@ protected function templateExists($template) * It changes the default order of collector templates to show them in a * different order which is better for design and aesthetic reasons. * - * @param array $templates + * @param array $templates * @return array */ protected function reorderTemplates($templates) From 7c35d25baeecfd0c8687d5692f7992f8169acabb Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 18:22:31 +0200 Subject: [PATCH 082/976] Fixed another insignificant syntax issue --- .../Bundle/WebProfilerBundle/Profiler/TemplateManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index 7be8c7296a33..3cb004c46069 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -142,6 +142,7 @@ protected function templateExists($template) * different order which is better for design and aesthetic reasons. * * @param array $templates + * * @return array */ protected function reorderTemplates($templates) From 23dc884dcfefb205f5139470016a9018244ebcc3 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 22:41:25 +0200 Subject: [PATCH 083/976] Fixed a potential issue in the request panel --- .../Resources/views/Collector/request.html.twig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index 25cecdc20102..b7d693b6e74f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -40,10 +40,12 @@ Controller method {{ request_handler }}
-
- Controller file - {{ collector.controller.class }} -
+ {% if collector.controller.class is defined %} +
+ Controller file + {{ collector.controller.class }} +
+ {% endif %}
Route name {{ collector.route|default('NONE') }} From e28f895a182fb27f780b9f8e350da1cef2b56ec1 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 9 Jul 2015 22:43:30 +0200 Subject: [PATCH 084/976] A very high z-index value is required to avoid issues in the profiler view --- .../Resources/views/Profiler/toolbar.css.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 975ed9639f53..02cadc579093 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -6,7 +6,7 @@ padding: 5px 6px 0; position: fixed; right: 0; - z-index: 9999; + z-index: 99999; } .sf-toolbarreset * { @@ -29,7 +29,7 @@ position: fixed; right: 0; text-align: left; - z-index: 9999; + z-index: 99999; } .sf-toolbarreset abbr { border: none; From cd5321016116b7768822a3517e6aa1ae98160f75 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 10 Jul 2015 10:08:14 +0200 Subject: [PATCH 085/976] Fixed another z-index issue --- .../WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 02cadc579093..cc35f17d9c4d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -96,6 +96,7 @@ .sf-toolbar-block .sf-toolbar-info { border-collapse: collapse; display: table; + z-index: 99999; } .sf-toolbar-block .sf-toolbar-info-piece-group { border-top: 1px solid #777; From 0dfcb602ef69ada4d64ea83cb7653c8ea9b80ffa Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 10 Jul 2015 10:11:14 +0200 Subject: [PATCH 086/976] Fixed an issue with the Config panel in the Profiler view --- .../Resources/views/Profiler/toolbar.css.twig | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index cc35f17d9c4d..eb6eaeff64f6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -399,10 +399,6 @@ } @media (min-width: 768px) { -.navbar-brand::before { content: "768 px"; background: red; - color: white; - position: absolute; } - .sf-toolbar-icon .sf-toolbar-label, .sf-toolbar-icon .sf-toolbar-value { display: inline; @@ -415,6 +411,9 @@ .sf-toolbar-block-config .sf-toolbar-icon svg { top: 8px; } + .sf-toolbar-block-config:hover .sf-toolbar-info { + right: 0; + } .sf-toolbar-block-time .sf-toolbar-icon svg, .sf-toolbar-block-memory .sf-toolbar-icon svg { display: none; @@ -444,8 +443,6 @@ } @media (min-width: 1024px) { -.navbar-brand::before { content: "1024 px"; } - .sf-toolbar-block .sf-toolbar-info-piece-additional, .sf-toolbar-block .sf-toolbar-info-piece-additional-detail { display: inline-block; @@ -458,6 +455,4 @@ } @media (min-width: 1200px) { -.navbar-brand::before { content: "1200 px"; } - } From 9e38a8aa963e5be67db9fef0e80652c700b04469 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 10 Jul 2015 10:28:54 +0200 Subject: [PATCH 087/976] Minor CSS tweaks and made font sizes bigger --- .../views/Collector/security.html.twig | 10 ++++++--- .../Resources/views/Profiler/toolbar.css.twig | 22 +++++-------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 2ca6a02ee593..7ecaf82759ef 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -26,13 +26,17 @@ {% if collector.tokenClass != null %}
Token class - {{ collector.tokenClass|abbr_class }} + {{ collector.tokenClass|abbr_class }}
{% endif %} {% elseif collector.enabled %} - You are not authenticated. +
+ You are not authenticated. +
{% else %} - The security is disabled. +
+ The security is disabled. +
{% endif %} {% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index eb6eaeff64f6..3e3fa4404183 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -133,27 +133,15 @@ .sf-toolbar-block .sf-toolbar-info-piece b { color: #AAA; display: table-cell; - font-size: 11px; + font-size: 12px; padding: 4px 8px 4px 4px; } .sf-toolbar-block .sf-toolbar-info-piece span { } -.sf-toolbar-block .sf-toolbar-info-piece span, -.sf-toolbar-block .sf-toolbar-info-piece abbr { +.sf-toolbar-block .sf-toolbar-info-piece span { color: #F5F5F5; - font-size: 12px; -} - -.sf-toolbar-block .sf-toolbar-info-with-next-pointer:after { - content: ' :: '; - color: #999; -} - -.sf-toolbar-block .sf-toolbar-info-with-delimiter { - border-right: 1px solid #999; - padding-right: 5px; - margin-right: 5px; + font-size: 13px; } .sf-toolbar-block .sf-toolbar-info { @@ -279,7 +267,9 @@ overflow: hidden; overflow-y: auto; } - +.sf-toolbar-block-request:hover .sf-toolbar-info { + max-width: none; +} .sf-toolbar-info-piece b.sf-toolbar-ajax-info { color: #F5F5F5; } From f087ac0bcd5a3e7e08fd3cb1be6c208364b0e3d2 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 10 Jul 2015 10:47:29 +0200 Subject: [PATCH 088/976] More vertical aligning fixes --- .../Resources/views/Collector/twig.html.twig | 8 +++----- .../Resources/views/Profiler/toolbar.css.twig | 11 +++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 293180757fd6..4f758a1d12c1 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -3,11 +3,9 @@ {% block toolbar %} {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %} {% set icon %} - - {{ include('@WebProfiler/Icon/twig.html.twig') }} - {{ time }} - ms - + {{ include('@WebProfiler/Icon/twig.html.twig') }} + {{ time }} + ms {% endset %} {% set text %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 3e3fa4404183..2314f0896d51 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -393,11 +393,22 @@ .sf-toolbar-icon .sf-toolbar-value { display: inline; } + .sf-toolbar-block .sf-toolbar-value { + /* needed for perfect vertical aligning */ + line-height: 37px; + } .sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg { top: 6px; } + /* TODO: needed for perfect vertical aligning, remove when icons are recreated */ + .sf-toolbar-block-twig .sf-toolbar-icon img { + top: 7px; + } + .sf-toolbar-block-security .sf-toolbar-icon svg { + top: 7px; + } .sf-toolbar-block-config .sf-toolbar-icon svg { top: 8px; } From 3ab2e20913e70aa7524a1c13f93174ed55666f4f Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 14 Jul 2015 13:03:21 +0200 Subject: [PATCH 089/976] fixed all vertical aligning issues and tweaked icons --- .../Resources/views/Profiler/dump.html.twig | 5 +- .../views/Collector/security.html.twig | 4 +- .../Resources/views/Icon/ajax.svg.twig | 7 +- .../Resources/views/Icon/close.svg.twig | 6 +- .../Resources/views/Icon/form.svg.twig | 7 +- .../Resources/views/Icon/logger.svg.twig | 8 ++- .../Resources/views/Icon/memory.svg.twig | 6 +- .../Resources/views/Icon/symfony.svg.twig | 13 +++- .../Resources/views/Icon/time.svg.twig | 6 +- .../Resources/views/Icon/translation.svg.twig | 14 +++- .../Resources/views/Icon/twig.html.twig | 6 +- .../Resources/views/Profiler/toolbar.css.twig | 64 ++++++------------- 12 files changed, 92 insertions(+), 54 deletions(-) diff --git a/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig index 2ce089908085..7f2354746963 100644 --- a/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig +++ b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig @@ -5,7 +5,10 @@ {% if dumps_count %} {% set icon %} - + + + + {{ dumps_count }} {% endset %} diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 7ecaf82759ef..6c5b85356de1 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -9,7 +9,9 @@ {% endif %} {% set icon %} - + + + {{ collector.user|default('n/a') }} {% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig index ba77a3aa7f40..d8cad847d471 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig @@ -1 +1,6 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig index 70b4d589bc60..49a75fc16514 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig @@ -1 +1,5 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig index 07bd66550718..18bdb6e793d5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig @@ -1 +1,6 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig index b29b2071d40f..3270a33618d5 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig @@ -1 +1,7 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig index 90b195a52173..5cd2fc4d84f2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig @@ -1 +1,5 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig index d4136c0958e0..8d0ab1417f89 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig @@ -1 +1,12 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig index 65f36710844f..ec280a59a6bc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig @@ -1 +1,5 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig index ed8601a2a945..93d42327ed85 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig @@ -1 +1,13 @@ - + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig index a8e72424cf20..21d81ea2161c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig @@ -1 +1,5 @@ -Twig + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 2314f0896d51..6f7f95ebc94a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -37,7 +37,7 @@ } .sf-toolbarreset svg, .sf-toolbarreset img { - max-height: 24px; + max-height: 20px; } .sf-toolbarreset .hide-button { background: #444; @@ -47,15 +47,11 @@ top: 0; right: 0; width: 36px; - height: 30px; + height: 28px; cursor: pointer; - padding-top: 6px; + padding-top: 8px; text-align: center; } -.sf-toolbarreset .hide-button svg { - max-height: 24px; - max-width: 24px; -} .sf-toolbar-block { cursor: default; @@ -70,9 +66,6 @@ display: block; text-decoration: none; } -.sf-toolbar-block-config svg { - max-height: 22px; -} .sf-toolbar-block span { display: inline-block; @@ -117,6 +110,9 @@ padding: 2px 5px; margin-bottom: 0px; } +.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status + .sf-toolbar-status { + margin-left: 4px; +} .sf-toolbar-block .sf-toolbar-info-piece:last-child { margin-bottom: 0; @@ -134,7 +130,7 @@ color: #AAA; display: table-cell; font-size: 12px; - padding: 4px 8px 4px 4px; + padding: 4px 8px 4px 0; } .sf-toolbar-block .sf-toolbar-info-piece span { @@ -186,9 +182,6 @@ background-color: rgba(200, 43, 43, 0.8); color: #FFF; } -.sf-toolbar-block.sf-toolbar-status-red svg > g > path { - fill: #FFF; -} .sf-toolbar-block.sf-toolbar-status-yellow { background-color: rgb(189, 132, 0); color: #FFF; @@ -196,9 +189,11 @@ .sf-toolbar-block-request .sf-toolbar-status { color: #FFF; + display: inline-block; font-size: 14px; - max-height: 36px; - padding: 10px 7px; + height: 36px; + line-height: 36px; + padding: 0 10px; } .sf-toolbar-block-request .sf-toolbar-info-piece a { text-decoration: none; @@ -212,9 +207,12 @@ .sf-toolbar-status-red .sf-toolbar-label { color: #FFF; } -.sf-toolbar-status-green svg > g > path, -.sf-toolbar-status-red svg > g > path, -.sf-toolbar-status-yellow svg > g > path { +.sf-toolbar-status-green svg path, +.sf-toolbar-status-red svg path, +.sf-toolbar-status-yellow svg path { + fill: #FFF; +} +.sf-toolbar-block-config svg path { fill: #FFF; } @@ -232,10 +230,6 @@ .sf-toolbar-block .sf-toolbar-icon svg { border-width: 0; position: relative; - top: 5px; -} -.sf-toolbar-block-translation .sf-toolbar-icon svg, -.sf-toolbar-block-config .sf-toolbar-icon svg { top: 8px; } @@ -243,24 +237,21 @@ .sf-toolbar-block .sf-toolbar-icon svg + span { margin-left: 4px; } - -.sf-toolbar-info-php-ext .sf-toolbar-status + .sf-toolbar-status { +.sf-toolbar-block-config .sf-toolbar-icon .sf-toolbar-value { margin-left: 4px; } .sf-toolbar-block:hover { position: relative; } - .sf-toolbar-block:hover .sf-toolbar-icon { background-color: #444; position: relative; z-index: 10002; } - .sf-toolbar-block:hover .sf-toolbar-info { display: block; - padding: 8px; + padding: 10px; max-width: 480px; max-height: 480px; word-wrap: break-word; @@ -393,25 +384,11 @@ .sf-toolbar-icon .sf-toolbar-value { display: inline; } - .sf-toolbar-block .sf-toolbar-value { - /* needed for perfect vertical aligning */ - line-height: 37px; - } .sf-toolbar-block .sf-toolbar-icon img, .sf-toolbar-block .sf-toolbar-icon svg { top: 6px; } - /* TODO: needed for perfect vertical aligning, remove when icons are recreated */ - .sf-toolbar-block-twig .sf-toolbar-icon img { - top: 7px; - } - .sf-toolbar-block-security .sf-toolbar-icon svg { - top: 7px; - } - .sf-toolbar-block-config .sf-toolbar-icon svg { - top: 8px; - } .sf-toolbar-block-config:hover .sf-toolbar-info { right: 0; } @@ -432,10 +409,11 @@ .sf-toolbar-block-request .sf-toolbar-icon { padding-left: 0; } + .sf-toolbar-block-request .sf-toolbar-status { margin-right: 4px; - padding: 10px; } + .sf-toolbar-block-config { float: right; margin-left: 0; From 9b585b980855938b69e9db5d54a0ae8d356caf3d Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 14 Jul 2015 15:44:49 +0200 Subject: [PATCH 090/976] Made the close icon a bit smaller --- .../Resources/views/Profiler/toolbar.css.twig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 6f7f95ebc94a..8698818f9fd4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -39,6 +39,7 @@ .sf-toolbarreset img { max-height: 20px; } + .sf-toolbarreset .hide-button { background: #444; cursor: pointer; @@ -47,11 +48,14 @@ top: 0; right: 0; width: 36px; - height: 28px; + height: 36px; cursor: pointer; - padding-top: 8px; text-align: center; } +.sf-toolbarreset .hide-button svg { + max-height: 18px; + padding-top: 10px; +} .sf-toolbar-block { cursor: default; From e94a6a02b15098450c073e54a109c29532dd6dc1 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 20 Jul 2015 11:29:57 +0200 Subject: [PATCH 091/976] Smaller font sizes for smartphones, fixed request status padding issue and make too long panels always be displayed at the leftmost part of browser window --- .../Resources/views/Profiler/toolbar.css.twig | 26 ++++++++++++++----- .../views/Profiler/toolbar_js.html.twig | 5 +++- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 8698818f9fd4..909198b9487f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -133,7 +133,7 @@ .sf-toolbar-block .sf-toolbar-info-piece b { color: #AAA; display: table-cell; - font-size: 12px; + font-size: 11px; padding: 4px 8px 4px 0; } .sf-toolbar-block .sf-toolbar-info-piece span { @@ -141,7 +141,7 @@ } .sf-toolbar-block .sf-toolbar-info-piece span { color: #F5F5F5; - font-size: 13px; + font-size: 12px; } .sf-toolbar-block .sf-toolbar-info { @@ -262,9 +262,6 @@ overflow: hidden; overflow-y: auto; } -.sf-toolbar-block-request:hover .sf-toolbar-info { - max-width: none; -} .sf-toolbar-info-piece b.sf-toolbar-ajax-info { color: #F5F5F5; } @@ -384,6 +381,7 @@ } @media (min-width: 768px) { + .sf-toolbar-icon .sf-toolbar-label, .sf-toolbar-icon .sf-toolbar-value { display: inline; @@ -412,10 +410,24 @@ } .sf-toolbar-block-request .sf-toolbar-icon { padding-left: 0; + padding-right: 0; + } + .sf-toolbar-block-request .sf-toolbar-status + .sf-toolbar-label { + margin-left: 4px; + } + .sf-toolbar-block-request .sf-toolbar-label + .sf-toolbar-value { + margin-right: 10px; } - .sf-toolbar-block-request .sf-toolbar-status { - margin-right: 4px; + .sf-toolbar-block-request:hover .sf-toolbar-info { + max-width: none; + } + + .sf-toolbar-block .sf-toolbar-info-piece b { + font-size: 12px; + } + .sf-toolbar-block .sf-toolbar-info-piece span { + font-size: 13px; } .sf-toolbar-block-config { diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig index 1814a004c935..1eadef3e9611 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig @@ -46,7 +46,10 @@ toolbarInfo.style.right = ''; toolbarInfo.style.left = ''; - if (leftValue > 0 && rightValue > 0) { + if (elementWidth > pageWidth) { + toolbarInfo.style.left = 0; + } + else if (leftValue > 0 && rightValue > 0) { toolbarInfo.style.right = (rightValue * -1) + 'px'; } else if (leftValue < 0) { toolbarInfo.style.left = 0; From 002dda5bd392bea90f6a0493e4c412f9811e9ba2 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 20 Jul 2015 11:59:57 +0200 Subject: [PATCH 092/976] Fixed toolbar issues when displaying it inside the profiler --- .../WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 909198b9487f..77eb3e858b5d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -357,6 +357,7 @@ bottom: auto; box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2); top: 0; + overflow: hidden; /* needed to aovid issues for toolbars with lots of elements */ } .sf-toolbar-block .sf-toolbar-info { From a0e03f6b2c8ef98f59ec2ee81f1ce64f07275c85 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 20 Jul 2015 12:14:53 +0200 Subject: [PATCH 093/976] Minor tweaks --- .../Resources/views/Profiler/toolbar.css.twig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 77eb3e858b5d..ae6ad0284427 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -370,6 +370,10 @@ .sf-toolbarreset { position: static; } + + .sf-toolbar-block:hover .sf-toolbar-icon { + background-color: inherit; + } {% endif %} /* Responsive Design */ @@ -399,6 +403,10 @@ .sf-toolbar-block-memory .sf-toolbar-icon svg { display: none; } + .sf-toolbar-block-time .sf-toolbar-icon svg + span, + .sf-toolbar-block-memory .sf-toolbar-icon svg + span { + margin-left: 0; + } .sf-toolbar-block .sf-toolbar-icon { padding: 0 10px; From 18472853226756ed1abe3feb1c2de7d6924a4883 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 20 Jul 2015 15:23:16 +0200 Subject: [PATCH 094/976] Pass the toolbar version number from the controller, to ease transition and keep BC --- .../Controller/ProfilerController.php | 15 +++++++++++---- .../Resources/views/Profiler/toolbar.html.twig | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index cada4ee6ca43..558966f415b3 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -11,13 +11,14 @@ namespace Symfony\Bundle\WebProfilerBundle\Controller; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\Profiler\Profiler; -use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** @@ -27,6 +28,9 @@ */ class ProfilerController { + const TOOLBAR_VERSION_1 = 1; + const TOOLBAR_VERSION_2 = 2; + private $templateManager; private $generator; private $profiler; @@ -201,12 +205,15 @@ public function toolbarAction(Request $request, $token) // the profiler is not enabled } + $toolbarVersion = Kernel::VERSION_ID < 20800 ? self::TOOLBAR_VERSION_1 : self::TOOLBAR_VERSION_2; + return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array( 'position' => $position, 'profile' => $profile, 'templates' => $this->getTemplateManager()->getTemplates($profile), 'profiler_url' => $url, 'token' => $token, + 'toolbar_version' => $toolbarVersion, )), 200, array('Content-Type' => 'text/html')); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index 58c125268e75..cc47a2ef7d32 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -30,7 +30,8 @@ 'collector': profile.getcollector(name), 'profiler_url': profiler_url, 'token': profile.token, - 'name': name + 'name': name, + 'toolbar_version': toolbar_version }) }} {% endfor %} From ebb44e483225ef5920816be76b212d90cae793d1 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 20 Jul 2015 16:27:08 +0200 Subject: [PATCH 095/976] Added some styles to make old panels look better in the new design --- .../Resources/views/Profiler/toolbar.css.twig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index ae6ad0284427..647354387027 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -385,6 +385,18 @@ display: inline-block; } +/* Legacy Design - these styles are maintained to make old panels look + a bit better on the new toolbar */ +.sf-toolbar-block .sf-toolbar-info-piece-additional-detail { + color: #AAA; + font-size: 12px; +} +.sf-toolbar-status-green .sf-toolbar-info-piece-additional-detail, +.sf-toolbar-status-yellow .sf-toolbar-info-piece-additional-detail, +.sf-toolbar-status-red .sf-toolbar-info-piece-additional-detail { + color: #FFF; +} + @media (min-width: 768px) { .sf-toolbar-icon .sf-toolbar-label, From 972a92e778e08505c77bb7b6f5187828fcf935d4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 22 Jul 2015 17:55:10 +0200 Subject: [PATCH 096/976] Misc. tweaks and improvements --- .../Bundle/WebProfilerBundle/Profiler/TemplateManager.php | 2 +- .../Resources/views/Collector/request.html.twig | 4 ++-- .../Resources/views/Collector/time.html.twig | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index 3cb004c46069..d074db31bd64 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -145,7 +145,7 @@ protected function templateExists($template) * * @return array */ - protected function reorderTemplates($templates) + private function reorderTemplates($templates) { $templates = $this->moveArrayElementToFirstPosition($templates, 'twig'); $templates = $this->moveArrayElementToFirstPosition($templates, 'memory'); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig index b7d693b6e74f..ad799c6b23e4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig @@ -37,12 +37,12 @@ {{ collector.statuscode }} {{ collector.statustext }}
- Controller method + Controller {{ request_handler }}
{% if collector.controller.class is defined %}
- Controller file + Controller class {{ collector.controller.class }}
{% endif %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index 8b5330df6b06..7d341a09d32f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -18,7 +18,7 @@ {% block toolbar %} {% set total_time = collector.events|length ? '%.0f'|format(collector.duration) : 'n/a' %} {% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %} - {% set status_color = collector.events|length ? collector.duration > 1000 ? 'yellow' : '' %} + {% set status_color = collector.events|length and collector.duration > 1000 ? 'yellow' : '' %} {% set icon %} {{ include('@WebProfiler/Icon/time.svg.twig') }} From 084cca644df7a3675fe9eb07c86b64aac6c49167 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 22 Jul 2015 18:16:40 +0200 Subject: [PATCH 097/976] Minor JavaScript optimizations --- .../Resources/views/Profiler/base_js.html.twig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index d0f51c42d2f4..6c8826dabe72 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -169,8 +169,8 @@ infoSpan.textContent = text; } } else { - var ajaxToolbarPanel = document.querySelectorAll('.sf-toolbar-block-ajax'); - ajaxToolbarPanel[0].style.display = 'none'; + var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax'); + ajaxToolbarPanel.style.display = 'none'; } } @@ -179,11 +179,11 @@ var className = 'sf-toolbar-ajax-requests sf-toolbar-value'; requestCounter[0].className = className; - var ajaxToolbarPanel = document.querySelectorAll('.sf-toolbar-block-ajax'); + var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax'); if (state == 'error') { - Sfjs.addClass(ajaxToolbarPanel[0], 'sf-toolbar-status-red'); + Sfjs.addClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); } else { - Sfjs.addClass(ajaxToolbarPanel[0], 'sf-ajax-request-loading'); + Sfjs.addClass(ajaxToolbarPanel, 'sf-ajax-request-loading'); } }; From 7ec1cd491da1bd696499c79d044d96f0fa58870e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 27 Jul 2015 09:36:22 +0200 Subject: [PATCH 098/976] Reverted the feature to display different toolbar versions --- .../WebProfilerBundle/Controller/ProfilerController.php | 6 ------ .../Resources/views/Profiler/toolbar.html.twig | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 558966f415b3..1af8644850f3 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -28,9 +28,6 @@ */ class ProfilerController { - const TOOLBAR_VERSION_1 = 1; - const TOOLBAR_VERSION_2 = 2; - private $templateManager; private $generator; private $profiler; @@ -205,15 +202,12 @@ public function toolbarAction(Request $request, $token) // the profiler is not enabled } - $toolbarVersion = Kernel::VERSION_ID < 20800 ? self::TOOLBAR_VERSION_1 : self::TOOLBAR_VERSION_2; - return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array( 'position' => $position, 'profile' => $profile, 'templates' => $this->getTemplateManager()->getTemplates($profile), 'profiler_url' => $url, 'token' => $token, - 'toolbar_version' => $toolbarVersion, )), 200, array('Content-Type' => 'text/html')); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index cc47a2ef7d32..58c125268e75 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -30,8 +30,7 @@ 'collector': profile.getcollector(name), 'profiler_url': profiler_url, 'token': profile.token, - 'name': name, - 'toolbar_version': toolbar_version + 'name': name }) }} {% endfor %} From 2fb33191fe71430ac42528deeb5d5855ae7e4ac8 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 30 Jul 2015 09:30:53 +0200 Subject: [PATCH 099/976] Removed an unused import --- .../Bundle/WebProfilerBundle/Controller/ProfilerController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 1af8644850f3..19d8322eb07d 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -17,7 +17,6 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\Profiler\Profiler; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; From 5070861326346efe932673d837e4d14e60df1af1 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 30 Jul 2015 13:21:10 +0200 Subject: [PATCH 100/976] Added a new profiler_markup_version to improve BC of the new toolbar --- .../Bundle/WebProfilerBundle/Controller/ProfilerController.php | 1 + .../Resources/views/Profiler/toolbar.html.twig | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 19d8322eb07d..261d0afcb908 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -207,6 +207,7 @@ public function toolbarAction(Request $request, $token) 'templates' => $this->getTemplateManager()->getTemplates($profile), 'profiler_url' => $url, 'token' => $token, + 'profiler_markup_version' => 2, // 1 = original toolbar, 2 = Symfony 2.8+ toolbar )), 200, array('Content-Type' => 'text/html')); } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index 58c125268e75..e141a0df1125 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -30,7 +30,8 @@ 'collector': profile.getcollector(name), 'profiler_url': profiler_url, 'token': profile.token, - 'name': name + 'name': name, + 'profiler_markup_version': profiler_markup_version }) }} {% endfor %} From 22f6bc5003e4536c8114731c576cb54ebd8250b2 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 30 Jul 2015 15:15:53 +0200 Subject: [PATCH 101/976] Removed an useless CSS class and added styles for
--- .../Resources/views/Profiler/toolbar.css.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 647354387027..1cd7fd541b0c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -95,9 +95,9 @@ display: table; z-index: 99999; } -.sf-toolbar-block .sf-toolbar-info-piece-group { +.sf-toolbar-block hr { border-top: 1px solid #777; - margin-top: 4px; + margin: 4px 0; padding-top: 4px; } .sf-toolbar-block .sf-toolbar-info-piece { From 9df0f8b4b819c975532694043a3fcf76f929167d Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 31 Jul 2015 12:12:25 +0200 Subject: [PATCH 102/976] Added some upgrade notes about the new toolbar design --- UPGRADE-2.8.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/UPGRADE-2.8.md b/UPGRADE-2.8.md index 966f1f471113..04792dee879f 100644 --- a/UPGRADE-2.8.md +++ b/UPGRADE-2.8.md @@ -136,3 +136,64 @@ DependencyInjection ``` + +Web Development Toolbar +----------------------- + +The web development toolbar has been completely redesigned. This update has +introduced some changes in the HTML markup of the toolbar items. + +Before: + +Information was wrapped with simple `` elements: + +```twig +{% block toolbar %} + {% set icon %} + + + {{ '%.1f'|format(collector.memory / 1024 / 1024) }} MB + + {% endset %} +{% endblock %} +``` + +After: + +Information is now semantically divided into values and labels according to +the `class` attribute of each `` element: + +```twig +{% block toolbar %} + {% set icon %} + + + {{ '%.1f'|format(collector.memory / 1024 / 1024) }} + + MB + {% endset %} +{% endblock %} +``` + +Most of the blocks designed for the previous toolbar will still be displayed +correctly. However, if you want to support both the old and the new toolbar, +it's better to make use of the new `profiler_markup_version` variable passed +to the toolbar templates: + +```twig +{% block toolbar %} + {% set profiler_markup_version = profiler_markup_version|default(1) %} + + {% set icon %} + {% if profiler_markup_version == 1 %} + + {# code for the original toolbar #} + + {% else %} + + {# code for the new toolbar (Symfony 2.8+) #} + + {% endif %} + {% endset %} +{% endblock %} +``` From 597637eceaff6f1605fc952e2053b2e833c373dc Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 31 Jul 2015 13:11:01 +0200 Subject: [PATCH 103/976] Tweaks and bug fixes --- .../Resources/views/Collector/ajax.html.twig | 2 +- .../Resources/views/Collector/config.html.twig | 7 +++++-- .../Resources/views/Collector/form.html.twig | 2 +- .../Resources/views/Collector/logger.html.twig | 4 ++-- .../Resources/views/Collector/memory.html.twig | 2 +- .../Resources/views/Collector/time.html.twig | 2 +- .../Resources/views/Collector/translation.html.twig | 8 ++++---- .../Resources/views/Collector/twig.html.twig | 2 +- .../Resources/views/Icon/{ajax.svg.twig => ajax.svg} | 0 .../Resources/views/Icon/{close.svg.twig => close.svg} | 0 .../Resources/views/Icon/{form.svg.twig => form.svg} | 0 .../Resources/views/Icon/{logger.svg.twig => logger.svg} | 0 .../Resources/views/Icon/{memory.svg.twig => memory.svg} | 0 .../views/Icon/{symfony.svg.twig => symfony.svg} | 0 .../Resources/views/Icon/{time.svg.twig => time.svg} | 0 .../views/Icon/{translation.svg.twig => translation.svg} | 0 .../Resources/views/Icon/{twig.html.twig => twig.svg} | 0 .../Resources/views/Profiler/base_js.html.twig | 3 +-- .../Resources/views/Profiler/toolbar.css.twig | 9 --------- .../Resources/views/Profiler/toolbar.html.twig | 4 ++-- 20 files changed, 19 insertions(+), 26 deletions(-) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{ajax.svg.twig => ajax.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{close.svg.twig => close.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{form.svg.twig => form.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{logger.svg.twig => logger.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{memory.svg.twig => memory.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{symfony.svg.twig => symfony.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{time.svg.twig => time.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{translation.svg.twig => translation.svg} (100%) rename src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/{twig.html.twig => twig.svg} (100%) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig index fd9ee91c567f..fe73b662bd31 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/ajax.html.twig @@ -2,7 +2,7 @@ {% block toolbar %} {% set icon %} - {{ include('@WebProfiler/Icon/ajax.svg.twig') }} + {{ include('@WebProfiler/Icon/ajax.svg') }} 0 {% endset %} 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 4b66f4589a66..7379beaae862 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -21,7 +21,7 @@ {% set icon %} {% if collector.symfonyState is defined %} - {{ include('@WebProfiler/Icon/symfony.svg.twig') }} + {{ include('@WebProfiler/Icon/symfony.svg') }} {{ collector.symfonyversion }} {% elseif collector.applicationname %} @@ -71,7 +71,10 @@
PHP version - {{ collector.phpversion }} + + {{ collector.phpversion }} +   View phpinfo() +
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig index 27515f752295..f226e644af8c 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -6,7 +6,7 @@ {% if collector.data.nb_errors > 0 or collector.data.forms|length %} {% set status_color = collector.data.nb_errors ? 'red' : '' %} {% set icon %} - {{ include('@WebProfiler/Icon/form.svg.twig') }} + {{ include('@WebProfiler/Icon/form.svg') }} {% if collector.data.nb_errors %} {{ collector.data.nb_errors }} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig index 6344197eff6b..5053657e2bfe 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig @@ -7,7 +7,7 @@ {% set icon %} {% set status_color = collector.counterrors ? 'red' : collector.countdeprecations ? 'yellow' : '' %} {% set error_count = collector.counterrors + collector.countdeprecations + collector.countscreams %} - {{ include('@WebProfiler/Icon/logger.svg.twig') }} + {{ include('@WebProfiler/Icon/logger.svg') }} {{ error_count }} {% endset %} @@ -80,7 +80,7 @@ -{% if collector.logs %} + {% if collector.logs %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig index 5dd22697475e..702b4df3658f 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/memory.html.twig @@ -3,7 +3,7 @@ {% block toolbar %} {% set icon %} {% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' : '' %} - {{ include('@WebProfiler/Icon/memory.svg.twig') }} + {{ include('@WebProfiler/Icon/memory.svg') }} {{ '%.1f'|format(collector.memory / 1024 / 1024) }}MB {% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig index 7d341a09d32f..39f8f62abd3a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig @@ -21,7 +21,7 @@ {% set status_color = collector.events|length and collector.duration > 1000 ? 'yellow' : '' %} {% set icon %} - {{ include('@WebProfiler/Icon/time.svg.twig') }} + {{ include('@WebProfiler/Icon/time.svg') }} {{ total_time }}ms {% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig index 7eefbde73c86..3d75c4676896 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/translation.html.twig @@ -5,7 +5,7 @@ {% block toolbar %} {% if collector.messages|length %} {% set icon %} - {{ include('@WebProfiler/Icon/translation.svg.twig') }} + {{ include('@WebProfiler/Icon/translation.svg') }} {% set status_color = collector.countMissings ? 'red' : collector.countFallbacks ? 'yellow' : '' %} {% set error_count = collector.countMissings + collector.countFallbacks %} {{ error_count ?: collector.countdefines }} @@ -15,20 +15,20 @@
Missing messages - {{ collector.countMissings|default(0) }} + {{ collector.countMissings }}
Fallback messages - {{ collector.countFallbacks|default(0) }} + {{ collector.countFallbacks }}
Defined messages - {{ collector.countdefines|default(0) }} + {{ collector.countdefines }}
{% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 4f758a1d12c1..95713b93db24 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -3,7 +3,7 @@ {% block toolbar %} {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %} {% set icon %} - {{ include('@WebProfiler/Icon/twig.html.twig') }} + {{ include('@WebProfiler/Icon/twig.svg') }} {{ time }}ms {% endset %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/ajax.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/close.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/form.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/logger.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/memory.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/symfony.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/time.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/translation.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg similarity index 100% rename from src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.html.twig rename to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/twig.svg diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig index 6c8826dabe72..2b1eeff3c00e 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig @@ -86,6 +86,7 @@ return; } + var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax'); var tbodies = document.querySelectorAll('.sf-toolbar-ajax-request-list'); var state = 'ok'; if (tbodies.length) { @@ -169,7 +170,6 @@ infoSpan.textContent = text; } } else { - var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax'); ajaxToolbarPanel.style.display = 'none'; } } @@ -179,7 +179,6 @@ var className = 'sf-toolbar-ajax-requests sf-toolbar-value'; requestCounter[0].className = className; - var ajaxToolbarPanel = document.querySelector('.sf-toolbar-block-ajax'); if (state == 'error') { Sfjs.addClass(ajaxToolbarPanel, 'sf-toolbar-status-red'); } else { diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 1cd7fd541b0c..5b2e4f66667a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -85,10 +85,6 @@ color: #AAA; font-size: 12px; } -/* TODO: remove it when Twig uses SVG icons */ -.sf-toolbar-block-twig img { - opacity: .8; -} .sf-toolbar-block .sf-toolbar-info { border-collapse: collapse; @@ -316,11 +312,6 @@ 50% { background: #444; } 100% { background: #222; } } -@-o-keyframes sf-blink { - 0% { background: #222; } - 50% { background: #444; } - 100% { background: #222; } -} @keyframes sf-blink { 0% { background: #222; } 50% { background: #444; } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index e141a0df1125..e4fea4b00b1a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -15,7 +15,7 @@ Sfjs.setPreference('toolbar/displayState', 'block'); "> - {{ include('@WebProfiler/Icon/symfony.svg.twig') }} + {{ include('@WebProfiler/Icon/symfony.svg') }} - - {% if collector.dumpsCount %} -
    - {% for dump in collector.getDumps('html') %} -
  • - in + {% for dump in collector.getDumps('html') %} +
    +

    In {% if dump.line %} {% set link = dump.file|file_link(dump.line) %} {% if link %} @@ -85,19 +57,22 @@ {% else %} {{ dump.name }} {% endif %} - line {{ dump.line }}: - - - {% if dump.fileExcerpt %}{{ dump.fileExcerpt|raw }}{% else %}{{ dump.file|file_excerpt(dump.line) }}{% endif %} - + line {{ dump.line }} - {{ dump.data|raw }} -

  • - {% endfor %} -
+ Show code + + + + + {{ dump.data|raw }} + {% else %} -

- No dumped variable -

- {% endif %} +
+

No content was dumped.

+
+ {% endfor %} {% endblock %} diff --git a/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg new file mode 100644 index 000000000000..2f7e708c8b3d --- /dev/null +++ b/src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg new file mode 100644 index 000000000000..02033fdc7f5e --- /dev/null +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig index 6c5b85356de1..5d36088c4341 100644 --- a/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig +++ b/src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig @@ -1,5 +1,7 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} +{% block page_title 'Security' %} + {% block toolbar %} {% if collector.tokenClass %} {% set is_authenticated = collector.enabled and collector.authenticated %} @@ -9,9 +11,7 @@ {% endif %} {% set icon %} - - - + {{ include('@Security/Collector/icon.svg') }} {{ collector.user|default('n/a') }} {% endset %} @@ -21,10 +21,12 @@ Logged in as{{ collector.user }} +
Authenticated {{ is_authenticated ? 'Yes' : 'No' }}
+ {% if collector.tokenClass != null %}
Token class @@ -46,54 +48,69 @@ {% endblock %} {% block menu %} - - - Security - + + {{ include('@Security/Collector/icon.svg') }} + Security + {% endblock %} {% block panel %} -

Security

+

Security Token

+ {% if collector.tokenClass %} +
+
+ {{ collector.user == 'anon.' ? 'Anonymous' : collector.user }} + Username +
+ +
+ {{ include('@WebProfiler/Icon/' ~ (collector.authenticated ? 'yes' : 'no') ~ '.svg') }} + Authenticated +
+
+
#
- - - - - - - - - - - - - {% if collector.supportsRoleHierarchy %} - - - - - {% endif %} - {% if collector.tokenClass != null %} - - - - - {% endif %} + + + + + + + + + + + + + {% if collector.supportsRoleHierarchy %} + + + + + {% endif %} + + {% if collector.tokenClass %} + + + + + {% endif %} +
Username{{ collector.user }}
Authenticated? - {% if collector.authenticated %} - yes - {% else %} - no {% if not collector.roles|length %}(probably because the user has no roles){% endif %} - {% endif %} -
Roles{{ collector.roles|yaml_encode }}
Inherited Roles{{ collector.inheritedRoles|yaml_encode }}
Token class{{ collector.tokenClass }}
PropertyValue
Roles + {{ collector.roles is empty ? 'none' : collector.roles|yaml_encode }} + + {% if not collector.authenticated and collector.roles is empty %} +

User is not authenticated probably because they have no roles.

+ {% endif %} +
Inherited Roles{{ collector.inheritedRoles is empty ? 'none' : collector.inheritedRoles|yaml_encode }}
Token class{{ collector.tokenClass }}
{% elseif collector.enabled %} -

- No token -

+
+

There is no security token.

+
{% else %} -

- The security component is disabled -

+
+

The security component is disabled.

+
{% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 261d0afcb908..21b02190c970 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -112,6 +112,7 @@ public function panelAction(Request $request, $token) 'request' => $request, 'templates' => $this->getTemplateManager()->getTemplates($profile), 'is_ajax' => $request->isXmlHttpRequest(), + 'profiler_markup_version' => 2, // 1 = original profiler, 2 = Symfony 2.8+ profiler )), 200, array('Content-Type' => 'text/html')); } 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 7379beaae862..669f654b72fd 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig @@ -19,21 +19,22 @@ {% endif %} {% set icon %} - {% if collector.symfonyState is defined %} + {% if collector.applicationname %} + {{ collector.applicationname }} + {{ collector.applicationversion }} + {% elseif collector.symfonyState is defined %} {{ include('@WebProfiler/Icon/symfony.svg') }} {{ collector.symfonyversion }} - {% elseif collector.applicationname %} - {{ collector.applicationname }} - {{ collector.applicationversion }} {% endif %} {% endset %} {% set text %} {% if collector.applicationname %}
- {{ collector.applicationname }} {{ collector.applicationversion }} + {{ collector.applicationname }} + {{ collector.applicationversion }}
{% endif %} @@ -88,118 +89,149 @@ {{ collector.sapiName }}
+ {% if collector.symfonyversion is defined %}
Resources - - Read Symfony {{ collector.symfonyversion }} Docs - + {% if 'Silex' == collector.applicationname %} + + Read Silex Docs + + {% else %} + + Read Symfony {{ collector.symfonyversion }} Docs + + {% endif %}
{% endif %} {% endset %} - {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: block_status }) }} + {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true, name: 'config', status: block_status }) }} {% endblock %} {% block menu %} - - - Config - + + {{ include('@WebProfiler/Icon/config.svg') }} + Configuration + {% endblock %} {% block panel %} -

Project Configuration

- - - - - - - {% if collector.applicationname %} - - - {% else %} - - + {% if collector.applicationname %} + {# this application is not the Symfony framework #} +

Project Configuration

+ +
+
+ {{ collector.applicationname }} + Application name +
+ +
+ {{ collector.applicationversion }} + Application version +
+
+ +

+ Based on Symfony {{ collector.symfonyversion }} +

+ {% else %} +

Symfony Configuration

+ +
+
+ {{ collector.symfonyversion }} + Symfony version +
+ + {% if 'n/a' != collector.appname %} +
+ {{ collector.appname }} + Application name +
{% endif %} -
- {% if 'n/a' != collector.appname %} - - - - - {% endif %} - {% if 'n/a' != collector.env %} - - - - - {% endif %} - {% if 'n/a' != collector.debug %} - - - - - {% endif %} -
KeyValue
Application{{ collector.applicationname }} {{ collector.applicationversion }} (on Symfony {{ collector.symfonyversion }})Symfony version{{ collector.symfonyversion }}
Application name{{ collector.appname }}
Environment{{ collector.env }}
Debug{{ collector.debug ? 'enabled' : 'disabled' }}
- -

PHP configuration

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyValue
PHP version{{ collector.phpversion }}
Xdebug{{ collector.hasxdebug ? 'enabled' : 'disabled' }}
PHP acceleration{{ collector.hasaccelerator ? 'enabled' : 'disabled' }}
XCache{{ collector.hasxcache ? 'enabled' : 'disabled' }}
APC{{ collector.hasapc ? 'enabled' : 'disabled' }}
Zend OPcache{{ collector.haszendopcache ? 'enabled' : 'disabled' }}
EAccelerator{{ collector.haseaccelerator ? 'enabled' : 'disabled' }}
Full PHP configurationphpinfo
+ + {% if 'n/a' != collector.env %} +
+ {{ collector.env }} + Environment +
+ {% endif %} + + {% if 'n/a' != collector.debug %} +
+ {{ collector.debug ? 'enabled' : 'disabled' }} + Debug +
+ {% endif %} +
+ {% endif %} + +

PHP Configuration

+ +
+
+ {{ collector.phpversion }} + PHP version +
+ +
+ {{ include('@WebProfiler/Icon/' ~ (collector.hasaccelerator ? 'yes' : 'no') ~ '.svg') }} + PHP acceleration +
+ +
+ {{ include('@WebProfiler/Icon/' ~ (collector.hasxdebug ? 'yes' : 'no') ~ '.svg') }} + Xdebug +
+
+ +
+
+ {{ include('@WebProfiler/Icon/' ~ (collector.haszendopcache ? 'yes' : 'no') ~ '.svg') }} + OPcache +
+ +
+ {{ include('@WebProfiler/Icon/' ~ (collector.hasapc ? 'yes' : 'no') ~ '.svg') }} + APC +
+ +
+ {{ include('@WebProfiler/Icon/' ~ (collector.hasxcache ? 'yes' : 'no') ~ '.svg') }} + XCache +
+ +
+ {{ include('@WebProfiler/Icon/' ~ (collector.haseaccelerator ? 'yes' : 'no') ~ '.svg') }} + EAccelerator +
+
+ +

+ View full PHP configuration +

{% if collector.bundles %} -

Active bundles

+

Enabled Bundles ({{ collector.bundles|length }})

- - - - - {% set bundles = collector.bundles %} - {% for name in bundles|keys|sort %} - - - - - {% endfor %} + + + + + + + + {% for name in collector.bundles|keys|sort %} + + + + + {% endfor %} +
NamePath
{{ name }}{{ bundles[name] }}
NamePath
{{ name }}{{ collector.bundles[name] }}
{% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig index 879e537f13ce..24a1e3fff99a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/events.html.twig @@ -1,79 +1,117 @@ {% extends '@WebProfiler/Profiler/layout.html.twig' %} -{% from _self import display_listener %} +{% import _self as helper %} {% block menu %} - + {{ include('@WebProfiler/Icon/event.svg') }} Events {% endblock %} {% block panel %} - {% if collector.calledlisteners|length %} - {{ block('panelContent') }} +

Event Dispatcher

+ + {% if collector.calledlisteners is empty %} +
+

No events have been recorded. Check that debugging is enabled in the kernel.

+
{% else %} -

Events

-

- No events have been recorded. Are you sure that debugging is enabled in the kernel? -

+
+
+

Called Listeners {{ collector.calledlisteners|length }}

+ +
+ {{ helper.render_table(collector.calledlisteners) }} +
+
+ +
+

Not Called Listeners {{ collector.notcalledlisteners|length }}

+
+ {% if collector.notcalledlisteners is empty %} +
+

+ There are no uncalled listeners. +

+

+ All listeners were called for this request or an error occurred + when trying to collect uncalled listeners (in which case check the + logs to get more information). +

+
+ {% else %} + {{ helper.render_table(collector.notcalledlisteners) }} + {% endif %} +
+
+
{% endif %} {% endblock %} -{% block panelContent %} -

Called Listeners

- +{% macro render_table(listeners) %} - - - - - {% for listener in collector.calledlisteners %} + - - + + - {% endfor %} -
Event nameListener
{{ listener.event }}{{ display_listener(listener) }}PriorityListener
+ + + {% set previous_event = (listeners|first).event %} + {% for listener in listeners %} + {% if loop.first or listener.event != previous_event %} + {% if not loop.first %} + + {% endif %} + + + + {{ listener.event }} + -

Not Called Listeners

+ {% set previous_event = listener.event %} + {% endif %} - {% if collector.notcalledlisteners %} - - - - - {% set listeners = collector.notcalledlisteners %} - {% for listener in listeners|keys|sort %} - - - - - {% endfor %} -
Event nameListener
{{ listeners[listener].event }}{{ display_listener(listeners[listener]) }}
- {% else %} -

- No uncalled listeners. -

-

+ {{ listener.priority|default('-') }} + + {% if listener.type == 'Closure' %} - All listeners were called for this request or an error occurred - when trying to collect uncalled listeners (in which case check the - logs to get more information). + Closure + (there is no class or file information) -

- {% endif %} -{% endblock %} + {% elseif listener.type == 'Function' %} -{% macro display_listener(listener) %} - {% if listener.type == "Closure" %} - Closure - {% elseif listener.type == "Function" %} - {% set link = listener.file|file_link(listener.line) %} - {% if link %}{{ listener.function }}{% else %}{{ listener.function }}{% endif %} - {% elseif listener.type == "Method" %} - {% set link = listener.file|file_link(listener.line) %} - {{ listener.class|abbr_class }}::{% if link %}{{ listener.method }}{% else %}{{ listener.method }}{% endif %} - {% endif %} + {% set link = listener.file|file_link(listener.line) %} + {% if link %} + {{ listener.function }}() + ({{ listener.file }}) + {% else %} + {{ listener.function }}() + {{ listener.file }} (line {{ listener.line }}) + {% endif %} + + {% elseif listener.type == "Method" %} + + {% set link = listener.file|file_link(listener.line) %} + {% set class_namespace = listener.class|split('\\', -1)|join('\\') %} + + {% if link %} + {{ listener.class|abbr_class|striptags }}::{{ listener.method }}() + ({{ listener.class }}) + {% else %} + {{ class_namespace }}\{{ listener.class|abbr_class|striptags }}::{{ listener.method }}() + {{ listener.file }} (line {{ listener.line }}) + {% endif %} + + {% endif %} + + + + {% if loop.last %} + + {% endif %} + {% endfor %} + {% endmacro %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig index 1224081bd600..8d5eaf7e1ac4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig @@ -1,55 +1,82 @@ .sf-reset .traces { - padding-bottom: 14px; + padding: 0 0 1em 1.5em; +} +.sf-reset .traces a { + font-size: 14px; +} +.sf-reset .traces abbr { + border-bottom-color: #AAA; + padding-bottom: 2px; } .sf-reset .traces li { - font-size: 12px; - color: #868686; - padding: 5px 4px; + ccolor: #222; + font-size: 14px; + padding: 5px 0; list-style-type: decimal; - margin-left: 20px; + margin: 0 0 0 1em; white-space: break-word; } +.sf-reset .traces li.selected { + background: rgba(255, 255, 153, 0.5); +} + +.sf-reset .traces ol li { + font-size: 12px; + color: #777; +} .sf-reset #logs .traces li.error { - font-style: normal; color: #AA3333; - background: #f9ecec; } .sf-reset #logs .traces li.warning { - font-style: normal; - background: #ffcc00; -} -/* fix for Opera not liking empty
  • */ -.sf-reset .traces li:after { - content: "\00A0"; + background: #FFCC00; } .sf-reset .trace { - border: 1px solid #D3D3D3; + border: 1px solid #DDD; + background: #FFF; padding: 10px; overflow: auto; - margin: 10px 0 20px; + margin: 1em 0; +} +.sf-reset .trace code, +#traces-text pre { + font-size: 13px; } .sf-reset .block-exception { - border-radius: 16px; - margin-bottom: 20px; - background-color: #f6f6f6; - border: 1px solid #dfdfdf; - padding: 30px 28px; + margin-bottom: 2em; + background-color: #FFF; + border: 1px solid #EEE; + padding: 28px; word-wrap: break-word; overflow: hidden; } +.sf-reset .block-exception h1 { + font-size: 21px; + font-weight: normal; + margin: 0 0 12px; +} +.sf-reset .block-exception .linked { + margin-top: 1em; +} + +.sf-reset .block { + margin-bottom: 2em; +} +.sf-reset .block h2 { + font-size: 16px; +} .sf-reset .block-exception div { - color: #313131; - font-size: 10px; + font-size: 14px; } .sf-reset .block-exception-detected .illustration-exception, .sf-reset .block-exception-detected .text-exception { float: left; } .sf-reset .block-exception-detected .illustration-exception { - width: 152px; + width: 110px; } .sf-reset .block-exception-detected .text-exception { - width: 670px; + width: 650px; + margin-left: 20px; padding: 30px 44px 24px 46px; position: relative; } @@ -65,40 +92,6 @@ bottom: 0; right: 50px; } -.sf-reset .block-exception p { - font-family: Arial, Helvetica, sans-serif; -} -.sf-reset .block-exception p a, -.sf-reset .block-exception p a:hover { - color: #565656; -} -.sf-reset .logs h2 { - float: left; - width: 654px; -} -.sf-reset .error-count { - float: right; - width: 170px; - text-align: right; -} -.sf-reset .error-count span { - display: inline-block; - background-color: #aacd4e; - border-radius: 6px; - padding: 4px; - color: white; - margin-right: 2px; - font-size: 11px; - font-weight: bold; -} .sf-reset .toggle { vertical-align: middle; } -.sf-reset .linked ul, -.sf-reset .linked li { - display: inline; -} -.sf-reset #output-content { - color: #000; - font-size: 12px; -} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig index 5175f6610769..94dfbb6acac0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.html.twig @@ -3,34 +3,34 @@ {% block head %} {% if collector.hasexception %} {% endif %} {{ parent() }} {% endblock %} {% block menu %} - - - Exception - + + {{ include('@WebProfiler/Icon/exception.svg') }} + Exception {% if collector.hasexception %} - 1 + + 1 + {% endif %} - {% endblock %} {% block panel %} -

    Exception

    +

    Exceptions

    {% if not collector.hasexception %} -

    - No exception was thrown and uncaught during the request. -

    +
    +

    No exception was thrown and caught during the request.

    +
    {% else %}
    - {{ render(path('_profiler_exception', { 'token': token })) }} + {{ render(path('_profiler_exception', { token: token })) }}
    {% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig index d7b286647044..f119f5eb80e0 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig @@ -8,11 +8,7 @@ {% set icon %} {{ include('@WebProfiler/Icon/form.svg') }} - {% if collector.data.nb_errors %} - {{ collector.data.nb_errors }} - {% else %} - {{ collector.data.forms|length }} - {% endif %} + {{ collector.data.nb_errors ?: collector.data.forms|length }} {% endset %} @@ -32,188 +28,184 @@ {% endblock %} {% block menu %} - - + + {{ include('@WebProfiler/Icon/form.svg') }} Forms - {% if collector.data.forms|length %} - {{ collector.data.forms|length }} + {% if collector.data.nb_errors > 0 %} + + {{ collector.data.nb_errors }} + {% endif %} {% endblock %} -{% block panel %} - +{% endblock %} - {% if collector.data.forms|length %} -
    -
    -

    Forms

    +{% block panel %} +

    Forms

    -
      - {% for formName, formData in collector.data.forms %} - {{ form_tree_entry(formName, formData, true) }} - {% endfor %} -
    -
    + {% if collector.data.forms|length %} +
    +
      + {% for formName, formData in collector.data.forms %} + {{ form_tree_entry(formName, formData, true) }} + {% endfor %} +
    +
    +
    {% for formName, formData in collector.data.forms %} {{ form_tree_details(formName, formData, collector.data.forms_by_hash) }} {% endfor %}
    {% else %} -

    No forms were submitted for this request.

    +
    +

    No forms were submitted for this request.

    +
    {% endif %} -{% endblock %} - -{% macro state(translation) %} - {% if translation.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK') %} - same as fallback - {% elseif translation.state == constant('Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING') %} - missing - {% endif %} {% endmacro %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig index 95713b93db24..c3c8a5d5f676 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig @@ -31,58 +31,71 @@ {% endblock %} {% block menu %} - - Twig - Twig - - {{ collector.templatecount }} - {{ '%0.0f ms'|format(collector.time) }} + + {{ include('@WebProfiler/Icon/twig.svg') }} + Twig - {% endblock %} {% block panel %} - {% if collector.templatecount %} -

    Twig Stats

    + {% if collector.templatecount == 0 %} +

    Twig

    - - - - - - - - - - - - - - - - - -
    Total Render Time
    including sub-requests rendering time
    {{ '%0.0f ms'|format(collector.time) }}
    Template Calls
    {{ collector.templatecount }}
    Block Calls
    {{ collector.blockcount }}
    Macro Calls
    {{ collector.macrocount }}
    +
    +

    No Twig templates were rendered for this request.

    +
    + {% else %} +

    Twig Metrics

    + +
    +
    + {{ '%0.0f'|format(collector.time) }} ms + Render time +
    + +
    + {{ collector.templatecount }} + Template calls +
    + +
    + {{ collector.blockcount }} + Block calls +
    + +
    + {{ collector.macrocount }} + Macro calls +
    +
    + +

    + Render time includes sub-requests rendering time (if any). +

    Rendered Templates

    - - - - + + + + + + + {% for template, count in collector.templates %} - - + + {% endfor %} +
    Template NameRender Count
    Template NameRender Count
    {{ template }}
    {{ count }}
    {{ template }}{{ count }}

    Rendering Call Graph

    - {{ collector.htmlcallgraph }} - {% else %} -

    No Twig templates were rendered for this request.

    +
    + {{ collector.htmlcallgraph }} +
    {% endif %} {% endblock %} diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg new file mode 100644 index 000000000000..9bafe3830175 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/config.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg new file mode 100644 index 000000000000..7d15a66f0103 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/event.svg @@ -0,0 +1,11 @@ + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg new file mode 100644 index 000000000000..98e4eb1ebd52 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/exception.svg @@ -0,0 +1,15 @@ + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg new file mode 100644 index 000000000000..02eb4e9c6abb --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/no.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg new file mode 100644 index 000000000000..d74a72850dc0 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/request.svg @@ -0,0 +1,16 @@ + + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg new file mode 100644 index 000000000000..061a0a19465a --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/router.svg @@ -0,0 +1,6 @@ + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg new file mode 100644 index 000000000000..b5f0a2c85be4 --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/search.svg @@ -0,0 +1,7 @@ + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg new file mode 100644 index 000000000000..0f129bffc21b --- /dev/null +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Icon/yes.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/admin.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/admin.html.twig index a47b254a7716..431861cad604 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/admin.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/admin.html.twig @@ -1,10 +1,7 @@ {% if token is not empty %} -