Commit d822f213 authored by webchick's avatar webchick

Issue #2088651 by pwolanin: Update symfony components to latest 2.3.*.

parent 99670f08
......@@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
"hash": "eb2c59507a34a3831afe33b16c4d5775",
"hash": "204b3755db988998bcc618e71b2f235c",
"packages": [
{
"name": "doctrine/annotations",
......@@ -1166,24 +1166,24 @@
},
{
"name": "symfony/class-loader",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/ClassLoader",
"source": {
"type": "git",
"url": "https://github.com/symfony/ClassLoader.git",
"reference": "v2.3.1"
"reference": "622d370a07321329f5259c6f96d5c636104ad46b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/622d370a07321329f5259c6f96d5c636104ad46b",
"reference": "622d370a07321329f5259c6f96d5c636104ad46b",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/finder": ">=2.0,<3.0"
"symfony/finder": "~2.0"
},
"type": "library",
"extra": {
......@@ -1212,29 +1212,29 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "http://symfony.com",
"time": "2013-05-24 17:54:44"
"time": "2013-08-13 20:18:00"
},
{
"name": "symfony/debug",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Debug",
"source": {
"type": "git",
"url": "https://github.com/symfony/Debug.git",
"reference": "v2.3.1"
"reference": "729f6d19cfc401c4942e43fcc1059103bd6df130"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Debug/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/Debug/zipball/729f6d19cfc401c4942e43fcc1059103bd6df130",
"reference": "729f6d19cfc401c4942e43fcc1059103bd6df130",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/http-foundation": ">=2.1,<3.0",
"symfony/http-kernel": ">=2.1,<3.0"
"symfony/http-foundation": "~2.1",
"symfony/http-kernel": "~2.1"
},
"suggest": {
"symfony/class-loader": "",
......@@ -1268,29 +1268,29 @@
],
"description": "Symfony Debug Component",
"homepage": "http://symfony.com",
"time": "2013-06-02 11:58:44"
"time": "2013-08-08 14:16:10"
},
{
"name": "symfony/dependency-injection",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/DependencyInjection",
"source": {
"type": "git",
"url": "https://github.com/symfony/DependencyInjection.git",
"reference": "v2.3.1"
"reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/3678aa969e5bfeb8515a1f3047c63e8104723f5c",
"reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/config": ">=2.2,<3.0",
"symfony/yaml": ">=2.0,<3.0"
"symfony/config": "~2.2",
"symfony/yaml": "~2.0"
},
"suggest": {
"symfony/config": "",
......@@ -1324,28 +1324,28 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "http://symfony.com",
"time": "2013-06-05 09:51:05"
"time": "2013-07-25 17:13:25"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.3.0",
"version": "v2.3.4",
"target-dir": "Symfony/Component/EventDispatcher",
"source": {
"type": "git",
"url": "https://github.com/symfony/EventDispatcher.git",
"reference": "v2.3.0-RC1"
"reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.3.0-RC1",
"reference": "v2.3.0-RC1",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/41c9826457c65fa3cf746f214985b7ca9cba42f8",
"reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/dependency-injection": ">=2.0,<3.0"
"symfony/dependency-injection": "~2.0"
},
"suggest": {
"symfony/dependency-injection": "",
......@@ -1378,21 +1378,21 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "http://symfony.com",
"time": "2013-05-13 14:36:40"
"time": "2013-07-21 12:12:18"
},
{
"name": "symfony/http-foundation",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/HttpFoundation",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpFoundation.git",
"reference": "v2.3.1"
"reference": "fdf130fe65457aedbc4639a22f4ef9d3be5c002c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/fdf130fe65457aedbc4639a22f4ef9d3be5c002c",
"reference": "fdf130fe65457aedbc4639a22f4ef9d3be5c002c",
"shasum": ""
},
"require": {
......@@ -1428,40 +1428,41 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "http://symfony.com",
"time": "2013-05-10 06:00:03"
"time": "2013-08-26 05:49:51"
},
{
"name": "symfony/http-kernel",
"version": "v2.3.0",
"version": "v2.3.4",
"target-dir": "Symfony/Component/HttpKernel",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpKernel.git",
"reference": "v2.3.0"
"reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.3.0",
"reference": "v2.3.0",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
"reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"psr/log": ">=1.0,<2.0",
"symfony/debug": ">=2.3,<3.0",
"symfony/event-dispatcher": ">=2.1,<3.0",
"symfony/http-foundation": ">=2.2,<3.0"
"psr/log": "~1.0",
"symfony/debug": "~2.3",
"symfony/event-dispatcher": "~2.1",
"symfony/http-foundation": "~2.2"
},
"require-dev": {
"symfony/browser-kit": "2.2.*",
"symfony/class-loader": ">=2.1,<3.0",
"symfony/config": ">=2.0,<3.0",
"symfony/console": "2.2.*",
"symfony/dependency-injection": ">=2.0,<3.0",
"symfony/finder": ">=2.0,<3.0",
"symfony/process": ">=2.0,<3.0",
"symfony/routing": ">=2.2,<3.0",
"symfony/stopwatch": ">=2.2,<3.0"
"symfony/browser-kit": "~2.2",
"symfony/class-loader": "~2.1",
"symfony/config": "~2.0",
"symfony/console": "~2.2",
"symfony/dependency-injection": "~2.0",
"symfony/finder": "~2.0",
"symfony/process": "~2.0",
"symfony/routing": "~2.2",
"symfony/stopwatch": "~2.2",
"symfony/templating": "~2.2"
},
"suggest": {
"symfony/browser-kit": "",
......@@ -1498,21 +1499,21 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "http://symfony.com",
"time": "2013-06-03 14:13:35"
"time": "2013-08-27 08:58:24"
},
{
"name": "symfony/process",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Process",
"source": {
"type": "git",
"url": "https://github.com/symfony/Process.git",
"reference": "v2.3.1"
"reference": "1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/Process/zipball/1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b",
"reference": "1e91553e1cedd0b8fb1da6ea4f89b02e21713d5b",
"shasum": ""
},
"require": {
......@@ -1545,31 +1546,31 @@
],
"description": "Symfony Process Component",
"homepage": "http://symfony.com",
"time": "2013-05-06 20:03:44"
"time": "2013-08-22 06:42:25"
},
{
"name": "symfony/routing",
"version": "v2.3.0",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony/Routing.git",
"reference": "v2.3.0"
"reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.3.0",
"reference": "v2.3.0",
"url": "https://api.github.com/repos/symfony/Routing/zipball/69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
"reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"doctrine/common": ">=2.2,<3.0",
"psr/log": ">=1.0,<2.0",
"symfony/config": ">=2.2,<3.0",
"symfony/yaml": ">=2.0,<3.0"
"doctrine/common": "~2.2",
"psr/log": "~1.0",
"symfony/config": "~2.2",
"symfony/yaml": "~2.0"
},
"suggest": {
"doctrine/common": "",
......@@ -1603,21 +1604,21 @@
],
"description": "Symfony Routing Component",
"homepage": "http://symfony.com",
"time": "2013-05-20 08:57:26"
"time": "2013-08-23 15:14:07"
},
{
"name": "symfony/serializer",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Serializer",
"source": {
"type": "git",
"url": "https://github.com/symfony/Serializer.git",
"reference": "v2.3.1"
"reference": "457ba76395955926a67ea692957b0872dead5278"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Serializer/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/Serializer/zipball/457ba76395955926a67ea692957b0872dead5278",
"reference": "457ba76395955926a67ea692957b0872dead5278",
"shasum": ""
},
"require": {
......@@ -1650,29 +1651,29 @@
],
"description": "Symfony Serializer Component",
"homepage": "http://symfony.com",
"time": "2013-05-10 18:12:13"
"time": "2013-07-21 12:12:18"
},
{
"name": "symfony/translation",
"version": "v2.3.0",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Translation",
"source": {
"type": "git",
"url": "https://github.com/symfony/Translation.git",
"reference": "v2.3.0-RC1"
"reference": "65f888291f0896ad492f9abc6dc05c998373aded"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Translation/zipball/v2.3.0-RC1",
"reference": "v2.3.0-RC1",
"url": "https://api.github.com/repos/symfony/Translation/zipball/65f888291f0896ad492f9abc6dc05c998373aded",
"reference": "65f888291f0896ad492f9abc6dc05c998373aded",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/config": ">=2.0,<3.0",
"symfony/yaml": ">=2.2,<3.0"
"symfony/config": "~2.0",
"symfony/yaml": "~2.2"
},
"suggest": {
"symfony/config": "",
......@@ -1705,32 +1706,32 @@
],
"description": "Symfony Translation Component",
"homepage": "http://symfony.com",
"time": "2013-05-13 14:36:40"
"time": "2013-08-26 05:49:51"
},
{
"name": "symfony/validator",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Validator",
"source": {
"type": "git",
"url": "https://github.com/symfony/Validator.git",
"reference": "v2.3.1"
"reference": "8f6f6be47fb8e1179cd225b1f949630e26221e42"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/Validator/zipball/8f6f6be47fb8e1179cd225b1f949630e26221e42",
"reference": "8f6f6be47fb8e1179cd225b1f949630e26221e42",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/translation": ">=2.0,<3.0"
"symfony/translation": "~2.0"
},
"require-dev": {
"symfony/config": ">=2.2,<3.0",
"symfony/http-foundation": ">=2.1,<3.0",
"symfony/intl": ">=2.3,<3.0",
"symfony/yaml": ">=2.0,<3.0"
"symfony/config": "~2.2",
"symfony/http-foundation": "~2.1",
"symfony/intl": "~2.3",
"symfony/yaml": "~2.0"
},
"suggest": {
"doctrine/common": "",
......@@ -1766,21 +1767,21 @@
],
"description": "Symfony Validator Component",
"homepage": "http://symfony.com",
"time": "2013-06-10 16:23:25"
"time": "2013-08-24 15:26:22"
},
{
"name": "symfony/yaml",
"version": "v2.3.1",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
"url": "https://github.com/symfony/Yaml.git",
"reference": "v2.3.1"
"reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.3.1",
"reference": "v2.3.1",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
"reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
"shasum": ""
},
"require": {
......@@ -1813,7 +1814,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com",
"time": "2013-05-10 18:12:13"
"time": "2013-08-24 15:26:22"
},
{
"name": "twig/twig",
......
<?php
// autoload.php generated by Composer
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit3a4905090abf2f2252330204ffd02eb8::getLoader();
return ComposerAutoloaderInit0b93b0210b8b39c2a0b13410cd082de9::getLoader();
<?php
// autoload_classmap.php generated by Composer
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
......
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
return array(
$vendorDir . '/kriswallsmith/assetic/src/functions.php',
$baseDir . '/core/lib/Drupal.php',
);
\ No newline at end of file
<?php
// autoload_namespaces.php generated by Composer
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
......
<?php
// autoload_real.php generated by Composer
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit3a4905090abf2f2252330204ffd02eb8
class ComposerAutoloaderInit0b93b0210b8b39c2a0b13410cd082de9
{
private static $loader;
......@@ -19,9 +19,9 @@ public static function getLoader()
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit3a4905090abf2f2252330204ffd02eb8', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit0b93b0210b8b39c2a0b13410cd082de9', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit3a4905090abf2f2252330204ffd02eb8', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit0b93b0210b8b39c2a0b13410cd082de9', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir));
......@@ -42,8 +42,10 @@ public static function getLoader()
$loader->register(true);
require $vendorDir . '/kriswallsmith/assetic/src/functions.php';
require $baseDir . '/core/lib/Drupal.php';
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
require $file;
}
return $loader;
}
......
<?php
// include_paths.php generated by Composer
// include_paths.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -177,7 +177,7 @@ public function findFile($class)
$classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';
foreach ($this->prefixes as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
if ($class === strstr($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
return $dir.DIRECTORY_SEPARATOR.$classPath;
......
......@@ -104,6 +104,7 @@ public function handle($level, $message, $file = 'unknown', $line = 0, $context
$stack = array_map(
function ($row) {
unset($row['args']);
return $row;
},
array_slice(debug_backtrace(false), 0, 10)
......@@ -119,6 +120,11 @@ function ($row) {
}
if ($this->displayErrors && error_reporting() & $level && $this->level & $level) {
// make sure the ContextErrorException class is loaded (https://bugs.php.net/bug.php?id=65322)
if (!class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) {
require __DIR__.'/Exception/ContextErrorException.php';
}
throw new ContextErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line), 0, $level, $file, $line, $context);
}
......
......@@ -19,18 +19,18 @@
class ContextErrorException extends \ErrorException
{
private $context = array();
public function __construct($message, $code, $severity, $filename, $lineno, $context = array())
{
parent::__construct($message, $code, $severity, $filename, $lineno);
$this->context = $context;
}
/**
* @return array Array of variables that existed when the exception occured
*/
public function getContext()
{
return $this->context;
}
}
}
......@@ -20,6 +20,31 @@
*/
class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
{
public function testCompileTimeError()
{
// the ContextErrorException must not be loaded for this test to work
if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) {
$this->markTestSkipped('The ContextErrorException class is already loaded.');
}
$handler = ErrorHandler::register(E_ALL | E_STRICT);
$displayErrors = ini_get('display_errors');
ini_set('display_errors', '1');
try {
// trigger compile time error
eval(<<<'PHP'
class _BaseCompileTimeError { function foo() {} }
class _CompileTimeError extends _BaseCompileTimeError { function foo($invalid) {} }
PHP
);
} catch(\Exception $e) {
// if an exception is thrown, the test passed
}
ini_set('display_errors', $displayErrors);
restore_error_handler();
}
public function testConstruct()