diff -u b/core/composer.lock b/core/composer.lock --- b/core/composer.lock +++ b/core/composer.lock @@ -7,31 +7,31 @@ }, { "package": "symfony/class-loader", - "version": "v2.1.0-BETA2" + "version": "v2.1.0-BETA3" }, { "package": "symfony/dependency-injection", - "version": "v2.1.0-BETA2" + "version": "v2.1.0-BETA3" }, { "package": "symfony/event-dispatcher", - "version": "v2.1.0-BETA2" + "version": "v2.1.0-BETA3" }, { "package": "symfony/http-foundation", - "version": "v2.1.0-BETA2" + "version": "v2.1.0-BETA3" }, { "package": "symfony/http-kernel", - "version": "v2.1.0-BETA2" + "version": "v2.1.0-BETA3" }, { "package": "symfony/routing", - "version": "v2.1.0-BETA2" + "version": "v2.1.0-BETA3" }, { "package": "symfony/yaml", - "version": "v2.1.0-BETA2" + "version": "v2.1.0-BETA3" }, { "package": "twig/twig", interdiff impossible; taking evasive action reverted: --- b/core/vendor/composer/installed.json +++ a/core/vendor/composer/installed.json @@ -1,36 +1,32 @@ [ { + "name": "twig/twig", + "version": "v1.8.3", + "version_normalized": "1.8.3.0", + "time": "2012-06-17 18:48:16", - "name": "symfony/class-loader", - "version": "v2.1.0-BETA2", - "version_normalized": "2.1.0.0-beta2", - "target-dir": "Symfony/Component/ClassLoader", - "time": "2012-07-04 17:47:47", "source": { "type": "git", + "url": "git://github.com/fabpot/Twig.git", + "reference": "v1.8.3" - "url": "https://github.com/symfony/ClassLoader", - "reference": "v2.1.0-BETA2" }, "dist": { "type": "zip", + "url": "https://github.com/fabpot/Twig/zipball/v1.8.3", + "reference": "v1.8.3", - "url": "https://github.com/symfony/ClassLoader/zipball/v2.1.0-BETA2", - "reference": "v2.1.0-BETA2", "shasum": "" }, "require": { + "php": ">=5.2.4" - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/finder": "2.1.*" }, "type": "library", "extra": { "branch-alias": { + "dev-master": "1.8-dev" - "dev-master": "2.1-dev" } }, "installation-source": "dist", "license": [ + "BSD-3" - "MIT" ], "authors": [ { @@ -40,54 +36,47 @@ "role": null }, { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "homepage": null, - "name": "Symfony Community", - "email": null, - "homepage": "http://symfony.com/contributors", "role": null } ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], - "description": "Symfony ClassLoader Component", - "homepage": "http://symfony.com", "autoload": { "psr-0": { + "Twig_": "lib/" - "Symfony\\Component\\ClassLoader": "" } } }, { "name": "symfony/dependency-injection", + "version": "v2.1.0-BETA1", + "version_normalized": "2.1.0.0-beta1", - "version": "v2.1.0-BETA2", - "version_normalized": "2.1.0.0-beta2", "target-dir": "Symfony/Component/DependencyInjection", + "time": "2012-06-12 11:59:42", - "time": "2012-07-09 10:31:54", "source": { "type": "git", "url": "https://github.com/symfony/DependencyInjection", + "reference": "v2.1.0-BETA1" - "reference": "v2.1.0-BETA2" }, "dist": { "type": "zip", + "url": "https://github.com/symfony/DependencyInjection/zipball/v2.1.0-BETA1", + "reference": "v2.1.0-BETA1", - "url": "https://github.com/symfony/DependencyInjection/zipball/v2.1.0-BETA2", - "reference": "v2.1.0-BETA2", "shasum": "" }, "require": { + "php": ">=5.3.2" - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/yaml": "2.1.*", - "symfony/config": "2.1.*" }, "suggest": { + "symfony/yaml": "v2.1.0-BETA1" - "symfony/yaml": "v2.1.0-BETA2", - "symfony/config": "v2.1.0-BETA2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, "installation-source": "dist", "license": [ "MIT" @@ -115,19 +104,20 @@ } }, { + "name": "symfony/event-dispatcher", + "version": "v2.1.0-BETA1", + "version_normalized": "2.1.0.0-beta1", + "target-dir": "Symfony/Component/EventDispatcher", + "time": "2012-05-15 16:56:32", - "name": "doctrine/common", - "version": "2.2.2", - "version_normalized": "2.2.2.0", - "time": "2012-04-13 11:46:44", "source": { "type": "git", + "url": "https://github.com/symfony/EventDispatcher", + "reference": "v2.1.0-BETA1" - "url": "https://github.com/doctrine/common", - "reference": "2.2.2" }, "dist": { "type": "zip", + "url": "https://github.com/symfony/EventDispatcher/zipball/v2.1.0-BETA1", + "reference": "v2.1.0-BETA1", - "url": "https://github.com/doctrine/common/zipball/2.2.2", - "reference": "2.2.2", "shasum": "" }, "require": { @@ -136,83 +126,6 @@ "type": "library", "installation-source": "dist", "license": [ - "LGPL" - ], - "authors": [ - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com", - "homepage": "http://www.jwage.com/", - "role": null - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": null, - "role": null - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org", - "homepage": null, - "role": null - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de", - "homepage": null, - "role": null - }, - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": null - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "collections", - "spl", - "eventmanager", - "annotations", - "persistence" - ], - "autoload": { - "psr-0": { - "Doctrine\\Common": "lib/" - } - } - }, - { - "name": "symfony/http-foundation", - "version": "v2.1.0-BETA2", - "version_normalized": "2.1.0.0-beta2", - "target-dir": "Symfony/Component/HttpFoundation", - "time": "2012-07-09 01:24:52", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation", - "reference": "v2.1.0-BETA2" - }, - "dist": { - "type": "zip", - "url": "https://github.com/symfony/HttpFoundation/zipball/v2.1.0-BETA2", - "reference": "v2.1.0-BETA2", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "installation-source": "dist", - "license": [ "MIT" ], "authors": [ @@ -229,48 +142,35 @@ "role": null } ], + "description": "Symfony EventDispatcher Component", - "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { + "Symfony\\Component\\EventDispatcher": "" - "Symfony\\Component\\HttpFoundation": "", - "SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs" } } }, { + "name": "symfony/http-foundation", + "version": "v2.1.0-BETA1", + "version_normalized": "2.1.0.0-beta1", + "target-dir": "Symfony/Component/HttpFoundation", + "time": "2012-06-12 06:10:53", - "name": "symfony/event-dispatcher", - "version": "v2.1.0-BETA2", - "version_normalized": "2.1.0.0-beta2", - "target-dir": "Symfony/Component/EventDispatcher", - "time": "2012-05-26 11:48:33", "source": { "type": "git", + "url": "https://github.com/symfony/HttpFoundation", + "reference": "v2.1.0-BETA1" - "url": "https://github.com/symfony/EventDispatcher", - "reference": "v2.1.0-BETA2" }, "dist": { "type": "zip", + "url": "https://github.com/symfony/HttpFoundation/zipball/v2.1.0-BETA1", + "reference": "v2.1.0-BETA1", - "url": "https://github.com/symfony/EventDispatcher/zipball/v2.1.0-BETA2", - "reference": "v2.1.0-BETA2", "shasum": "" }, "require": { + "php": ">=5.3.2" - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/dependency-injection": "2.1.*" - }, - "suggest": { - "symfony/dependency-injection": "v2.1.0-BETA2", - "symfony/http-kernel": "v2.1.0-BETA2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, "installation-source": "dist", "license": [ "MIT" @@ -289,60 +189,45 @@ "role": null } ], + "description": "Symfony HttpFoundation Component", - "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { + "Symfony\\Component\\HttpFoundation": "" - "Symfony\\Component\\EventDispatcher": "" } } }, { "name": "symfony/http-kernel", + "version": "v2.1.0-BETA1", + "version_normalized": "2.1.0.0-beta1", - "version": "v2.1.0-BETA2", - "version_normalized": "2.1.0.0-beta2", "target-dir": "Symfony/Component/HttpKernel", + "time": "2012-06-12 11:59:42", - "time": "2012-07-09 11:52:38", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel", + "reference": "v2.1.0-BETA1" - "reference": "v2.1.0-BETA2" }, "dist": { "type": "zip", + "url": "https://github.com/symfony/HttpKernel/zipball/v2.1.0-BETA1", + "reference": "v2.1.0-BETA1", - "url": "https://github.com/symfony/HttpKernel/zipball/v2.1.0-BETA2", - "reference": "v2.1.0-BETA2", "shasum": "" }, "require": { + "php": ">=5.3.2", + "symfony/event-dispatcher": "self.version", + "symfony/http-foundation": "self.version" - "php": ">=5.3.3", - "symfony/event-dispatcher": "2.1.*", - "symfony/http-foundation": "2.1.*" - }, - "require-dev": { - "symfony/browser-kit": "2.1.*", - "symfony/class-loader": "2.1.*", - "symfony/config": "2.1.*", - "symfony/console": "2.1.*", - "symfony/dependency-injection": "2.1.*", - "symfony/finder": "2.1.*", - "symfony/process": "2.1.*", - "symfony/routing": "2.1.*" }, "suggest": { + "symfony/browser-kit": "v2.1.0-BETA1", + "symfony/class-loader": "v2.1.0-BETA1", + "symfony/config": "v2.1.0-BETA1", + "symfony/console": "v2.1.0-BETA1", + "symfony/dependency-injection": "v2.1.0-BETA1", + "symfony/finder": "v2.1.0-BETA1" - "symfony/browser-kit": "v2.1.0-BETA2", - "symfony/class-loader": "v2.1.0-BETA2", - "symfony/config": "v2.1.0-BETA2", - "symfony/console": "v2.1.0-BETA2", - "symfony/dependency-injection": "v2.1.0-BETA2", - "symfony/finder": "v2.1.0-BETA2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, "installation-source": "dist", "license": [ "MIT" @@ -371,41 +256,29 @@ }, { "name": "symfony/routing", + "version": "v2.1.0-BETA1", + "version_normalized": "2.1.0.0-beta1", - "version": "v2.1.0-BETA2", - "version_normalized": "2.1.0.0-beta2", "target-dir": "Symfony/Component/Routing", + "time": "2012-06-12 11:59:42", - "time": "2012-07-03 14:52:06", "source": { "type": "git", "url": "https://github.com/symfony/Routing", + "reference": "v2.1.0-BETA1" - "reference": "v2.1.0-BETA2" }, "dist": { "type": "zip", + "url": "https://github.com/symfony/Routing/zipball/v2.1.0-BETA1", + "reference": "v2.1.0-BETA1", - "url": "https://github.com/symfony/Routing/zipball/v2.1.0-BETA2", - "reference": "v2.1.0-BETA2", "shasum": "" }, "require": { + "php": ">=5.3.2" - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/config": "2.1.*", - "symfony/yaml": "2.1.*", - "symfony/http-kernel": "2.1.*", - "doctrine/common": ">=2.2,<2.4-dev" }, "suggest": { + "symfony/config": "v2.1.0-BETA1", + "symfony/yaml": "v2.1.0-BETA1" - "symfony/config": "v2.1.0-BETA2", - "symfony/yaml": "v2.1.0-BETA2", - "doctrine/common": ">=2.2,<2.4-dev" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, "installation-source": "dist", "license": [ "MIT" @@ -434,30 +307,25 @@ }, { "name": "symfony/yaml", + "version": "v2.1.0-BETA1", + "version_normalized": "2.1.0.0-beta1", - "version": "v2.1.0-BETA2", - "version_normalized": "2.1.0.0-beta2", "target-dir": "Symfony/Component/Yaml", + "time": "2012-06-09 15:04:17", - "time": "2012-07-04 20:29:04", "source": { "type": "git", "url": "https://github.com/symfony/Yaml", + "reference": "v2.1.0-BETA1" - "reference": "v2.1.0-BETA2" }, "dist": { "type": "zip", + "url": "https://github.com/symfony/Yaml/zipball/v2.1.0-BETA1", + "reference": "v2.1.0-BETA1", - "url": "https://github.com/symfony/Yaml/zipball/v2.1.0-BETA2", - "reference": "v2.1.0-BETA2", "shasum": "" }, "require": { + "php": ">=5.3.2" - "php": ">=5.3.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, "installation-source": "dist", "license": [ "MIT" @@ -485,33 +353,29 @@ } }, { + "name": "symfony/class-loader", + "version": "v2.1.0-BETA1", + "version_normalized": "2.1.0.0-beta1", + "target-dir": "Symfony/Component/ClassLoader", + "time": "2012-04-23 05:37:21", - "name": "twig/twig", - "version": "v1.9.0", - "version_normalized": "1.9.0.0", - "time": "2012-07-13 16:26:34", "source": { "type": "git", + "url": "https://github.com/symfony/ClassLoader", + "reference": "v2.1.0-BETA1" - "url": "git://github.com/fabpot/Twig.git", - "reference": "v1.9.0" }, "dist": { "type": "zip", + "url": "https://github.com/symfony/ClassLoader/zipball/v2.1.0-BETA1", + "reference": "v2.1.0-BETA1", - "url": "https://github.com/fabpot/Twig/zipball/v1.9.0", - "reference": "v1.9.0", "shasum": "" }, "require": { + "php": ">=5.3.2" - "php": ">=5.2.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, "installation-source": "dist", "license": [ + "MIT" - "BSD-3" ], "authors": [ { @@ -521,20 +385,17 @@ "role": null }, { + "name": "Symfony Community", + "email": null, + "homepage": "http://symfony.com/contributors", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "homepage": null, "role": null } ], + "description": "Symfony ClassLoader Component", + "homepage": "http://symfony.com", - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], "autoload": { "psr-0": { + "Symfony\\Component\\ClassLoader": "" - "Twig_": "lib/" } } } unchanged: --- a/core/vendor/composer/installed.json +++ b/core/vendor/composer/installed.json @@ -1,18 +1,18 @@ [ { "name": "twig/twig", - "version": "v1.8.3", - "version_normalized": "1.8.3.0", - "time": "2012-06-17 18:48:16", + "version": "v1.9.0", + "version_normalized": "1.9.0.0", + "time": "2012-07-13 23:26:34", "source": { "type": "git", "url": "git://github.com/fabpot/Twig.git", - "reference": "v1.8.3" + "reference": "v1.9.0" }, "dist": { "type": "zip", - "url": "https://github.com/fabpot/Twig/zipball/v1.8.3", - "reference": "v1.8.3", + "url": "https://github.com/fabpot/Twig/zipball/v1.9.0", + "reference": "v1.9.0", "shasum": "" }, "require": { @@ -21,7 +21,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "installation-source": "dist", @@ -54,29 +54,105 @@ } }, { - "name": "symfony/dependency-injection", - "version": "v2.1.0-BETA1", - "version_normalized": "2.1.0.0-beta1", - "target-dir": "Symfony/Component/DependencyInjection", - "time": "2012-06-12 11:59:42", + "name": "doctrine/common", + "version": "2.2.2", + "version_normalized": "2.2.2.0", + "time": "2012-04-13 14:46:44", "source": { "type": "git", - "url": "https://github.com/symfony/DependencyInjection", - "reference": "v2.1.0-BETA1" + "url": "https://github.com/doctrine/common", + "reference": "2.2.2" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/DependencyInjection/zipball/v2.1.0-BETA1", - "reference": "v2.1.0-BETA1", + "url": "https://github.com/doctrine/common/zipball/2.2.2", + "reference": "2.2.2", "shasum": "" }, "require": { "php": ">=5.3.2" }, - "suggest": { - "symfony/yaml": "v2.1.0-BETA1" + "type": "library", + "installation-source": "dist", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com", + "homepage": "http://www.jwage.com/", + "role": null + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com", + "homepage": null, + "role": null + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org", + "homepage": null, + "role": null + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de", + "homepage": null, + "role": null + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": null + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "collections", + "spl", + "eventmanager", + "annotations", + "persistence" + ], + "autoload": { + "psr-0": { + "Doctrine\\Common": "lib/" + } + } + }, + { + "name": "symfony/class-loader", + "version": "v2.1.0-BETA3", + "version_normalized": "2.1.0.0-beta3", + "target-dir": "Symfony/Component/ClassLoader", + "time": "2012-07-15 10:13:51", + "source": { + "type": "git", + "url": "https://github.com/symfony/ClassLoader", + "reference": "v2.1.0-BETA3" + }, + "dist": { + "type": "zip", + "url": "https://github.com/symfony/ClassLoader/zipball/v2.1.0-BETA3", + "reference": "v2.1.0-BETA3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/finder": "2.1.*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "installation-source": "dist", "license": [ "MIT" @@ -95,35 +171,48 @@ "role": null } ], - "description": "Symfony DependencyInjection Component", + "description": "Symfony ClassLoader Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { - "Symfony\\Component\\DependencyInjection": "" + "Symfony\\Component\\ClassLoader": "" } } }, { - "name": "symfony/event-dispatcher", - "version": "v2.1.0-BETA1", - "version_normalized": "2.1.0.0-beta1", - "target-dir": "Symfony/Component/EventDispatcher", - "time": "2012-05-15 16:56:32", + "name": "symfony/dependency-injection", + "version": "v2.1.0-BETA3", + "version_normalized": "2.1.0.0-beta3", + "target-dir": "Symfony/Component/DependencyInjection", + "time": "2012-07-15 10:13:51", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher", - "reference": "v2.1.0-BETA1" + "url": "https://github.com/symfony/DependencyInjection", + "reference": "v2.1.0-BETA3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/EventDispatcher/zipball/v2.1.0-BETA1", - "reference": "v2.1.0-BETA1", + "url": "https://github.com/symfony/DependencyInjection/zipball/v2.1.0-BETA3", + "reference": "v2.1.0-BETA3", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/yaml": "2.1.*", + "symfony/config": "2.1.*" + }, + "suggest": { + "symfony/yaml": "v2.1.0-BETA3", + "symfony/config": "v2.1.0-BETA3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "installation-source": "dist", "license": [ "MIT" @@ -142,35 +231,40 @@ "role": null } ], - "description": "Symfony EventDispatcher Component", + "description": "Symfony DependencyInjection Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { - "Symfony\\Component\\EventDispatcher": "" + "Symfony\\Component\\DependencyInjection": "" } } }, { "name": "symfony/http-foundation", - "version": "v2.1.0-BETA1", - "version_normalized": "2.1.0.0-beta1", + "version": "v2.1.0-BETA3", + "version_normalized": "2.1.0.0-beta3", "target-dir": "Symfony/Component/HttpFoundation", - "time": "2012-06-12 06:10:53", + "time": "2012-07-15 10:13:51", "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation", - "reference": "v2.1.0-BETA1" + "reference": "v2.1.0-BETA3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpFoundation/zipball/v2.1.0-BETA1", - "reference": "v2.1.0-BETA1", + "url": "https://github.com/symfony/HttpFoundation/zipball/v2.1.0-BETA3", + "reference": "v2.1.0-BETA3", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "installation-source": "dist", "license": [ "MIT" @@ -193,41 +287,44 @@ "homepage": "http://symfony.com", "autoload": { "psr-0": { - "Symfony\\Component\\HttpFoundation": "" + "Symfony\\Component\\HttpFoundation": "", + "SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs" } } }, { - "name": "symfony/http-kernel", - "version": "v2.1.0-BETA1", - "version_normalized": "2.1.0.0-beta1", - "target-dir": "Symfony/Component/HttpKernel", - "time": "2012-06-12 11:59:42", + "name": "symfony/event-dispatcher", + "version": "v2.1.0-BETA3", + "version_normalized": "2.1.0.0-beta3", + "target-dir": "Symfony/Component/EventDispatcher", + "time": "2012-07-15 10:13:51", "source": { "type": "git", - "url": "https://github.com/symfony/HttpKernel", - "reference": "v2.1.0-BETA1" + "url": "https://github.com/symfony/EventDispatcher", + "reference": "v2.1.0-BETA3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpKernel/zipball/v2.1.0-BETA1", - "reference": "v2.1.0-BETA1", + "url": "https://github.com/symfony/EventDispatcher/zipball/v2.1.0-BETA3", + "reference": "v2.1.0-BETA3", "shasum": "" }, "require": { - "php": ">=5.3.2", - "symfony/event-dispatcher": "self.version", - "symfony/http-foundation": "self.version" + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/dependency-injection": "2.1.*" }, "suggest": { - "symfony/browser-kit": "v2.1.0-BETA1", - "symfony/class-loader": "v2.1.0-BETA1", - "symfony/config": "v2.1.0-BETA1", - "symfony/console": "v2.1.0-BETA1", - "symfony/dependency-injection": "v2.1.0-BETA1", - "symfony/finder": "v2.1.0-BETA1" + "symfony/dependency-injection": "v2.1.0-BETA3", + "symfony/http-kernel": "v2.1.0-BETA3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "installation-source": "dist", "license": [ "MIT" @@ -246,39 +343,60 @@ "role": null } ], - "description": "Symfony HttpKernel Component", + "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { - "Symfony\\Component\\HttpKernel": "" + "Symfony\\Component\\EventDispatcher": "" } } }, { - "name": "symfony/routing", - "version": "v2.1.0-BETA1", - "version_normalized": "2.1.0.0-beta1", - "target-dir": "Symfony/Component/Routing", - "time": "2012-06-12 11:59:42", + "name": "symfony/http-kernel", + "version": "v2.1.0-BETA3", + "version_normalized": "2.1.0.0-beta3", + "target-dir": "Symfony/Component/HttpKernel", + "time": "2012-07-15 18:05:02", "source": { "type": "git", - "url": "https://github.com/symfony/Routing", - "reference": "v2.1.0-BETA1" + "url": "https://github.com/symfony/HttpKernel", + "reference": "v2.1.0-BETA3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Routing/zipball/v2.1.0-BETA1", - "reference": "v2.1.0-BETA1", + "url": "https://github.com/symfony/HttpKernel/zipball/v2.1.0-BETA3", + "reference": "v2.1.0-BETA3", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.3.3", + "symfony/event-dispatcher": "2.1.*", + "symfony/http-foundation": "2.1.*" + }, + "require-dev": { + "symfony/browser-kit": "2.1.*", + "symfony/class-loader": "2.1.*", + "symfony/config": "2.1.*", + "symfony/console": "2.1.*", + "symfony/dependency-injection": "2.1.*", + "symfony/finder": "2.1.*", + "symfony/process": "2.1.*", + "symfony/routing": "2.1.*" }, "suggest": { - "symfony/config": "v2.1.0-BETA1", - "symfony/yaml": "v2.1.0-BETA1" + "symfony/browser-kit": "v2.1.0-BETA3", + "symfony/class-loader": "v2.1.0-BETA3", + "symfony/config": "v2.1.0-BETA3", + "symfony/console": "v2.1.0-BETA3", + "symfony/dependency-injection": "v2.1.0-BETA3", + "symfony/finder": "v2.1.0-BETA3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "installation-source": "dist", "license": [ "MIT" @@ -297,35 +415,51 @@ "role": null } ], - "description": "Symfony Routing Component", + "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { - "Symfony\\Component\\Routing": "" + "Symfony\\Component\\HttpKernel": "" } } }, { - "name": "symfony/yaml", - "version": "v2.1.0-BETA1", - "version_normalized": "2.1.0.0-beta1", - "target-dir": "Symfony/Component/Yaml", - "time": "2012-06-09 15:04:17", + "name": "symfony/routing", + "version": "v2.1.0-BETA3", + "version_normalized": "2.1.0.0-beta3", + "target-dir": "Symfony/Component/Routing", + "time": "2012-07-15 10:13:51", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml", - "reference": "v2.1.0-BETA1" + "url": "https://github.com/symfony/Routing", + "reference": "v2.1.0-BETA3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Yaml/zipball/v2.1.0-BETA1", - "reference": "v2.1.0-BETA1", + "url": "https://github.com/symfony/Routing/zipball/v2.1.0-BETA3", + "reference": "v2.1.0-BETA3", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/config": "2.1.*", + "symfony/yaml": "2.1.*", + "symfony/http-kernel": "2.1.*", + "doctrine/common": ">=2.2,<2.4-dev" + }, + "suggest": { + "symfony/config": "v2.1.0-BETA3", + "symfony/yaml": "v2.1.0-BETA3", + "doctrine/common": ">=2.2,<2.4-dev" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "installation-source": "dist", "license": [ "MIT" @@ -344,35 +478,40 @@ "role": null } ], - "description": "Symfony Yaml Component", + "description": "Symfony Routing Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { - "Symfony\\Component\\Yaml": "" + "Symfony\\Component\\Routing": "" } } }, { - "name": "symfony/class-loader", - "version": "v2.1.0-BETA1", - "version_normalized": "2.1.0.0-beta1", - "target-dir": "Symfony/Component/ClassLoader", - "time": "2012-04-23 05:37:21", + "name": "symfony/yaml", + "version": "v2.1.0-BETA3", + "version_normalized": "2.1.0.0-beta3", + "target-dir": "Symfony/Component/Yaml", + "time": "2012-07-15 10:13:51", "source": { "type": "git", - "url": "https://github.com/symfony/ClassLoader", - "reference": "v2.1.0-BETA1" + "url": "https://github.com/symfony/Yaml", + "reference": "v2.1.0-BETA3" }, "dist": { "type": "zip", - "url": "https://github.com/symfony/ClassLoader/zipball/v2.1.0-BETA1", - "reference": "v2.1.0-BETA1", + "url": "https://github.com/symfony/Yaml/zipball/v2.1.0-BETA3", + "reference": "v2.1.0-BETA3", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "installation-source": "dist", "license": [ "MIT" @@ -391,11 +530,11 @@ "role": null } ], - "description": "Symfony ClassLoader Component", + "description": "Symfony Yaml Component", "homepage": "http://symfony.com", "autoload": { "psr-0": { - "Symfony\\Component\\ClassLoader": "" + "Symfony\\Component\\Yaml": "" } } } diff -u b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php --- b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -18,8 +18,8 @@ */ class ClassCollectionLoader { - static private $loaded; - static private $seen; + private static $loaded; + private static $seen; /** * Loads a list of classes and caches them in one big file. @@ -33,7 +33,7 @@ * * @throws \InvalidArgumentException When class can't be loaded */ - static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') + public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') { // each $name can only be loaded once per PHP process if (isset(self::$loaded[$name])) { @@ -133,7 +133,7 @@ * * @return string Namespaces with brackets */ - static public function fixNamespaceDeclarations($source) + public static function fixNamespaceDeclarations($source) { if (!function_exists('token_get_all')) { return $source; @@ -188,7 +188,7 @@ * * @throws \RuntimeException when a cache file cannot be written */ - static private function writeCacheFile($file, $content) + private static function writeCacheFile($file, $content) { $tmpFile = tempnam(dirname($file), basename($file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { @@ -210,7 +210,7 @@ * * @return string The PHP string with the comments removed */ - static private function stripComments($source) + private static function stripComments($source) { if (!function_exists('token_get_all')) { return $source; @@ -240,7 +240,7 @@ * * @throws \InvalidArgumentException When a class can't be loaded */ - static private function getOrderedClasses(array $classes) + private static function getOrderedClasses(array $classes) { $map = array(); self::$seen = array(); @@ -257,7 +257,7 @@ return $map; } - static private function getClassHierarchy(\ReflectionClass $class) + private static function getClassHierarchy(\ReflectionClass $class) { if (isset(self::$seen[$class->getName()])) { return array(); @@ -283,18 +283,27 @@ } } + return array_merge(self::getInterfaces($class), $classes); + } + + private static function getInterfaces(\ReflectionClass $class) + { + $classes = array(); + foreach ($class->getInterfaces() as $interface) { - if ($interface->isUserDefined() && !isset(self::$seen[$interface->getName()])) { - self::$seen[$interface->getName()] = true; + $classes = array_merge($classes, self::getInterfaces($interface)); + } - array_unshift($classes, $interface); - } + if ($class->isUserDefined() && $class->isInterface() && !isset(self::$seen[$class->getName()])) { + self::$seen[$class->getName()] = true; + + $classes[] = $class; } return $classes; } - static private function getTraits(\ReflectionClass $class) + private static function getTraits(\ReflectionClass $class) { $traits = $class->getTraits(); $classes = array(); diff -u b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php --- b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php +++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php @@ -13,6 +13,7 @@ use Symfony\Component\ClassLoader\ClassCollectionLoader; +require_once __DIR__.'/Fixtures/ClassesWithParents/GInterface.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/CInterface.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/B.php'; require_once __DIR__.'/Fixtures/ClassesWithParents/A.php'; @@ -25,6 +26,7 @@ public function testClassReordering(array $classes) { $expected = array( + 'ClassesWithParents\\GInterface', 'ClassesWithParents\\CInterface', 'ClassesWithParents\\B', 'ClassesWithParents\\A', @@ -45,6 +47,7 @@ array(array( 'ClassesWithParents\\A', 'ClassesWithParents\\CInterface', + 'ClassesWithParents\\GInterface', 'ClassesWithParents\\B', )), array(array( @@ -81,6 +84,7 @@ require_once __DIR__.'/Fixtures/ClassesWithParents/E.php'; $expected = array( + 'ClassesWithParents\\GInterface', 'ClassesWithParents\\CInterface', 'ClassesWithParents\\CTrait', 'ClassesWithParents\\ATrait', diff -u b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/CInterface.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/CInterface.php --- b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/CInterface.php +++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/CInterface.php @@ -5 +5,3 @@ -interface CInterface {} +interface CInterface extends GInterface +{ +} diff -u b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php --- b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php @@ -448,7 +448,7 @@ * * @return string The camelized string */ - static public function camelize($id) + public static function camelize($id) { return preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); }, $id); } @@ -460,7 +460,7 @@ * * @return string The underscored string */ - static public function underscore($id) + public static function underscore($id) { return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.'))); } diff -u b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php --- b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -854,7 +854,7 @@ * * @return array An array of Service conditionals */ - static public function getServiceConditionals($value) + public static function getServiceConditionals($value) { $services = array(); diff -u b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php --- b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -448,7 +448,7 @@ * * @return array A PHP array */ - static public function convertDomElementToArray(\DomElement $element) + public static function convertDomElementToArray(\DomElement $element) { $empty = true; $config = array(); diff -u b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php --- b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBagInterface.php @@ -27,7 +27,7 @@ * * @api */ - function clear(); + public function clear(); /** * Adds parameters to the service container parameters. @@ -36,7 +36,7 @@ * * @api */ - function add(array $parameters); + public function add(array $parameters); /** * Gets the service container parameters. @@ -45,7 +45,7 @@ * * @api */ - function all(); + public function all(); /** * Gets a service container parameter. @@ -58,7 +58,7 @@ * * @api */ - function get($name); + public function get($name); /** * Sets a service container parameter. @@ -68,7 +68,7 @@ * * @api */ - function set($name, $value); + public function set($name, $value); /** * Returns true if a parameter name is defined. @@ -79,12 +79,12 @@ * * @api */ - function has($name); + public function has($name); /** * Replaces parameter placeholders (%name%) by their values for all parameters. */ - function resolve(); + public function resolve(); /** * Replaces parameter placeholders (%name%) by their values. @@ -93,7 +93,7 @@ * * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist */ - function resolveValue($value); + public function resolveValue($value); /** * Escape parameter placeholders % @@ -102,7 +102,7 @@ * * @return mixed */ - function escapeValue($value); + public function escapeValue($value); /** * Unescape parameter placeholders % @@ -113,3 +113,3 @@ */ - function unescapeValue($value); + public function unescapeValue($value); } diff -u b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php --- b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php @@ -552,3 +552,2 @@ - class FooClass {} diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -22,7 +22,8 @@ * [BC BREAK] Moved all session related classes and interfaces into own namespace, as `Symfony\Component\HttpFoundation\Session` and renamed classes accordingly. Session handlers are located in the subnamespace `Symfony\Component\HttpFoundation\Session\Handler`. - * SessionHandlers must implement `\SessionHandlerInterface`. + * SessionHandlers must implement `\SessionHandlerInterface` or extend from the + `Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class. * Added internal storage driver proxy mechanism for forward compatibility with PHP 5.4 `\SessionHandler` class. * Added session handlers for custom Memcache, Memcached and Null session save handlers. @@ -53,8 +54,8 @@ * Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This implementation is ESI compatible. * Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire - behaviour of messages auto expiring. - after one page page load. Messages must be retrieved by `get()` or `all()`. + behaviour of messages auto expiring after one page page load. Messages must + be retrieved by `get()` or `all()`. * Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate attributes storage behaviour from 2.0.x (default). * Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php @@ -33,7 +33,7 @@ * * @var ExtensionGuesser */ - static private $instance = null; + private static $instance = null; /** * All registered ExtensionGuesserInterface instances @@ -47,7 +47,7 @@ * * @return ExtensionGuesser */ - static public function getInstance() + public static function getInstance() { if (null === self::$instance) { self::$instance = new self(); diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php @@ -24,3 +24,3 @@ */ - function guess($mimeType); + public function guess($mimeType); } diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php @@ -43,7 +43,7 @@ * * @return Boolean */ - static public function isSupported() + public static function isSupported() { return !defined('PHP_WINDOWS_VERSION_BUILD'); } diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -26,7 +26,7 @@ * * @return Boolean */ - static public function isSupported() + public static function isSupported() { return function_exists('finfo_open'); } diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\File\Mimetype; +namespace Symfony\Component\HttpFoundation\File\MimeType; /** * Provides a best-guess mapping of mime type to file extension. @@ -542,6 +542,7 @@ 'application/x-pkcs7-certificates' => 'p7b', 'application/x-pkcs7-certreqresp' => 'p7r', 'application/x-rar-compressed' => 'rar', + 'application/x-rar' => 'rar', 'application/x-sh' => 'sh', 'application/x-shar' => 'shar', 'application/x-shockwave-flash' => 'swf', diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php @@ -38,7 +38,7 @@ * * @var MimeTypeGuesser */ - static private $instance = null; + private static $instance = null; /** * All registered MimeTypeGuesserInterface instances @@ -52,7 +52,7 @@ * * @return MimeTypeGuesser */ - static public function getInstance() + public static function getInstance() { if (null === self::$instance) { self::$instance = new self(); diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php @@ -33,3 +33,3 @@ */ - function guess($path); + public function guess($path); } diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -201,7 +201,7 @@ * * @return int The maximum size of an uploaded file in bytes */ - static public function getMaxFilesize() + public static function getMaxFilesize() { $max = trim(ini_get('upload_max_filesize')); diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php @@ -23,7 +23,7 @@ */ class FileBag extends ParameterBag { - static private $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); /** * Constructor. diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php @@ -30,7 +30,7 @@ */ class Request { - static protected $trustProxy = false; + protected static $trustProxy = false; /** * @var \Symfony\Component\HttpFoundation\ParameterBag @@ -149,7 +149,7 @@ /** * @var array */ - static protected $formats; + protected static $formats; /** * Constructor. @@ -213,7 +213,7 @@ * * @api */ - static public function createFromGlobals() + public static function createFromGlobals() { $request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER); @@ -242,7 +242,7 @@ * * @api */ - static public function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) + public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) { $defaults = array( 'SERVER_NAME' => 'localhost', @@ -444,7 +444,7 @@ * * @api */ - static public function trustProxyData() + public static function trustProxyData() { self::$trustProxy = true; } @@ -455,7 +455,7 @@ * * @return boolean */ - static public function isProxyTrusted() + public static function isProxyTrusted() { return self::$trustProxy; } @@ -470,7 +470,7 @@ * * @return string A normalized query string for the Request */ - static public function normalizeQueryString($qs) + public static function normalizeQueryString($qs) { if ('' == $qs) { return ''; @@ -848,6 +848,7 @@ public function getQueryString() { $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); + return '' === $qs ? null : $qs; } @@ -924,7 +925,7 @@ if (null === $this->method) { $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); if ('POST' === $this->method) { - $this->method = strtoupper($this->headers->get('X-HTTP-METHOD-OVERRIDE', $this->request->get('_method', 'POST'))); + $this->method = strtoupper($this->headers->get('X-HTTP-METHOD-OVERRIDE', $this->request->get('_method', $this->query->get('_method', 'POST')))); } } @@ -1454,7 +1455,7 @@ /** * Initializes HTTP request formats. */ - static protected function initializeFormats() + protected static function initializeFormats() { static::$formats = array( 'html' => array('text/html', 'application/xhtml+xml'), diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php @@ -61,7 +61,7 @@ * * @var array */ - static public $statusTexts = array( + public static $statusTexts = array( 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', // RFC2518 @@ -158,7 +158,7 @@ * * @return Response */ - static public function create($content = '', $status = 200, $headers = array()) + public static function create($content = '', $status = 200, $headers = array()) { return new static($content, $status, $headers); } @@ -299,6 +299,15 @@ if (function_exists('fastcgi_finish_request')) { fastcgi_finish_request(); + } elseif ('cli' !== PHP_SAPI) { + // ob_get_level() never returns 0 on some Windows configurations, so if + // the level is the same two times in a row, the loop should be stopped. + $previous = null; + while (($level = ob_get_level()) > 0 && $level !== $previous) { + $previous = $level; + ob_end_flush(); + } + flush(); } return $this; diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionInterface.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionInterface.php @@ -29,7 +29,7 @@ * * @api */ - function start(); + public function start(); /** * Returns the session ID. @@ -38,7 +38,7 @@ * * @api */ - function getId(); + public function getId(); /** * Sets the session ID @@ -47,7 +47,7 @@ * * @api */ - function setId($id); + public function setId($id); /** * Returns the session name. @@ -56,7 +56,7 @@ * * @api */ - function getName(); + public function getName(); /** * Sets the session name. @@ -65,7 +65,7 @@ * * @api */ - function setName($name); + public function setName($name); /** * Invalidates the current session. @@ -82,7 +82,7 @@ * * @api */ - function invalidate($lifetime = null); + public function invalidate($lifetime = null); /** * Migrates the current session to a new session id while maintaining all @@ -98,7 +98,7 @@ * * @api */ - function migrate($destroy = false, $lifetime = null); + public function migrate($destroy = false, $lifetime = null); /** * Force the session to be saved and closed. @@ -107,7 +107,7 @@ * the session will be automatically saved at the end of * code execution. */ - function save(); + public function save(); /** * Checks if an attribute is defined. @@ -118,7 +118,7 @@ * * @api */ - function has($name); + public function has($name); /** * Returns an attribute. @@ -130,7 +130,7 @@ * * @api */ - function get($name, $default = null); + public function get($name, $default = null); /** * Sets an attribute. @@ -140,7 +140,7 @@ * * @api */ - function set($name, $value); + public function set($name, $value); /** * Returns attributes. @@ -149,14 +149,14 @@ * * @api */ - function all(); + public function all(); /** * Sets attributes. * * @param array $attributes Attributes */ - function replace(array $attributes); + public function replace(array $attributes); /** * Removes an attribute. @@ -167,28 +167,28 @@ * * @api */ - function remove($name); + public function remove($name); /** * Clears all attributes. * * @api */ - function clear(); + public function clear(); /** * Checks if the session was started. * * @return Boolean */ - function isStarted(); + public function isStarted(); /** * Registers a SessionBagInterface with the session. * * @param SessionBagInterface $bag */ - function registerBag(SessionBagInterface $bag); + public function registerBag(SessionBagInterface $bag); /** * Gets a bag instance by name. @@ -199,10 +199,10 @@ */ - function getBag($name); + public function getBag($name); /** * Gets session meta. * * @return MetadataBag */ - function getMetadataBag(); + public function getMetadataBag(); } diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/FileSessionHandler.php /dev/null --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/FileSessionHandler.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * FileSessionHandler. - * - * @author Drak - */ -class FileSessionHandler implements \SessionHandlerInterface -{ - /** - * @var string - */ - private $savePath; - - /** - * @var string - */ - private $prefix; - - /** - * Constructor. - * - * @param string $savePath Path of directory to save session files. - * @param string $prefix - */ - public function __construct($savePath = null, $prefix = 'sess_') - { - if (null === $savePath) { - $savePath = sys_get_temp_dir(); - } - - $this->savePath = $savePath; - if (false === is_dir($this->savePath)) { - mkdir($this->savePath, 0777, true); - } - - $this->prefix = $prefix; - } - - /** - * {@inheritdoc} - */ - public function open($savePath, $sessionName) - { - return true; - } - - /** - * {@inheritdoc} - */ - public function close() - { - return true; - } - - /** - * {@inheritdoc} - */ - public function read($id) - { - $file = $this->getPath().$id; - - return is_readable($file) ? file_get_contents($file) : ''; - } - - /** - * {@inheritdoc} - */ - public function write($id, $data) - { - return false === file_put_contents($this->getPath().$id, $data) ? false : true; - } - - /** - * {@inheritdoc} - */ - public function destroy($id) - { - $file = $this->getPath().$id; - if (is_file($file)) { - unlink($file); - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function gc($maxlifetime) - { - foreach (glob($this->getPath().'*') as $file) { - if ((filemtime($file) + $maxlifetime) < time()) { - unlink($file); - } - } - - return true; - } - - private function getPath() - { - return $this->savePath.'/'.$this->prefix; - } -} diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php @@ -33,14 +33,14 @@ * * @api */ - function start(); + public function start(); /** * Checks if the session is started. * * @return boolean True if started, false otherwise. */ - function isStarted(); + public function isStarted(); /** * Returns the session ID @@ -49,7 +49,7 @@ * * @api */ - function getId(); + public function getId(); /** * Sets the session ID @@ -58,7 +58,7 @@ * * @api */ - function setId($id); + public function setId($id); /** * Returns the session name @@ -67,7 +67,7 @@ * * @api */ - function getName(); + public function getName(); /** * Sets the session name @@ -76,7 +76,7 @@ * * @api */ - function setName($name); + public function setName($name); /** * Regenerates id that represents this storage. @@ -101,7 +101,7 @@ * * @api */ - function regenerate($destroy = false, $lifetime = null); + public function regenerate($destroy = false, $lifetime = null); /** * Force the session to be saved and closed. @@ -111,12 +111,12 @@ * a real PHP session would interfere with testing, in which case it * it should actually persist the session data if required. */ - function save(); + public function save(); /** * Clear all session data in memory. */ - function clear(); + public function clear(); /** * Gets a SessionBagInterface by name. @@ -129,15 +129,15 @@ */ - function getBag($name); + public function getBag($name); /** * Registers a SessionBagInterface for use. * * @param SessionBagInterface $bag */ - function registerBag(SessionBagInterface $bag); + public function registerBag(SessionBagInterface $bag); /** * @return MetadataBag */ - function getMetadataBag(); + public function getMetadataBag(); } diff -u b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php --- b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpFoundation\Tests; - use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Request; @@ -622,6 +621,11 @@ $this->assertEquals('PURGE', $request->getMethod(), '->getMethod() returns the method from _method if defined and POST'); $request->setMethod('POST'); + $request->request->remove('_method'); + $request->query->set('_method', 'purge'); + $this->assertEquals('PURGE', $request->getMethod(), '->getMethod() returns the method from _method if defined and POST'); + + $request->setMethod('POST'); $request->headers->set('X-HTTP-METHOD-OVERRIDE', 'delete'); $this->assertEquals('DELETE', $request->getMethod(), '->getMethod() returns the method from X-HTTP-Method-Override even though _method is set if defined and POST'); diff -u b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php --- b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php @@ -39,7 +39,7 @@ * * @return The registered error handler */ - static public function register($level = null) + public static function register($level = null) { $handler = new static(); $handler->setLevel($level); diff -u b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/LocaleListener.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/LocaleListener.php --- b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -47,7 +47,7 @@ } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( // must be registered after the Router to have access to the _locale diff -u b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php --- b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -12,7 +12,6 @@ namespace Symfony\Component\HttpKernel\EventListener; use Symfony\Component\HttpKernel\Log\LoggerInterface; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; @@ -108,7 +107,7 @@ return implode(', ', $pieces); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::REQUEST => array(array('onKernelRequest', 32)), diff -u b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php --- b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php @@ -58,7 +58,7 @@ protected $classes; protected $errorReportingLevel; - const VERSION = '2.1.0-BETA2'; + const VERSION = '2.1.0-BETA3'; const VERSION_ID = '20100'; const MAJOR_VERSION = '2'; const MINOR_VERSION = '1'; @@ -79,7 +79,7 @@ $this->debug = (Boolean) $debug; $this->booted = false; $this->rootDir = $this->getRootDir(); - $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir)); + $this->name = $this->getName(); $this->classes = array(); if ($this->debug) { @@ -354,6 +354,10 @@ */ public function getName() { + if (null === $this->name) { + $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir)); + } + return $this->name; } @@ -748,7 +752,7 @@ * * @return string The PHP string with the comments removed */ - static public function stripComments($source) + public static function stripComments($source) { if (!function_exists('token_get_all')) { return $source; diff -u b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php --- b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php @@ -34,7 +34,7 @@ * * @api */ - function registerBundles(); + public function registerBundles(); /** * Loads the container configuration @@ -43,14 +43,14 @@ * * @api */ - function registerContainerConfiguration(LoaderInterface $loader); + public function registerContainerConfiguration(LoaderInterface $loader); /** * Boots the current kernel. * * @api */ - function boot(); + public function boot(); /** * Shutdowns the kernel. @@ -59,7 +59,7 @@ * * @api */ - function shutdown(); + public function shutdown(); /** * Gets the registered bundle instances. @@ -68,7 +68,7 @@ * * @api */ - function getBundles(); + public function getBundles(); /** * Checks if a given class name belongs to an active bundle. @@ -79,7 +79,7 @@ * * @api */ - function isClassInActiveBundle($class); + public function isClassInActiveBundle($class); /** * Returns a bundle and optionally its descendants by its name. @@ -93,7 +93,7 @@ * * @api */ - function getBundle($name, $first = true); + public function getBundle($name, $first = true); /** * Returns the file path for a given resource. @@ -123,7 +123,7 @@ * * @api */ - function locateResource($name, $dir = null, $first = true); + public function locateResource($name, $dir = null, $first = true); /** * Gets the name of the kernel @@ -132,7 +132,7 @@ * * @api */ - function getName(); + public function getName(); /** * Gets the environment. @@ -141,7 +141,7 @@ * * @api */ - function getEnvironment(); + public function getEnvironment(); /** * Checks if debug mode is enabled. @@ -150,7 +150,7 @@ * * @api */ - function isDebug(); + public function isDebug(); /** * Gets the application root dir. @@ -159,7 +159,7 @@ * * @api */ - function getRootDir(); + public function getRootDir(); /** * Gets the current container. @@ -168,7 +168,7 @@ * * @api */ - function getContainer(); + public function getContainer(); /** * Gets the request start time (not available if debug is disabled). @@ -177,7 +177,7 @@ * * @api */ - function getStartTime(); + public function getStartTime(); /** * Gets the cache directory. @@ -186,7 +186,7 @@ * * @api */ - function getCacheDir(); + public function getCacheDir(); /** * Gets the log directory. @@ -195,7 +195,7 @@ * * @api */ - function getLogDir(); + public function getLogDir(); /** * Gets the charset of the application. @@ -206,3 +206,3 @@ */ - function getCharset(); + public function getCharset(); } diff -u b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php --- b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -17,6 +17,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest; +use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForOverrideName; use Symfony\Component\HttpKernel\Tests\Fixtures\FooBarBundle; class KernelTest extends \PHPUnit_Framework_TestCase @@ -310,6 +311,13 @@ $this->assertEquals('Fixtures', $kernel->getName()); } + public function testOverrideGetName() + { + $kernel = new KernelForOverrideName('test', true); + + $this->assertEquals('overridden', $kernel->getName()); + } + public function testSerialize() { $env = 'test_env'; diff -u b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php --- b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php @@ -62,7 +62,7 @@ public function testMultiRowIndexFile() { $iteration = 3; - for($i = 0; $i < $iteration; $i++) { + for ($i = 0; $i < $iteration; $i++) { $profile = new Profile('token' . $i); $profile->setIp('127.0.0.' . $i); $profile->setUrl('http://foo.bar/' . $i); @@ -74,7 +74,7 @@ } $handle = fopen(self::$tmpDir . '/index.csv', 'r'); - for($i = 0; $i < $iteration; $i++) { + for ($i = 0; $i < $iteration; $i++) { $row = fgetcsv($handle); $this->assertEquals('token' . $i, $row[0]); $this->assertEquals('127.0.0.' . $i, $row[1]); diff -u b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php --- b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php @@ -37,3 +37,3 @@ */ - function matchRequest(Request $request); + public function matchRequest(Request $request); } diff -u b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php --- b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -166,10 +166,10 @@ /** * Get merged default parameters. - * + * * @param array $params The parameters * @param array $defaults The defaults - * + * * @return array Merged default parameters */ protected function mergeDefaults($params, $defaults) diff -u b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php --- b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php @@ -41,3 +41,3 @@ */ - function match($pathinfo); + public function match($pathinfo); } diff -u b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml --- b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml +++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/embededPhp.yml @@ -1 +1 @@ -value: \ No newline at end of file +value: only in patch2: unchanged: --- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassMapGenerator.php +++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassMapGenerator.php @@ -24,7 +24,7 @@ class ClassMapGenerator * @param array|string $dirs Directories or a single path to search in * @param string $file The name of the class map file */ - static public function dump($dirs, $file) + public static function dump($dirs, $file) { $dirs = (array) $dirs; $maps = array(); @@ -43,7 +43,7 @@ class ClassMapGenerator * * @return array A class map array */ - static public function createMap($dir) + public static function createMap($dir) { if (is_string($dir)) { $dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir)); @@ -80,7 +80,7 @@ class ClassMapGenerator * * @return array The found classes */ - static private function findClasses($path) + private static function findClasses($path) { $contents = file_get_contents($path); $tokens = token_get_all($contents); only in patch2: unchanged: --- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/DebugClassLoader.php +++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/DebugClassLoader.php @@ -42,7 +42,7 @@ class DebugClassLoader /** * Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper. */ - static public function enable() + public static function enable() { if (!is_array($functions = spl_autoload_functions())) { return; only in patch2: unchanged: --- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php +++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php @@ -21,7 +21,7 @@ class DebugUniversalClassLoader extends UniversalClassLoader /** * Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones. */ - static public function enable() + public static function enable() { if (!is_array($functions = spl_autoload_functions())) { return; only in patch2: unchanged: --- /dev/null +++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/ClassesWithParents/GInterface.php @@ -0,0 +1,7 @@ +=5.3.3" }, only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/CompilerPassInterface.php @@ -29,5 +29,5 @@ interface CompilerPassInterface * * @api */ - function process(ContainerBuilder $container); + public function process(ContainerBuilder $container); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php @@ -11,7 +11,6 @@ namespace Symfony\Component\DependencyInjection\Compiler; - /** * Used to format logging messages during the compilation. * only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/RepeatablePassInterface.php @@ -24,5 +24,5 @@ interface RepeatablePassInterface extends CompilerPassInterface * * @param RepeatedPass $repeatedPass */ - function setRepeatedPass(RepeatedPass $repeatedPass); + public function setRepeatedPass(RepeatedPass $repeatedPass); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerAwareInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerAwareInterface.php @@ -27,5 +27,5 @@ interface ContainerAwareInterface * * @api */ - function setContainer(ContainerInterface $container = null); + public function setContainer(ContainerInterface $container = null); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerInterface.php @@ -38,7 +38,7 @@ interface ContainerInterface * * @api */ - function set($id, $service, $scope = self::SCOPE_CONTAINER); + public function set($id, $service, $scope = self::SCOPE_CONTAINER); /** * Gets a service. @@ -54,7 +54,7 @@ interface ContainerInterface * * @api */ - function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); + public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE); /** * Returns true if the given service is defined. @@ -65,7 +65,7 @@ interface ContainerInterface * * @api */ - function has($id); + public function has($id); /** * Gets a parameter. @@ -78,7 +78,7 @@ interface ContainerInterface * * @api */ - function getParameter($name); + public function getParameter($name); /** * Checks if a parameter exists. @@ -89,7 +89,7 @@ interface ContainerInterface * * @api */ - function hasParameter($name); + public function hasParameter($name); /** * Sets a parameter. @@ -99,7 +99,7 @@ interface ContainerInterface * * @api */ - function setParameter($name, $value); + public function setParameter($name, $value); /** * Enters the given scope @@ -108,7 +108,7 @@ interface ContainerInterface * * @api */ - function enterScope($name); + public function enterScope($name); /** * Leaves the current scope, and re-enters the parent scope @@ -117,7 +117,7 @@ interface ContainerInterface * * @api */ - function leaveScope($name); + public function leaveScope($name); /** * Adds a scope to the container @@ -126,7 +126,7 @@ interface ContainerInterface * * @api */ - function addScope(ScopeInterface $scope); + public function addScope(ScopeInterface $scope); /** * Whether this container has the given scope @@ -137,7 +137,7 @@ interface ContainerInterface * * @api */ - function hasScope($name); + public function hasScope($name); /** * Determines whether the given scope is currently active. @@ -150,5 +150,5 @@ interface ContainerInterface * * @api */ - function isScopeActive($name); + public function isScopeActive($name); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/DumperInterface.php @@ -29,5 +29,5 @@ interface DumperInterface * * @api */ - function dump(array $options = array()); + public function dump(array $options = array()); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php @@ -281,7 +281,7 @@ class XmlDumper extends Dumper * * @param mixed $value Value to convert */ - static public function phpToXml($value) + public static function phpToXml($value) { switch (true) { case null === $value: only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Extension/ConfigurationExtensionInterface.php @@ -28,5 +28,5 @@ interface ConfigurationExtensionInterface * * @return ConfigurationInterface|null The configuration or null */ - function getConfiguration(array $config, ContainerBuilder $container); + public function getConfiguration(array $config, ContainerBuilder $container); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.php @@ -32,7 +32,7 @@ interface ExtensionInterface * * @api */ - function load(array $config, ContainerBuilder $container); + public function load(array $config, ContainerBuilder $container); /** * Returns the namespace to be used for this extension (XML namespace). @@ -41,7 +41,7 @@ interface ExtensionInterface * * @api */ - function getNamespace(); + public function getNamespace(); /** * Returns the base path for the XSD files. @@ -50,7 +50,7 @@ interface ExtensionInterface * * @api */ - function getXsdValidationBasePath(); + public function getXsdValidationBasePath(); /** * Returns the recommended alias to use in XML. @@ -61,5 +61,5 @@ interface ExtensionInterface * * @api */ - function getAlias(); + public function getAlias(); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php @@ -28,6 +28,6 @@ interface IntrospectableContainerInterface extends ContainerInterface * @return Boolean true if the service has been initialized, false otherwise * */ - function initialized($id); + public function initialized($id); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ScopeInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ScopeInterface.php @@ -23,10 +23,10 @@ interface ScopeInterface /** * @api */ - function getName(); + public function getName(); /** * @api */ - function getParentName(); + public function getParentName(); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/SimpleXMLElement.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/SimpleXMLElement.php @@ -99,7 +99,7 @@ class SimpleXMLElement extends \SimpleXMLElement * * @return mixed */ - static public function phpize($value) + public static function phpize($value) { $value = (string) $value; $lowercaseValue = strtolower($value); only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/TaggedContainerInterface.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/TaggedContainerInterface.php @@ -29,5 +29,5 @@ interface TaggedContainerInterface extends ContainerInterface * * @api */ - function findTaggedServiceIds($name); + public function findTaggedServiceIds($name); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/CrossCheckTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Config\FileLocator; class CrossCheckTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class CrossCheckTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = __DIR__.'/Fixtures/'; only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php @@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Dumper\GraphvizDumper; class GraphvizDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class GraphvizDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = __DIR__.'/../Fixtures/'; } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php @@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\Definition; class PhpDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -28,7 +28,7 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php @@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Dumper\XmlDumper; class XmlDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class XmlDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php @@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\Dumper\YamlDumper; class YamlDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -25,7 +25,7 @@ class YamlDumperTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/classes.php @@ -16,17 +16,17 @@ class BazClass $instance->configure(); } - static public function getInstance() + public static function getInstance() { return new self(); } - static public function configureStatic($instance) + public static function configureStatic($instance) { $instance->configure(); } - static public function configureStatic1() + public static function configureStatic1() { } } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/foo.php @@ -11,7 +11,7 @@ class FooClass $this->arguments = $arguments; } - static public function getInstance($arguments = array()) + public static function getInstance($arguments = array()) { $obj = new self($arguments); $obj->called = true; only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php @@ -17,12 +17,12 @@ use Symfony\Component\Config\FileLocator; class IniFileLoaderTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected $container; protected $loader; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); } only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php @@ -25,7 +25,7 @@ use Symfony\Component\Config\FileLocator; class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -34,7 +34,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); require_once self::$fixturesPath.'/includes/foo.php'; only in patch2: unchanged: --- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php +++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php @@ -23,7 +23,7 @@ use Symfony\Component\Config\FileLocator; class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; protected function setUp() { @@ -36,7 +36,7 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase } } - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../Fixtures/'); require_once self::$fixturesPath.'/includes/foo.php'; only in patch2: unchanged: --- a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php +++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php @@ -21,12 +21,12 @@ interface TraceableEventDispatcherInterface * * @return array An array of called listeners */ - function getCalledListeners(); + public function getCalledListeners(); /** * Gets the not called listeners. * * @return array An array of not called listeners */ - function getNotCalledListeners(); + public function getNotCalledListeners(); } only in patch2: unchanged: --- a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php @@ -35,7 +35,7 @@ interface EventDispatcherInterface * * @api */ - function dispatch($eventName, Event $event = null); + public function dispatch($eventName, Event $event = null); /** * Adds an event listener that listens on the specified events. @@ -47,7 +47,7 @@ interface EventDispatcherInterface * * @api */ - function addListener($eventName, $listener, $priority = 0); + public function addListener($eventName, $listener, $priority = 0); /** * Adds an event subscriber. @@ -59,7 +59,7 @@ interface EventDispatcherInterface * * @api */ - function addSubscriber(EventSubscriberInterface $subscriber); + public function addSubscriber(EventSubscriberInterface $subscriber); /** * Removes an event listener from the specified events. @@ -67,14 +67,14 @@ interface EventDispatcherInterface * @param string|array $eventName The event(s) to remove a listener from * @param callable $listener The listener to remove */ - function removeListener($eventName, $listener); + public function removeListener($eventName, $listener); /** * Removes an event subscriber. * * @param EventSubscriberInterface $subscriber The subscriber */ - function removeSubscriber(EventSubscriberInterface $subscriber); + public function removeSubscriber(EventSubscriberInterface $subscriber); /** * Gets the listeners of a specific event or all listeners. @@ -83,7 +83,7 @@ interface EventDispatcherInterface * * @return array The event listeners for the specified event, or all event listeners by event name */ - function getListeners($eventName = null); + public function getListeners($eventName = null); /** * Checks whether an event has any registered listeners. @@ -92,5 +92,5 @@ interface EventDispatcherInterface * * @return Boolean true if the specified event has any listeners, false otherwise */ - function hasListeners($eventName = null); + public function hasListeners($eventName = null); } only in patch2: unchanged: --- a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php +++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php @@ -46,5 +46,5 @@ interface EventSubscriberInterface * * @api */ - static function getSubscribedEvents(); + public static function getSubscribedEvents(); } only in patch2: unchanged: --- a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php +++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php @@ -235,14 +235,14 @@ class ContainerAwareEventDispatcherTest extends \PHPUnit_Framework_TestCase class Service { - function onEvent(Event $e) + public function onEvent(Event $e) { } } class SubscriberService implements EventSubscriberInterface { - static function getSubscribedEvents() + public static function getSubscribedEvents() { return array( 'onEvent' => 'onEvent', @@ -251,7 +251,7 @@ class SubscriberService implements EventSubscriberInterface ); } - function onEvent(Event $e) + public function onEvent(Event $e) { } } only in patch2: unchanged: --- a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php +++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php @@ -29,7 +29,6 @@ class EventTest extends \PHPUnit_Framework_TestCase */ protected $dispatcher; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php @@ -38,7 +38,7 @@ class JsonResponse extends Response /** * {@inheritDoc} */ - static public function create($data = array(), $status = 200, $headers = array()) + public static function create($data = array(), $status = 200, $headers = array()) { return new static($data, $status, $headers); } @@ -52,7 +52,7 @@ class JsonResponse extends Response */ public function setCallback($callback = null) { - if ($callback) { + if (null !== $callback) { // taken from http://www.geekality.net/2011/08/03/valid-javascript-identifier/ $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*+$/u'; $parts = explode('.', $callback); @@ -95,7 +95,7 @@ class JsonResponse extends Response */ protected function update() { - if ($this->callback) { + if (null !== $this->callback) { // Not using application/javascript for compatibility reasons with older browsers. $this->headers->set('Content-Type', 'text/javascript', true); only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php @@ -66,7 +66,7 @@ class RedirectResponse extends Response /** * {@inheritDoc} */ - static public function create($url = '', $status = 302, $headers = array()) + public static function create($url = '', $status = 302, $headers = array()) { return new static($url, $status, $headers); } only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php @@ -29,5 +29,5 @@ interface RequestMatcherInterface * * @api */ - function matches(Request $request); + public function matches(Request $request); } only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php @@ -36,7 +36,7 @@ interface SessionHandlerInterface * * @return boolean */ - function open($savePath, $sessionName); + public function open($savePath, $sessionName); /** * Close session. @@ -45,7 +45,7 @@ interface SessionHandlerInterface * * @return boolean */ - function close(); + public function close(); /** * Read session. @@ -56,7 +56,7 @@ interface SessionHandlerInterface * * @return string String as stored in persistent storage or empty string in all other cases. */ - function read($sessionId); + public function read($sessionId); /** * Commit session to storage. @@ -68,7 +68,7 @@ interface SessionHandlerInterface * * @return boolean */ - function write($sessionId, $data); + public function write($sessionId, $data); /** * Destroys this session. @@ -81,7 +81,7 @@ interface SessionHandlerInterface * * @return boolean */ - function destroy($sessionId); + public function destroy($sessionId); /** * Garbage collection for storage. @@ -94,5 +94,5 @@ interface SessionHandlerInterface * * @return boolean */ - function gc($lifetime); + public function gc($lifetime); } only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php @@ -27,7 +27,7 @@ interface AttributeBagInterface extends SessionBagInterface * * @return Boolean true if the attribute is defined, false otherwise */ - function has($name); + public function has($name); /** * Returns an attribute. @@ -37,7 +37,7 @@ interface AttributeBagInterface extends SessionBagInterface * * @return mixed */ - function get($name, $default = null); + public function get($name, $default = null); /** * Sets an attribute. @@ -45,21 +45,21 @@ interface AttributeBagInterface extends SessionBagInterface * @param string $name * @param mixed $value */ - function set($name, $value); + public function set($name, $value); /** * Returns attributes. * * @return array Attributes */ - function all(); + public function all(); /** * Sets attributes. * * @param array $attributes Attributes */ - function replace(array $attributes); + public function replace(array $attributes); /** * Removes an attribute. @@ -68,5 +68,5 @@ interface AttributeBagInterface extends SessionBagInterface * * @return mixed The removed value */ - function remove($name); + public function remove($name); } only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php @@ -93,7 +93,7 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function peekAll() { - return array_key_exists('display', $this->flashes) ? (array)$this->flashes['display'] : array(); + return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array(); } /** @@ -139,7 +139,7 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function set($type, $messages) { - $this->flashes['new'][$type] = (array)$messages; + $this->flashes['new'][$type] = (array) $messages; } /** only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -26,7 +26,7 @@ interface FlashBagInterface extends SessionBagInterface * @param string $type * @param string $message */ - function add($type, $message); + public function add($type, $message); /** * Registers a message for a given type. @@ -34,7 +34,7 @@ interface FlashBagInterface extends SessionBagInterface * @param string $type * @param string $message */ - function set($type, $message); + public function set($type, $message); /** * Gets flash message for a given type. @@ -44,14 +44,14 @@ interface FlashBagInterface extends SessionBagInterface * * @return string */ - function peek($type, array $default = array()); + public function peek($type, array $default = array()); /** * Gets all flash messages. * * @return array */ - function peekAll(); + public function peekAll(); /** * Gets and clears flash from the stack. @@ -61,19 +61,19 @@ interface FlashBagInterface extends SessionBagInterface * * @return string */ - function get($type, array $default = array()); + public function get($type, array $default = array()); /** * Gets and clears flashes from the stack. * * @return array */ - function all(); + public function all(); /** * Sets all flash messages. */ - function setAll(array $messages); + public function setAll(array $messages); /** * Has flash messages for a given type? @@ -82,12 +82,12 @@ interface FlashBagInterface extends SessionBagInterface * * @return boolean */ - function has($type); + public function has($type); /** * Returns a list of all defined types. * * @return array */ - function keys(); + public function keys(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php @@ -23,26 +23,26 @@ interface SessionBagInterface * * @return string */ - function getName(); + public function getName(); /** * Initializes the Bag * * @param array $array */ - function initialize(array &$array); + public function initialize(array &$array); /** * Gets the storage key for this bag. * * @return string */ - function getStorageKey(); + public function getStorageKey(); /** * Clears out data from bag. * * @return mixed Whatever data was contained. */ - function clear(); + public function clear(); } only in patch2: unchanged: --- /dev/null +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * NativeFileSessionHandler. + * + * Native session handler using PHP's built in file storage. + * + * @author Drak + */ +class NativeFileSessionHandler extends NativeSessionHandler +{ + /** + * Constructor. + * + * @param string $savePath Path of directory to save session files. Default null will leave setting as defined by PHP. + */ + public function __construct($savePath = null) + { + if (null === $savePath) { + $savePath = ini_get('session.save_path'); + } + + if ($savePath && !is_dir($savePath)) { + mkdir($savePath, 0777, true); + } + + ini_set('session.save_handler', 'files'); + ini_set('session.save_path', $savePath); + } +} only in patch2: unchanged: --- /dev/null +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; + +/** + * Adds SessionHandler functionality if available. + * + * @see http://php.net/sessionhandler + */ + +if (version_compare(phpversion(), '5.4.0', '>=')) { + class NativeSessionHandler extends \SessionHandler {} +} else { + class NativeSessionHandler {} +} only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php @@ -11,9 +11,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\FileSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; - /** * MockFileSessionStorage is used to mock sessions for * functional testing when done in a single PHP process. @@ -28,27 +25,35 @@ use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; class MockFileSessionStorage extends MockArraySessionStorage { /** - * @var FileSessionHandler + * @var string + */ + private $savePath; + + /** + * @var array */ - private $handler; + private $sessionData; /** * Constructor. * - * @param string $savePath Path of directory to save session files. - * @param string $name Session name. - * @param FileSessionHandler $handler Save handler - * @param MetadataBag $metaData Metadatabag + * @param string $savePath Path of directory to save session files. + * @param string $name Session name. + * @param MetadataBag $metaBag MetadataBag instance. */ - public function __construct($savePath = null, $name = 'MOCKSESSID', FileSessionHandler $handler = null, MetadataBag $metaData = null) + public function __construct($savePath = null, $name = 'MOCKSESSID', MetadataBag $metaBag = null) { - if (null == $handler) { - $handler = new FileSessionHandler($savePath, 'mocksess_'); + if (null === $savePath) { + $savePath = sys_get_temp_dir(); } - $this->handler = $handler; + if (!is_dir($savePath)) { + mkdir($savePath, 0777, true); + } + + $this->savePath = $savePath; - parent::__construct($name, $metaData); + parent::__construct($name, $metaBag); } /** @@ -92,7 +97,7 @@ class MockFileSessionStorage extends MockArraySessionStorage */ public function save() { - $this->handler->write($this->id, serialize($this->data)); + file_put_contents($this->getFilePath(), serialize($this->data)); // this is needed for Silex, where the session object is re-used across requests // in functional tests. In Symfony, the container is rebooted, so we don't have @@ -106,7 +111,19 @@ class MockFileSessionStorage extends MockArraySessionStorage */ private function destroy() { - $this->handler->destroy($this->id); + if (is_file($this->getFilePath())) { + unlink($this->getFilePath()); + } + } + + /** + * Calculate path to file. + * + * @return string File path + */ + private function getFilePath() + { + return $this->savePath.'/'.$this->id.'.mocksess'; } /** @@ -114,8 +131,8 @@ class MockFileSessionStorage extends MockArraySessionStorage */ private function read() { - $data = $this->handler->read($this->id); - $this->data = $data ? unserialize($data) : array(); + $filePath = $this->getFilePath(); + $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : array(); $this->loadSession(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -42,7 +42,7 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf */ public function open($savePath, $sessionName) { - $return = (bool)$this->handler->open($savePath, $sessionName); + $return = (bool) $this->handler->open($savePath, $sessionName); if (true === $return) { $this->active = true; only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php @@ -132,7 +132,6 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase @unlink($targetPath); } - public function testGetClientOriginalNameSanitizeFilename() { $file = new UploadedFile( @@ -207,7 +206,6 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase $this->assertFalse($file->isValid()); } - public function uploadedFileErrorProvider() { return array( only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php @@ -200,7 +200,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('bang'), $bag->filter('array', '', false), '->filter() gets a value of parameter as an array'); - } /** only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php @@ -11,8 +11,6 @@ namespace Symfony\Component\HttpFoundation\Tests; - - use Symfony\Component\HttpFoundation\RequestMatcher; use Symfony\Component\HttpFoundation\Request; only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/FileSessionHandlerTest.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; - -use Symfony\Component\HttpFoundation\Session\Storage\Handler\FileSessionHandler; - -/** - * Test class for FileSessionHandler. - * - * @author Drak - */ -class FileSessionStorageTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var FileSessionHandler - */ - private $handler; - - /** - * @var string - */ - private $path; - - public function setUp() - { - $this->path = sys_get_temp_dir().'/filesessionhandler'; - $this->handler = new FileSessionHandler($this->path, 'mocksess_'); - - parent::setUp(); - } - - public function tearDown() - { - foreach (glob($this->path.'/*') as $file) { - unlink($file); - } - - rmdir($this->path); - - $this->handler = null; - } - - public function test__construct() - { - $this->assertTrue(is_dir($this->path)); - } - - public function testOpen() - { - $this->assertTrue($this->handler->open('a', 'b')); - } - - public function testClose() - { - $this->assertTrue($this->handler->close()); - } - - public function testReadWrite() - { - $this->assertEmpty($this->handler->read('123')); - $this->assertTrue($this->handler->write('123', 'data')); - $this->assertEquals('data', $this->handler->read('123')); - } - - public function testDestroy() - { - $this->handler->write('456', 'data'); - $this->handler->destroy('123'); - $this->assertEquals('data', $this->handler->read('456')); - $this->handler->destroy('456'); - $this->assertEmpty($this->handler->read('456')); - } - - public function testGc() - { - $prefix = $this->path.'/mocksess_'; - $this->handler->write('1', 'data'); - touch($prefix.'1', time()-86400); - - $this->handler->write('2', 'data'); - touch($prefix.'2', time()-3600); - - $this->handler->write('3', 'data'); - touch($prefix.'3', time()-300); - - $this->handler->write('4', 'data'); - - $this->handler->gc(90000); - $this->assertEquals(4, count(glob($this->path.'/*'))); - - $this->handler->gc(4000); - $this->assertEquals(3, count(glob($this->path.'/*'))); - - $this->handler->gc(200); - $this->assertEquals(1, count(glob($this->path.'/*'))); - } -} only in patch2: unchanged: --- /dev/null +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler; +use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; + +/** + * Test class for NativeFileSessionHandler. + * + * @author Drak + * + * @runTestsInSeparateProcesses + */ +class NativeFileSessionHandlerTest extends \PHPUnit_Framework_TestCase +{ + public function testConstruct() + { + $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler(sys_get_temp_dir())); + + if (version_compare(phpversion(), '5.4.0', '<')) { + $this->assertEquals('files', $storage->getSaveHandler()->getSaveHandlerName()); + $this->assertEquals('files', ini_get('session.save_handler')); + } else { + $this->assertEquals('files', $storage->getSaveHandler()->getSaveHandlerName()); + $this->assertEquals('user', ini_get('session.save_handler')); + } + + $this->assertEquals(sys_get_temp_dir(), ini_get('session.save_path')); + $this->assertEquals('TESTING', ini_get('session.name')); + } + + public function testConstructDefault() + { + $path = ini_get('session.save_path'); + $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler()); + + $this->assertEquals($path, ini_get('session.save_path')); + } +} only in patch2: unchanged: --- /dev/null +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; + +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; + +/** + * Test class for NativeSessionHandler. + * + * @author Drak + * + * @runTestsInSeparateProcesses + */ +class NativeSessionHandlerTest extends \PHPUnit_Framework_TestCase +{ + public function testConstruct() + { + $handler = new NativeSessionHandler(); + + // note for PHPUnit optimisers - the use of assertTrue/False + // here is deliberate since the tests do not require the classes to exist - drak + if (version_compare(phpversion(), '5.4.0', '<')) { + $this->assertFalse($handler instanceof \SessionHandler); + $this->assertTrue($handler instanceof NativeSessionHandler); + } else { + $this->assertTrue($handler instanceof \SessionHandler); + $this->assertTrue($handler instanceof NativeSessionHandler); + } + } +} only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php @@ -55,4 +55,3 @@ class NullSessionStorageTest extends \PHPUnit_Framework_TestCase return new NativeSessionStorage(array(), new NullSessionHandler()); } } - only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -61,4 +61,3 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase $this->assertEquals(0, count($this->pdo->query('SELECT * FROM sessions')->fetchAll())); } } - only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -28,7 +28,7 @@ class MockFileSessionStorageTest extends \PHPUnit_Framework_TestCase private $sessionDir; /** - * @var MockFileSessionStorage + * @var FileMockSessionStorage */ protected $storage; @@ -40,14 +40,12 @@ class MockFileSessionStorageTest extends \PHPUnit_Framework_TestCase protected function tearDown() { - foreach (glob($this->sessionDir.'/mocksess_*') as $file) { - unlink($file); - } - - rmdir($this->sessionDir); - $this->sessionDir = null; $this->storage = null; + array_map('unlink', glob($this->sessionDir.'/*.session')); + if (is_dir($this->sessionDir)) { + rmdir($this->sessionDir); + } } public function testStart() only in patch2: unchanged: --- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; @@ -136,8 +137,8 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Test skipped, for PHP 5.3 only.'); } - ini_set('session.save_handler', 'files'); $storage = $this->getStorage(); + $storage->setSaveHandler(new NativeFileSessionHandler()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy', $storage->getSaveHandler()); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/BundleInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/BundleInterface.php @@ -29,14 +29,14 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function boot(); + public function boot(); /** * Shutdowns the Bundle. * * @api */ - function shutdown(); + public function shutdown(); /** * Builds the bundle. @@ -47,7 +47,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function build(ContainerBuilder $container); + public function build(ContainerBuilder $container); /** * Returns the container extension that should be implicitly loaded. @@ -56,16 +56,20 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getContainerExtension(); + public function getContainerExtension(); /** - * Returns the bundle parent name. + * Returns the bundle name that this bundle overrides. * - * @return string The Bundle parent name it overrides or null if no parent + * Despite its name, this method does not imply any parent/child relationship + * between the bundles, just a way to extend and override an existing + * bundle. + * + * @return string The Bundle name it overrides or null if no parent * * @api */ - function getParent(); + public function getParent(); /** * Returns the bundle name (the class short name). @@ -74,7 +78,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getName(); + public function getName(); /** * Gets the Bundle namespace. @@ -83,7 +87,7 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getNamespace(); + public function getNamespace(); /** * Gets the Bundle directory path. @@ -94,5 +98,5 @@ interface BundleInterface extends ContainerAwareInterface * * @api */ - function getPath(); + public function getPath(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php @@ -23,5 +23,5 @@ interface CacheClearerInterface * * @param string $cacheDir The cache directory. */ - function clear($cacheDir); + public function clear($cacheDir); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php @@ -28,5 +28,5 @@ interface CacheWarmerInterface extends WarmableInterface * * @return Boolean true if the warmer is optional, false otherwise */ - function isOptional(); + public function isOptional(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php @@ -23,5 +23,5 @@ interface WarmableInterface * * @param string $cacheDir The cache directory */ - function warmUp($cacheDir); + public function warmUp($cacheDir); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php @@ -45,7 +45,7 @@ interface ControllerResolverInterface * * @api */ - function getController(Request $request); + public function getController(Request $request); /** * Returns the arguments to pass to the controller. @@ -59,5 +59,5 @@ interface ControllerResolverInterface * * @api */ - function getArguments(Request $request, $controller); + public function getArguments(Request $request, $controller); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -31,7 +31,7 @@ class ConfigDataCollector extends DataCollector * * @param KernelInterface $kernel A KernelInterface instance */ - public function __construct(KernelInterface $kernel) + public function setKernel(KernelInterface $kernel) { $this->kernel = $kernel; } @@ -44,9 +44,9 @@ class ConfigDataCollector extends DataCollector $this->data = array( 'token' => $response->headers->get('X-Debug-Token'), 'symfony_version' => Kernel::VERSION, - 'name' => $this->kernel->getName(), - 'env' => $this->kernel->getEnvironment(), - 'debug' => $this->kernel->isDebug(), + 'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a', + 'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a', + 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', 'php_version' => PHP_VERSION, 'xdebug_enabled' => extension_loaded('xdebug'), 'eaccel_enabled' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable'), @@ -55,8 +55,10 @@ class ConfigDataCollector extends DataCollector 'bundles' => array(), ); - foreach ($this->kernel->getBundles() as $name => $bundle) { - $this->data['bundles'][$name] = $bundle->getPath(); + if (isset($this->kernel)) { + foreach ($this->kernel->getBundles() as $name => $bundle) { + $this->data['bundles'][$name] = $bundle->getPath(); + } } } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\DataCollector; - /** * DataCollector. * only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php @@ -32,7 +32,7 @@ interface DataCollectorInterface * * @api */ - function collect(Request $request, Response $response, \Exception $exception = null); + public function collect(Request $request, Response $response, \Exception $exception = null); /** * Returns the name of the collector. @@ -41,5 +41,5 @@ interface DataCollectorInterface * * @api */ - function getName(); + public function getName(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php @@ -29,13 +29,8 @@ class ExceptionDataCollector extends DataCollector public function collect(Request $request, Response $response, \Exception $exception = null) { if (null !== $exception) { - $flattenException = FlattenException::create($exception); - if ($exception instanceof HttpExceptionInterface) { - $flattenException->setStatusCode($exception->getStatusCode()); - } - $this->data = array( - 'exception' => $flattenException, + 'exception' => FlattenException::create($exception), ); } } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -60,11 +60,17 @@ class RequestDataCollector extends DataCollector } $sessionMetadata = array(); - + $sessionAttributes = array(); + $flashes = array(); if ($request->hasSession()) { - $sessionMetadata['Created'] = date(DATE_RFC822, $request->getSession()->getMetadataBag()->getCreated()); - $sessionMetadata['Last used'] = date(DATE_RFC822, $request->getSession()->getMetadataBag()->getLastUsed()); - $sessionMetadata['Lifetime'] = $request->getSession()->getMetadataBag()->getLifetime(); + $session = $request->getSession(); + if ($session->isStarted()) { + $sessionMetadata['Created'] = date(DATE_RFC822, $session->getMetadataBag()->getCreated()); + $sessionMetadata['Last used'] = date(DATE_RFC822, $session->getMetadataBag()->getLastUsed()); + $sessionMetadata['Lifetime'] = $session->getMetadataBag()->getLifetime(); + $sessionAttributes = $session->all(); + $flashes = $session->getFlashBag()->peekAll(); + } } $this->data = array( @@ -80,8 +86,8 @@ class RequestDataCollector extends DataCollector 'request_attributes' => $attributes, 'response_headers' => $responseHeaders, 'session_metadata' => $sessionMetadata, - 'session_attributes' => $request->hasSession() ? $request->getSession()->all() : array(), - 'flashes' => $request->hasSession() ? $request->getSession()->getFlashBag()->peekAll() : array(), + 'session_attributes' => $sessionAttributes, + 'flashes' => $flashes, 'path_info' => $request->getPathInfo(), ); } @@ -161,6 +167,37 @@ class RequestDataCollector extends DataCollector return $this->data['format']; } + + /** + * Gets the route. + * + * @return string The route + */ + public function getRoute() + { + return 'n/a'; + } + + /** + * Returns the route parameters. + * + * @return array The parameters + */ + public function getRouteParams() + { + return 'n/a'; + } + + /** + * Gets the controller. + * + * @return string The controller as a string + */ + public function getController() + { + return 'n/a'; + } + /** * {@inheritdoc} */ only in patch2: unchanged: --- /dev/null +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DataCollector; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpKernel\DataCollector\DataCollector; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; + +/** + * RouterDataCollector. + * + * @author Fabien Potencier + */ +class RouterDataCollector extends DataCollector +{ + protected $controllers; + + public function __construct() + { + $this->controllers = new \SplObjectStorage(); + + $this->data = array( + 'redirect' => false, + 'url' => null, + 'route' => null, + ); + } + + /** + * {@inheritdoc} + */ + public function collect(Request $request, Response $response, \Exception $exception = null) + { + if ($response instanceof RedirectResponse) { + $this->data['redirect'] = true; + $this->data['url'] = $response->getTargetUrl(); + + if ($this->controllers->contains($request)) { + $this->data['route'] = $this->guessRoute($request, $this->controllers[$request]); + } + } + } + + protected function guessRoute(Request $request, $controller) + { + return 'n/a'; + } + + /** + * Remembers the controller associated to each request. + * + * @param FilterControllerEvent The filter controller event + */ + public function onKernelController(FilterControllerEvent $event) + { + $this->controllers[$event->getRequest()] = $event->getController(); + } + + /** + * @return Boolean Whether this request will result in a redirect + */ + public function getRedirect() + { + return $this->data['redirect']; + } + + /** + * @return string|null The target URL + */ + public function getTargetUrl() + { + return $this->data['url']; + } + + /** + * @return string|null The target route + */ + public function getTargetRoute() + { + return $this->data['route']; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'router'; + } +} only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php @@ -45,7 +45,7 @@ class ExceptionHandler * * @return The registered exception handler */ - static public function register($debug = true) + public static function register($debug = true) { $handler = new static($debug); @@ -100,7 +100,7 @@ class ExceptionHandler } } - return new Response($this->decorate($content, $title), $exception->getStatusCode()); + return new Response($this->decorate($content, $title), $exception->getStatusCode(), $exception->getHeaders()); } private function getContent($exception) only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php @@ -30,7 +30,7 @@ abstract class ConfigurableExtension extends Extension /** * {@inheritDoc} */ - public final function load(array $configs, ContainerBuilder $container) + final public function load(array $configs, ContainerBuilder $container) { $this->loadInternal($this->processConfiguration($this->getConfiguration(array(), $container), $configs), $container); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php @@ -96,7 +96,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn return Container::underscore($classBaseName); } - protected final function processConfiguration(ConfigurationInterface $configuration, array $configs) + final protected function processConfiguration(ConfigurationInterface $configuration, array $configs) { $processor = new Processor(); only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/EsiListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/EsiListener.php @@ -51,7 +51,7 @@ class EsiListener implements EventSubscriberInterface $this->esi->addSurrogateControl($event->getResponse()); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => 'onKernelResponse', only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -62,15 +62,9 @@ class ExceptionListener implements EventSubscriberInterface $logger = $this->logger instanceof DebugLoggerInterface ? $this->logger : null; - $flattenException = FlattenException::create($exception); - if ($exception instanceof HttpExceptionInterface) { - $flattenException->setStatusCode($exception->getStatusCode()); - $flattenException->setHeaders($exception->getHeaders()); - } - $attributes = array( '_controller' => $this->controller, - 'exception' => $flattenException, + 'exception' => FlattenException::create($exception), 'logger' => $logger, 'format' => $request->getRequestFormat(), ); @@ -96,7 +90,7 @@ class ExceptionListener implements EventSubscriberInterface $handling = false; // re-throw the exception as this is a catch-all - throw $exception; + return; } $event->setResponse($response); @@ -104,7 +98,7 @@ class ExceptionListener implements EventSubscriberInterface $handling = false; } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::EXCEPTION => array('onKernelException', -128), only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -134,7 +134,7 @@ class ProfilerListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( // kernel.request must be registered as early as possible to not break only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ResponseListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ResponseListener.php @@ -50,7 +50,7 @@ class ResponseListener implements EventSubscriberInterface $response->prepare($event->getRequest()); } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => 'onKernelResponse', only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php @@ -43,7 +43,7 @@ class StreamedResponseListener implements EventSubscriberInterface } } - static public function getSubscribedEvents() + public static function getSubscribedEvents() { return array( KernelEvents::RESPONSE => array('onKernelResponse', -1024), only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php @@ -30,14 +30,19 @@ class FlattenException private $file; private $line; - static public function create(\Exception $exception, $statusCode = null, array $headers = array()) + public static function create(\Exception $exception, $statusCode = null, array $headers = array()) { $e = new static(); $e->setMessage($exception->getMessage()); $e->setCode($exception->getCode()); + if ($exception instanceof HttpExceptionInterface) { + $statusCode = $exception->getStatusCode(); + $headers = array_merge($headers, $exception->getHeaders()); + } + if (null === $statusCode) { - $statusCode = $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500; + $statusCode = 500; } $e->setStatusCode($statusCode); only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php @@ -23,12 +23,12 @@ interface HttpExceptionInterface * * @return integer An HTTP response status code */ - function getStatusCode(); + public function getStatusCode(); /** * Returns response headers. * * @return array Response headers */ - function getHeaders(); + public function getHeaders(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php @@ -30,12 +30,12 @@ interface EsiResponseCacheStrategyInterface * * @param Response $response */ - function add(Response $response); + public function add(Response $response); /** * Updates the Response HTTP headers based on the embedded Responses. * * @param Response $response */ - function update(Response $response); + public function update(Response $response); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php @@ -31,7 +31,7 @@ interface StoreInterface * * @return Response|null A Response instance, or null if no cache entry was found */ - function lookup(Request $request); + public function lookup(Request $request); /** * Writes a cache entry to the store for the given Request and Response. @@ -44,14 +44,14 @@ interface StoreInterface * * @return string The key under which the response is stored */ - function write(Request $request, Response $response); + public function write(Request $request, Response $response); /** * Invalidates all cache entries that match the request. * * @param Request $request A Request instance */ - function invalidate(Request $request); + public function invalidate(Request $request); /** * Locks the cache for a given Request. @@ -60,14 +60,14 @@ interface StoreInterface * * @return Boolean|string true if the lock is acquired, the path to the current lock otherwise */ - function lock(Request $request); + public function lock(Request $request); /** * Releases the lock for the given Request. * * @param Request $request A Request instance */ - function unlock(Request $request); + public function unlock(Request $request); /** * Purges data for the given URL. @@ -76,10 +76,10 @@ interface StoreInterface * * @return Boolean true if the URL exists and has been purged, false otherwise */ - function purge($url); + public function purge($url); /** * Cleanups storage. */ - function cleanup(); + public function cleanup(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php @@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent; @@ -184,14 +185,30 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface $event = new GetResponseForExceptionEvent($this, $request, $type, $e); $this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event); + // a listener might have replaced the exception + $e = $event->getException(); + if (!$event->hasResponse()) { throw $e; } + $response = $event->getResponse(); + + // ensure that we actually have an error response + if (!$response->isClientError() && !$response->isServerError() && !$response->isRedirect()) { + if ($e instanceof HttpExceptionInterface) { + // keep the HTTP status code and headers + $response->setStatusCode($e->getStatusCode()); + $response->headers->add($e->getHeaders()); + } else { + $response->setStatusCode(500); + } + } + try { - return $this->filterResponse($event->getResponse(), $request, $type); + return $this->filterResponse($response, $request, $type); } catch (\Exception $e) { - return $event->getResponse(); + return $response; } } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernelInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernelInterface.php @@ -43,5 +43,5 @@ interface HttpKernelInterface * * @api */ - function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php @@ -27,12 +27,12 @@ interface DebugLoggerInterface * * @return array An array of logs */ - function getLogs(); + public function getLogs(); /** * Returns the number of errors. * * @return integer The number of errors */ - function countErrors(); + public function countErrors(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/LoggerInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/LoggerInterface.php @@ -23,40 +23,40 @@ interface LoggerInterface /** * @api */ - function emerg($message, array $context = array()); + public function emerg($message, array $context = array()); /** * @api */ - function alert($message, array $context = array()); + public function alert($message, array $context = array()); /** * @api */ - function crit($message, array $context = array()); + public function crit($message, array $context = array()); /** * @api */ - function err($message, array $context = array()); + public function err($message, array $context = array()); /** * @api */ - function warn($message, array $context = array()); + public function warn($message, array $context = array()); /** * @api */ - function notice($message, array $context = array()); + public function notice($message, array $context = array()); /** * @api */ - function info($message, array $context = array()); + public function info($message, array $context = array()); /** * @api */ - function debug($message, array $context = array()); + public function debug($message, array $context = array()); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php @@ -235,7 +235,7 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface return $profiles; } - + /** * Returns whether data for the given token already exists in storage. * only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php @@ -28,7 +28,7 @@ interface ProfilerStorageInterface * * @return array An array of tokens */ - function find($ip, $url, $limit, $method); + public function find($ip, $url, $limit, $method); /** * Reads data associated with the given token. @@ -39,7 +39,7 @@ interface ProfilerStorageInterface * * @return Profile The profile associated with token */ - function read($token); + public function read($token); /** * Saves a Profile. @@ -48,10 +48,10 @@ interface ProfilerStorageInterface * * @return Boolean Write operation successful */ - function write(Profile $profile); + public function write(Profile $profile); /** * Purges all data from the database. */ - function purge(); + public function purge(); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\Profiler; - /** * SqliteProfilerStorage stores profiling information in a SQLite database. * only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/TerminableInterface.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/TerminableInterface.php @@ -35,5 +35,5 @@ interface TerminableInterface * * @api */ - function terminate(Request $request, Response $response); + public function terminate(Request $request, Response $response); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php @@ -25,7 +25,7 @@ class BundleTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('The "Console" component is not available'); } - if (!class_exists('Symfony\Component\DependencyInjection\ContainerAwareInterface')) { + if (!interface_exists('Symfony\Component\DependencyInjection\ContainerAwareInterface')) { $this->markTestSkipped('The "DependencyInjection" component is not available'); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php @@ -162,7 +162,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase { } - static protected function controllerMethod4() + protected static function controllerMethod4() { } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -28,8 +28,9 @@ class ConfigDataCollectorTest extends \PHPUnit_Framework_TestCase public function testCollect() { - $kernel = new KernelForTest('test',true); - $c = new ConfigDataCollector($kernel); + $kernel = new KernelForTest('test', true); + $c = new ConfigDataCollector(); + $c->setKernel($kernel); $c->collect(new Request(), new Response()); $this->assertSame('test',$c->getEnv()); only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php @@ -71,9 +71,9 @@ class ContainerAwareTraceableEventDispatcherTest extends \PHPUnit_Framework_Test class StaticClassFixture { - static public $called = false; + public static $called = false; - static public function staticListener($event) + public static function staticListener($event) { self::$called = true; } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ExceptionHandlerTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ExceptionHandlerTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel\Tests\Debug; use Symfony\Component\HttpKernel\Debug\ExceptionHandler; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase { @@ -51,6 +52,15 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase $this->assertContains('Sorry, the page you are looking for could not be found.', $response->getContent()); } + public function testHeaders() + { + $handler = new ExceptionHandler(false); + + $response = $handler->createResponse(new MethodNotAllowedHttpException(array('POST'))); + $this->assertEquals('405', $response->getStatusCode()); + $this->assertEquals('POST', $response->headers->get('Allow')); + } + public function testNestedExceptions() { $handler = new ExceptionHandler(true); only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/StopwatchTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/StopwatchTest.php @@ -85,7 +85,6 @@ class StopwatchTest extends \PHPUnit_Framework_TestCase $stopwatch->stop('foobar'); $stopwatch->stopSection('0'); - // the section is an event by itself $this->assertCount(3, $stopwatch->getSectionEvents('1')); $this->assertCount(2, $stopwatch->getSectionEvents('2')); only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Exception/FlattenExceptionTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Exception/FlattenExceptionTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\HttpKernel\Tests\Exception; use Symfony\Component\HttpKernel\Exception\FlattenException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; class FlattenExceptionTest extends \PHPUnit_Framework_TestCase { @@ -28,6 +29,12 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase $this->assertEquals('404', $flattened->getStatusCode()); } + public function testHeadersForHttpException() + { + $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST'))); + $this->assertEquals(array('Allow' => 'POST'), $flattened->getHeaders()); + } + /** * @dataProvider flattenDataProvider */ only in patch2: unchanged: --- /dev/null +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.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\HttpKernel\Tests\Fixtures; + +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; + +class KernelForOverrideName extends Kernel +{ + protected $name = 'overridden'; + + public function registerBundles() + { + + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + + } +} only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php @@ -16,12 +16,12 @@ use Symfony\Component\EventDispatcher\EventDispatcher; class TestEventDispatcher extends EventDispatcher implements TraceableEventDispatcherInterface { - function getCalledListeners() + public function getCalledListeners() { return array('foo'); } - function getNotCalledListeners() + public function getNotCalledListeners() { return array('bar'); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php @@ -154,7 +154,7 @@ class HttpCacheTestCase extends \PHPUnit_Framework_TestCase $this->catch = $catch; } - static public function clearDirectory($directory) + public static function clearDirectory($directory) { if (!is_dir($directory)) { return; only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php @@ -14,8 +14,11 @@ namespace Symfony\Component\HttpKernel\Tests; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\EventDispatcher\EventDispatcher; class HttpKernelTest extends \PHPUnit_Framework_TestCase @@ -59,8 +62,38 @@ class HttpKernelTest extends \PHPUnit_Framework_TestCase }); $kernel = new HttpKernel($dispatcher, $this->getResolver(function () { throw new \RuntimeException('foo'); })); + $response = $kernel->handle(new Request()); - $this->assertEquals('foo', $kernel->handle(new Request())->getContent()); + $this->assertEquals('500', $response->getStatusCode()); + $this->assertEquals('foo', $response->getContent()); + } + + public function testHandleExceptionWithARedirectionResponse() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) { + $event->setResponse(new RedirectResponse('/login', 301)); + }); + + $kernel = new HttpKernel($dispatcher, $this->getResolver(function () { throw new AccessDeniedHttpException(); })); + $response = $kernel->handle(new Request()); + + $this->assertEquals('301', $response->getStatusCode()); + $this->assertEquals('/login', $response->headers->get('Location')); + } + + public function testHandleHttpException() + { + $dispatcher = new EventDispatcher(); + $dispatcher->addListener(KernelEvents::EXCEPTION, function ($event) { + $event->setResponse(new Response($event->getException()->getMessage())); + }); + + $kernel = new HttpKernel($dispatcher, $this->getResolver(function () { throw new MethodNotAllowedHttpException(array('POST')); })); + $response = $kernel->handle(new Request()); + + $this->assertEquals('405', $response->getStatusCode()); + $this->assertEquals('POST', $response->headers->get('Allow')); } public function testHandleWhenAListenerReturnsAResponse() @@ -225,7 +258,7 @@ class Controller return new Response('foo'); } - static public function staticController() + public static function staticController() { return new Response('foo'); } only in patch2: unchanged: --- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php +++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php @@ -26,7 +26,7 @@ class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest { protected static $storage; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { if (extension_loaded('mongo')) { self::$storage = new DummyMongoDbProfilerStorage('mongodb://localhost/symfony_tests/profiler_data', '', '', 86400); @@ -38,7 +38,7 @@ class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest } } - static public function tearDownAfterClass() + public static function tearDownAfterClass() { if (self::$storage) { self::$storage->purge(); only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php @@ -30,12 +30,12 @@ interface GeneratorDumperInterface * * @return string Executable code */ - function dump(array $options = array()); + public function dump(array $options = array()); /** * Gets the routes to dump. * * @return RouteCollection A RouteCollection instance */ - function getRoutes(); + public function getRoutes(); } only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php @@ -39,5 +39,5 @@ interface UrlGeneratorInterface extends RequestContextAwareInterface * * @api */ - function generate($name, $parameters = array(), $absolute = false); + public function generate($name, $parameters = array(), $absolute = false); } only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -34,6 +34,7 @@ class ApacheUrlMatcher extends UrlMatcher public function match($pathinfo) { $parameters = array(); + $defaults = array(); $allow = array(); $match = false; @@ -44,26 +45,28 @@ class ApacheUrlMatcher extends UrlMatcher $name = substr($name, 9); } - if (0 === strpos($name, '_ROUTING_')) { + if (0 === strpos($name, '_ROUTING_DEFAULTS_')) { + $name = substr($name, 18); + $defaults[$name] = $value; + } elseif (0 === strpos($name, '_ROUTING_')) { $name = substr($name, 9); + if ('_route' == $name) { + $match = true; + $parameters[$name] = $value; + } elseif (0 === strpos($name, '_allow_')) { + $allow[] = substr($name, 7); + } else { + $parameters[$name] = $value; + } } else { continue; } - if ('_route' == $name) { - $match = true; - $parameters[$name] = $value; - } elseif (0 === strpos($name, '_allow_')) { - $allow[] = substr($name, 7); - } else { - $parameters[$name] = $value; - } - unset($_SERVER[$key]); } if ($match) { - return $parameters; + return $this->mergeDefaults($parameters, $defaults); } elseif (0 < count($allow)) { throw new MethodNotAllowedException($allow); } else { only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Routing\Matcher\Dumper; - /** * Dumps a set of Apache mod_rewrite rules. * @@ -75,7 +74,7 @@ class ApacheMatcherDumper extends MatcherDumper $variables[] = 'E=_ROUTING_'.$variable.':%'.($i + 1); } foreach ($route->getDefaults() as $key => $value) { - $variables[] = 'E=_ROUTING_'.$key.':'.strtr($value, array( + $variables[] = 'E=_ROUTING_DEFAULTS_'.$key.':'.strtr($value, array( ':' => '\\:', '=' => '\\=', '\\' => '\\\\', @@ -140,7 +139,7 @@ class ApacheMatcherDumper extends MatcherDumper * * @return string The escaped string */ - static private function escape($string, $char, $with) + private static function escape($string, $char, $with) { $escaped = false; $output = ''; only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php @@ -26,12 +26,12 @@ interface MatcherDumperInterface * * @return string Executable code */ - function dump(array $options = array()); + public function dump(array $options = array()); /** * Gets the routes to dump. * * @return RouteCollection A RouteCollection instance */ - function getRoutes(); + public function getRoutes(); } only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php @@ -31,5 +31,5 @@ interface RedirectableUrlMatcherInterface * * @api */ - function redirect($path, $route, $scheme = null); + public function redirect($path, $route, $scheme = null); } only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/RequestContextAwareInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/RequestContextAwareInterface.php @@ -23,7 +23,7 @@ interface RequestContextAwareInterface * * @api */ - function setContext(RequestContext $context); + public function setContext(RequestContext $context); /** * Gets the request context. @@ -32,5 +32,5 @@ interface RequestContextAwareInterface * * @api */ - function getContext(); + public function getContext(); } only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Route.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Route.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Routing; * * @api */ -class Route +class Route implements \Serializable { private $pattern; private $defaults; @@ -26,7 +26,7 @@ class Route private $options; private $compiled; - static private $compilers = array(); + private static $compilers = array(); /** * Constructor. @@ -55,6 +55,25 @@ class Route $this->compiled = null; } + public function serialize() + { + return serialize(array( + 'pattern' => $this->pattern, + 'default' => $this->default, + 'requirements' => $this->requirements, + 'options' => $this->options, + )); + } + + public function unserialize($data) + { + $data = unserialize($data); + $this->pattern = $data['pattern']; + $this->default = $data['default']; + $this->requirements = $data['requirements']; + $this->options = $data['options']; + } + /** * Returns the pattern. * only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCompilerInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCompilerInterface.php @@ -25,5 +25,5 @@ interface RouteCompilerInterface * * @return CompiledRoute A CompiledRoute instance */ - function compile(Route $route); + public function compile(Route $route); } only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/RouterInterface.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/RouterInterface.php @@ -28,5 +28,5 @@ interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface * * @return RouteCollection A RouteCollection instance */ - function getRouteCollection(); + public function getRouteCollection(); } only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Annotation/RouteTest.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Annotation/RouteTest.php @@ -43,4 +43,3 @@ class RouteTest extends \PHPUnit_Framework_TestCase ); } } - only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache @@ -4,7 +4,11 @@ RewriteRule .* - [QSA,L] # foo RewriteCond %{REQUEST_URI} ^/foo/(baz|symfony)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foo,E=_ROUTING_bar:%1,E=_ROUTING_def:test] +RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foo,E=_ROUTING_bar:%1,E=_ROUTING_DEFAULTS_def:test] + +# foobar +RewriteCond %{REQUEST_URI} ^/foo(?:/([^/]+))?$ +RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foobar,E=_ROUTING_bar:%1,E=_ROUTING_DEFAULTS_bar:toto] # bar RewriteCond %{REQUEST_URI} ^/bar/([^/]+)$ @@ -58,7 +62,7 @@ RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz5unsafe,E=_ROUTING_foo:%1] # baz6 RewriteCond %{REQUEST_URI} ^/test/baz$ -RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz6,E=_ROUTING_foo:bar\ baz] +RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz6,E=_ROUTING_DEFAULTS_foo:bar\ baz] # baz7 RewriteCond %{REQUEST_URI} ^/te\ st/baz$ only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml @@ -3,4 +3,3 @@ blog_show: defaults: { _controller: MyBlogBundle:Blog:show } options: compiler_class: RouteCompiler - only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Routing\Tests\Loader; - abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_TestCase { protected function setUp() only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php @@ -50,4 +50,3 @@ class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals('RouteCompiler', $route->getOption('compiler_class')); } } - only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php @@ -50,6 +50,35 @@ class ApacheUrlMatcherTest extends \PHPUnit_Framework_TestCase ), ), array( + 'Route with params and defaults', + '/hello/hugo', + array( + '_ROUTING__route' => 'hello', + '_ROUTING__controller' => 'AcmeBundle:Default:index', + '_ROUTING_name' => 'hugo', + '_ROUTING_DEFAULTS_name' => 'world', + ), + array( + 'name' => 'hugo', + '_route' => 'hello', + '_controller' => 'AcmeBundle:Default:index', + ), + ), + array( + 'Route with defaults only', + '/hello', + array( + '_ROUTING__route' => 'hello', + '_ROUTING__controller' => 'AcmeBundle:Default:index', + '_ROUTING_DEFAULTS_name' => 'world', + ), + array( + 'name' => 'world', + '_route' => 'hello', + '_controller' => 'AcmeBundle:Default:index', + ), + ), + array( 'REDIRECT_ envs', '/hello/world', array( @@ -66,4 +95,3 @@ class ApacheUrlMatcherTest extends \PHPUnit_Framework_TestCase ); } } - only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php @@ -17,9 +17,9 @@ use Symfony\Component\Routing\Matcher\Dumper\ApacheMatcherDumper; class ApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase { - static protected $fixturesPath; + protected static $fixturesPath; - static public function setUpBeforeClass() + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/../../Fixtures/'); } @@ -70,6 +70,11 @@ class ApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase array('def' => 'test'), array('bar' => 'baz|symfony') )); + // defaults parameters in pattern + $collection->add('foobar', new Route( + '/foo/{bar}', + array('bar' => 'toto') + )); // method requirement $collection->add('bar', new Route( '/bar/{foo}', only in patch2: unchanged: --- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -14,7 +14,6 @@ namespace Symfony\Component\Routing\Tests\Matcher\Dumper; use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RequestContext; class PhpMatcherDumperTest extends \PHPUnit_Framework_TestCase { only in patch2: unchanged: --- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Escaper.php +++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Escaper.php @@ -25,13 +25,13 @@ class Escaper // first to ensure proper escaping because str_replace operates iteratively // on the input arrays. This ordering of the characters avoids the use of strtr, // which performs more slowly. - static private $escapees = array('\\\\', '\\"', + private static $escapees = array('\\\\', '\\"', "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"); - static private $escaped = array('\\"', '\\\\', + private static $escaped = array('\\"', '\\\\', "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", @@ -45,7 +45,7 @@ class Escaper * * @return Boolean True if the value would require double quotes. */ - static public function requiresDoubleQuoting($value) + public static function requiresDoubleQuoting($value) { return preg_match('/'.self::REGEX_CHARACTER_TO_ESCAPE.'/u', $value); } @@ -57,7 +57,7 @@ class Escaper * * @return string The quoted, escaped string */ - static public function escapeWithDoubleQuotes($value) + public static function escapeWithDoubleQuotes($value) { return sprintf('"%s"', str_replace(self::$escapees, self::$escaped, $value)); } @@ -69,7 +69,7 @@ class Escaper * * @return Boolean True if the value would require single quotes. */ - static public function requiresSingleQuoting($value) + public static function requiresSingleQuoting($value) { return preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ - ? | < > = ! % @ ` ]/x', $value); } @@ -81,7 +81,7 @@ class Escaper * * @return string The quoted, escaped string */ - static public function escapeWithSingleQuotes($value) + public static function escapeWithSingleQuotes($value) { return sprintf("'%s'", str_replace('\'', '\'\'', $value)); } only in patch2: unchanged: --- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php +++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php @@ -29,7 +29,7 @@ class Inline * * @return array A PHP array representing the YAML string */ - static public function parse($value) + public static function parse($value) { $value = trim($value); @@ -75,7 +75,7 @@ class Inline * * @throws DumpException When trying to dump PHP resource */ - static public function dump($value) + public static function dump($value) { switch (true) { case is_resource($value): @@ -125,7 +125,7 @@ class Inline * * @return string The YAML string representing the PHP array */ - static private function dumpArray($value) + private static function dumpArray($value) { // array $keys = array_keys($value); @@ -162,7 +162,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static public function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true) + public static function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true) { if (in_array($scalar[$i], $stringDelimiters)) { // quoted scalar @@ -207,7 +207,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static private function parseQuotedScalar($scalar, &$i) + private static function parseQuotedScalar($scalar, &$i) { // Only check the current item we're dealing with (for sequences) $subject = substr($scalar, $i); @@ -242,7 +242,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static private function parseSequence($sequence, &$i = 0) + private static function parseSequence($sequence, &$i = 0) { $output = array(); $len = strlen($sequence); @@ -298,7 +298,7 @@ class Inline * * @throws ParseException When malformed inline YAML string is parsed */ - static private function parseMapping($mapping, &$i = 0) + private static function parseMapping($mapping, &$i = 0) { $output = array(); $len = strlen($mapping); @@ -359,7 +359,7 @@ class Inline * * @return string A YAML string */ - static private function evaluateScalar($scalar) + private static function evaluateScalar($scalar) { $scalar = trim($scalar); @@ -404,7 +404,7 @@ class Inline * * @return string The regular expression */ - static private function getTimestampRegex() + private static function getTimestampRegex() { return << null, 'firstline' => 1, 'secondline' => 2) - only in patch2: unchanged: --- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php +++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php @@ -48,7 +48,7 @@ class Unescaper public function unescapeDoubleQuotedString($value) { $self = $this; - $callback = function($match) use($self) { + $callback = function($match) use ($self) { return $self->unescapeCharacter($match[0]); }; only in patch2: unchanged: --- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Yaml.php +++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Yaml.php @@ -22,9 +22,9 @@ use Symfony\Component\Yaml\Exception\ParseException; */ class Yaml { - static public $enablePhpParsing = false; + public static $enablePhpParsing = false; - static public function enablePhpParsing() + public static function enablePhpParsing() { self::$enablePhpParsing = true; } @@ -49,7 +49,7 @@ class Yaml * * @api */ - static public function parse($input) + public static function parse($input) { // if input is a file, process it $file = ''; @@ -102,7 +102,7 @@ class Yaml * * @api */ - static public function dump($array, $inline = 2) + public static function dump($array, $inline = 2) { $yaml = new Dumper();