diff --git a/core/composer.json b/core/composer.json
index eaf5983..70e7a0e 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -3,15 +3,15 @@
   "description": "Drupal is an open source content management platform powering millions of websites and applications.",
   "license": "GPL-2.0+",
   "require": {
-    "symfony/class-loader": "2.1.*",
-    "symfony/dependency-injection": "2.1.*",
-    "symfony/event-dispatcher": "2.1.*",
-    "symfony/http-foundation": "2.1.*",
-    "symfony/http-kernel": "2.1.*",
-    "symfony/routing": "2.1.*",
-    "symfony/serializer": "2.1.*",
-    "symfony/yaml": "2.1.*",
-    "twig/twig": "1.8.*",
+    "symfony/class-loader": "<2.4@dev",
+    "symfony/dependency-injection": "<2.4@dev",
+    "symfony/event-dispatcher": "<2.4@dev",
+    "symfony/http-foundation": "<2.4@dev",
+    "symfony/http-kernel": "<2.4@dev",
+    "symfony/routing": "<2.4@dev",
+    "symfony/serializer": "<2.4@dev",
+    "symfony/yaml": "<2.4@dev",
+    "twig/twig": "1.*",
     "doctrine/common": "2.3.*",
     "kriswallsmith/assetic": "1.1.*"
   },
diff --git a/core/composer.lock b/core/composer.lock
index 5c8cd01..0b0b67c 100644
--- a/core/composer.lock
+++ b/core/composer.lock
@@ -1,53 +1,659 @@
 {
-    "hash": "be2e79923e2be0777a9f60ec185168a8",
+    "hash": "1a2c52fedf8d9a23498df41568d82ff4",
     "packages": [
         {
-            "package": "doctrine/common",
-            "version": "2.3.0-RC2"
+            "name": "doctrine/common",
+            "version": "2.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/common",
+                "reference": "2.3.0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/doctrine/common/zipball/2.3.0",
+                "reference": "2.3.0",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.2"
+            },
+            "time": "2012-09-19 22:55:18",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.3.x-dev"
+                }
+            },
+            "installation-source": "dist",
+            "autoload": {
+                "psr-0": {
+                    "Doctrine\\Common": "lib/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jonathan Wage",
+                    "email": "jonwage@gmail.com",
+                    "homepage": "http://www.jwage.com/"
+                },
+                {
+                    "name": "Guilherme Blanco",
+                    "email": "guilhermeblanco@gmail.com",
+                    "homepage": "http://www.instaclick.com"
+                },
+                {
+                    "name": "Roman Borschel",
+                    "email": "roman@code-factory.org"
+                },
+                {
+                    "name": "Benjamin Eberlei",
+                    "email": "kontakt@beberlei.de"
+                },
+                {
+                    "name": "Johannes Schmitt",
+                    "email": "schmittjoh@gmail.com",
+                    "homepage": "http://jmsyst.com",
+                    "role": "Developer of wrapped JMSSerializerBundle"
+                }
+            ],
+            "description": "Common Library for Doctrine projects",
+            "homepage": "http://www.doctrine-project.org",
+            "keywords": [
+                "collections",
+                "spl",
+                "eventmanager",
+                "annotations",
+                "persistence"
+            ]
         },
         {
-            "package": "symfony/class-loader",
-            "version": "v2.1.0-RC2"
+            "name": "kriswallsmith/assetic",
+            "version": "v1.1.0-alpha1",
+            "source": {
+                "type": "git",
+                "url": "http://github.com/kriswallsmith/assetic.git",
+                "reference": "v1.1.0-alpha1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/kriswallsmith/assetic/zipball/v1.1.0-alpha1",
+                "reference": "v1.1.0-alpha1",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.1",
+                "symfony/process": "2.1.*"
+            },
+            "require-dev": {
+                "twig/twig": ">=1.6.0,<2.0",
+                "leafo/lessphp": "*",
+                "leafo/scssphp": "*",
+                "ptachoire/cssembed": "*"
+            },
+            "suggest": {
+                "twig/twig": "Assetic provides the integration with the Twig templating engine",
+                "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
+                "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler",
+                "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris"
+            },
+            "time": "2012-08-28 05:33:44",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1-dev"
+                }
+            },
+            "installation-source": "dist",
+            "autoload": {
+                "psr-0": {
+                    "Assetic": "src/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Kris Wallsmith",
+                    "email": "kris.wallsmith@gmail.com",
+                    "homepage": "http://kriswallsmith.net/"
+                }
+            ],
+            "description": "Asset Management for PHP",
+            "homepage": "https://github.com/kriswallsmith/assetic",
+            "keywords": [
+                "assets",
+                "compression",
+                "minification"
+            ]
         },
         {
-            "package": "symfony/dependency-injection",
-            "version": "v2.1.0-RC2"
+            "name": "symfony/class-loader",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/ClassLoader",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/ClassLoader",
+                "reference": "2d1cdaebc9d5a38750bc420cd6ea66d0dfa98c59"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/ClassLoader/archive/2d1cdaebc9d5a38750bc420cd6ea66d0dfa98c59.zip",
+                "reference": "2d1cdaebc9d5a38750bc420cd6ea66d0dfa98c59",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "symfony/finder": "2.2.*"
+            },
+            "time": "1351353577",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\ClassLoader\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony ClassLoader Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "symfony/event-dispatcher",
-            "version": "v2.1.0-RC2"
+            "name": "symfony/dependency-injection",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/DependencyInjection",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/DependencyInjection",
+                "reference": "c39ee4ea93a14fafd27ba30ab74720aa5653f430"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/DependencyInjection/archive/c39ee4ea93a14fafd27ba30ab74720aa5653f430.zip",
+                "reference": "c39ee4ea93a14fafd27ba30ab74720aa5653f430",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "symfony/yaml": "2.2.*",
+                "symfony/config": "2.2.*"
+            },
+            "suggest": {
+                "symfony/yaml": "2.2.*",
+                "symfony/config": "2.2.*"
+            },
+            "time": "1351093287",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\DependencyInjection\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony DependencyInjection Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "symfony/http-foundation",
-            "version": "v2.1.0-RC2"
+            "name": "symfony/event-dispatcher",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/EventDispatcher",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/EventDispatcher",
+                "reference": "24a1039d52b6b9f533cb73dcb96c7748262db686"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/EventDispatcher/archive/24a1039d52b6b9f533cb73dcb96c7748262db686.zip",
+                "reference": "24a1039d52b6b9f533cb73dcb96c7748262db686",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "symfony/dependency-injection": "2.2.*"
+            },
+            "suggest": {
+                "symfony/dependency-injection": "2.2.*",
+                "symfony/http-kernel": "2.2.*"
+            },
+            "time": "1349553479",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\EventDispatcher\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony EventDispatcher Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "symfony/http-kernel",
-            "version": "v2.1.0-RC2"
+            "name": "symfony/http-foundation",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/HttpFoundation",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/HttpFoundation",
+                "reference": "61c1551f4e429fda1609ed0c8aa5a194ace599ec"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/HttpFoundation/archive/61c1551f4e429fda1609ed0c8aa5a194ace599ec.zip",
+                "reference": "61c1551f4e429fda1609ed0c8aa5a194ace599ec",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "time": "1352231732",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\HttpFoundation\\": ""
+                },
+                "classmap": [
+                    "Symfony/Component/HttpFoundation/Resources/stubs"
+                ]
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony HttpFoundation Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "symfony/process",
-            "version": "v2.1.0-RC2"
+            "name": "symfony/http-kernel",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/HttpKernel",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/HttpKernel",
+                "reference": "4dcb0bf602788342fb80c28c6e28be818839d417"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/HttpKernel/archive/4dcb0bf602788342fb80c28c6e28be818839d417.zip",
+                "reference": "4dcb0bf602788342fb80c28c6e28be818839d417",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "symfony/event-dispatcher": "2.2.*",
+                "symfony/http-foundation": "2.2.*"
+            },
+            "require-dev": {
+                "symfony/browser-kit": "2.2.*",
+                "symfony/class-loader": "2.2.*",
+                "symfony/config": "2.2.*",
+                "symfony/console": "2.2.*",
+                "symfony/dependency-injection": "2.2.*",
+                "symfony/finder": "2.2.*",
+                "symfony/process": "2.2.*",
+                "symfony/routing": "2.2.*"
+            },
+            "suggest": {
+                "symfony/browser-kit": "2.2.*",
+                "symfony/class-loader": "2.2.*",
+                "symfony/config": "2.2.*",
+                "symfony/console": "2.2.*",
+                "symfony/dependency-injection": "2.2.*",
+                "symfony/finder": "2.2.*"
+            },
+            "time": "1351530455",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\HttpKernel\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony HttpKernel Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "symfony/routing",
-            "version": "v2.1.0-RC2"
+            "name": "symfony/process",
+            "version": "v2.1.3",
+            "target-dir": "Symfony/Component/Process",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/Process",
+                "reference": "v2.1.3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/Process/zipball/v2.1.3",
+                "reference": "v2.1.3",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "time": "2012-10-20 00:10:30",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "installation-source": "dist",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\Process": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Process Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "symfony/serializer",
-            "version": "v2.1.2"
+            "name": "symfony/routing",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/Routing",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/Routing",
+                "reference": "b4c39ea080cfcce4efbfa90fc6cac4222c36432b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/Routing/zipball/b4c39ea080cfcce4efbfa90fc6cac4222c36432b",
+                "reference": "b4c39ea080cfcce4efbfa90fc6cac4222c36432b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "doctrine/common": ">=2.2,<2.4-dev",
+                "symfony/config": "2.2.*",
+                "symfony/yaml": "2.2.*",
+                "symfony/http-kernel": "2.2.*"
+            },
+            "suggest": {
+                "doctrine/common": ">=2.2,<2.4-dev",
+                "symfony/config": "2.2.*",
+                "symfony/yaml": "2.2.*"
+            },
+            "time": "1352017821",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\Routing\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Routing Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "symfony/yaml",
-            "version": "v2.1.0-RC2"
+            "name": "symfony/serializer",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/Serializer",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/Serializer",
+                "reference": "dac97be810125b025f6dedff302bf32bd47179c8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/Serializer/archive/dac97be810125b025f6dedff302bf32bd47179c8.zip",
+                "reference": "dac97be810125b025f6dedff302bf32bd47179c8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "time": "1351093287",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\Serializer\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Serializer Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "twig/twig",
-            "version": "v1.8.3"
+            "name": "symfony/yaml",
+            "version": "dev-master",
+            "target-dir": "Symfony/Component/Yaml",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/Yaml",
+                "reference": "5435fd7bd42dbea42fbfc5aec6bf3274c3bb38ed"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/symfony/Yaml/zipball/5435fd7bd42dbea42fbfc5aec6bf3274c3bb38ed",
+                "reference": "5435fd7bd42dbea42fbfc5aec6bf3274c3bb38ed",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "time": "1352017796",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.2-dev"
+                }
+            },
+            "installation-source": "source",
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\Yaml\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Yaml Component",
+            "homepage": "http://symfony.com"
         },
         {
-            "package": "kriswallsmith/assetic",
-            "version": "v1.1.0-alpha1"
+            "name": "twig/twig",
+            "version": "v1.11.0",
+            "source": {
+                "type": "git",
+                "url": "git://github.com/fabpot/Twig.git",
+                "reference": "v1.11.0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://github.com/fabpot/Twig/archive/v1.11.0.zip",
+                "reference": "v1.11.0",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.2.4"
+            },
+            "time": "2012-11-07 11:20:21",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.11-dev"
+                }
+            },
+            "installation-source": "dist",
+            "autoload": {
+                "psr-0": {
+                    "Twig_": "lib/"
+                }
+            },
+            "license": [
+                "BSD-3"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Armin Ronacher",
+                    "email": "armin.ronacher@active-4.com"
+                }
+            ],
+            "description": "Twig, the flexible, fast, and secure template language for PHP",
+            "homepage": "http://twig.sensiolabs.org",
+            "keywords": [
+                "templating"
+            ]
         }
     ],
     "packages-dev": null,
@@ -55,7 +661,14 @@

     ],
     "minimum-stability": "alpha",
-    "stability-flags": [
-
-    ]
+    "stability-flags": {
+        "symfony/class-loader": 20,
+        "symfony/dependency-injection": 20,
+        "symfony/event-dispatcher": 20,
+        "symfony/http-foundation": 20,
+        "symfony/http-kernel": 20,
+        "symfony/routing": 20,
+        "symfony/serializer": 20,
+        "symfony/yaml": 20
+    }
 }
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 5577be4..899fc54 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2,8 +2,8 @@

 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Database\Database;
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-use Symfony\Component\ClassLoader\ApcUniversalClassLoader;
+use Symfony\Component\ClassLoader\ClassLoader;
+use Symfony\Component\ClassLoader\ApcClassLoader;
 use Symfony\Component\DependencyInjection\Container;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Reference;
@@ -3123,22 +3123,23 @@ function drupal_classloader() {

   if (!isset($loader)) {
     // Include the Symfony ClassLoader for loading PSR-0-compatible classes.
-    require_once DRUPAL_ROOT . '/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php';
+    require_once DRUPAL_ROOT . '/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassLoader.php';
+    $loader = new ClassLoader();

-    // @todo Use a cleaner way than variable_get() to switch autoloaders.
+    // Register the loader with APC if it's desired.
     switch (variable_get('autoloader_mode', 'default')) {
       case 'apc':
         if (function_exists('apc_store')) {
-          require_once DRUPAL_ROOT . '/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php';
-          $loader = new ApcUniversalClassLoader('drupal.' . $GLOBALS['drupal_hash_salt']);
+          require_once DRUPAL_ROOT . '/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ApcClassLoader.php';
+          $apcloader = new ApcClassLoader('drupal.' . $GLOBALS['drupal_hash_salt'], $loader);
+          $apcloader->register();
           break;
         }
-      // Fall through to the default loader if APC was not loaded, so that the
-      // site does not fail completely.
+      // Fall through to register the default loader if APC was not loaded.
       case 'dev':
       case 'default':
       default:
-        $loader = new UniversalClassLoader();
+        $loader->register();
         break;
     }

@@ -3146,30 +3147,14 @@ function drupal_classloader() {
     // The majority of namespaces that need to be resolved are from Drupal core,
     // so registering/setting them before vendor libraries saves a few
     // additional cycles per class lookup.
-    $loader->registerNamespaces(array(
+    $loader->addPrefixes(array(
       'Drupal\Core' => DRUPAL_ROOT . '/core/lib',
       'Drupal\Component' => DRUPAL_ROOT . '/core/lib',
     ));

     // Register namespaces for vendor libraries managed by Composer.
     $namespaces = require DRUPAL_ROOT . '/core/vendor/composer/autoload_namespaces.php';
-    $prefixes = array();
-    foreach ($namespaces as $namespace => $path) {
-      // Composer combines libraries that use PHP 5.3 namespaces and ones that
-      // use PEAR-style class prefixes in a single array, but the Symfony class
-      // loader requires them to be registered separately. PSR-0 disallows
-      // underscores in namespace names and requires at least one in a
-      // PEAR-style class prefix.
-      if (strpos($namespace, '_') !== FALSE) {
-        $prefixes[$namespace] = $path;
-        unset($namespaces[$namespace]);
-      }
-    }
-    $loader->registerPrefixes($prefixes);
-    $loader->registerNamespaces($namespaces);
-
-    // Register the loader with PHP.
-    $loader->register();
+    $loader->addPrefixes($namespaces);
   }
   return $loader;
 }
@@ -3184,7 +3169,7 @@ function drupal_classloader() {
  */
 function drupal_classloader_register($name, $path) {
   $loader = drupal_classloader();
-  $loader->registerNamespace('Drupal\\' . $name, DRUPAL_ROOT . '/' . $path . '/lib');
+  $loader->addPrefix('Drupal\\' . $name, DRUPAL_ROOT . '/' . $path . '/lib');
 }

 /**
diff --git a/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php
index bd89a92..6fc3401 100644
--- a/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php
+++ b/core/lib/Drupal/Core/Plugin/Discovery/AnnotatedClassDiscovery.php
@@ -48,7 +48,7 @@ public function getDefinitions() {
     // Register the namespace of classes that can be used for annotations.
     AnnotationRegistry::registerAutoloadNamespace('Drupal\Core\Annotation', array(DRUPAL_ROOT . '/core/lib'));
     // Get all PSR-0 namespaces.
-    $namespaces = drupal_classloader()->getNamespaces();
+    $namespaces = drupal_classloader()->getPrefixes();
     foreach ($namespaces as $ns => $namespace_dirs) {

       // OS-Safe directory separators.
diff --git a/core/vendor/composer/ClassLoader.php b/core/vendor/composer/ClassLoader.php
index 00623e3..a4a0dc5 100644
--- a/core/vendor/composer/ClassLoader.php
+++ b/core/vendor/composer/ClassLoader.php
@@ -162,14 +162,14 @@ public function loadClass($class)
      */
     public function findFile($class)
     {
-        if (isset($this->classMap[$class])) {
-            return $this->classMap[$class];
-        }
-
         if ('\\' == $class[0]) {
             $class = substr($class, 1);
         }

+        if (isset($this->classMap[$class])) {
+            return $this->classMap[$class];
+        }
+
         if (false !== $pos = strrpos($class, '\\')) {
             // namespaced class name
             $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
@@ -202,6 +202,6 @@ public function findFile($class)
             return $file;
         }

-        $this->classMap[$class] = false;
+        return $this->classMap[$class] = false;
     }
 }
diff --git a/core/vendor/composer/autoload_classmap.php b/core/vendor/composer/autoload_classmap.php
index 4a9177d..590381a 100644
--- a/core/vendor/composer/autoload_classmap.php
+++ b/core/vendor/composer/autoload_classmap.php
@@ -6,4 +6,5 @@
 $baseDir = dirname($vendorDir);

 return array(
+    'SessionHandlerInterface' => $baseDir . '/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php',
 );
diff --git a/core/vendor/composer/autoload_namespaces.php b/core/vendor/composer/autoload_namespaces.php
index c278de2..93ac235 100644
--- a/core/vendor/composer/autoload_namespaces.php
+++ b/core/vendor/composer/autoload_namespaces.php
@@ -7,16 +7,15 @@

 return array(
     'Twig_' => $vendorDir . '/twig/twig/lib/',
-    'Symfony\\Component\\Yaml' => $vendorDir . '/symfony/yaml/',
-    'Symfony\\Component\\Serializer' => $vendorDir . '/symfony/serializer/',
-    'Symfony\\Component\\Routing' => $vendorDir . '/symfony/routing/',
+    'Symfony\\Component\\Yaml\\' => $vendorDir . '/symfony/yaml/',
+    'Symfony\\Component\\Serializer\\' => $vendorDir . '/symfony/serializer/',
+    'Symfony\\Component\\Routing\\' => $vendorDir . '/symfony/routing/',
     'Symfony\\Component\\Process' => $vendorDir . '/symfony/process/',
-    'Symfony\\Component\\HttpKernel' => $vendorDir . '/symfony/http-kernel/',
-    'Symfony\\Component\\HttpFoundation' => $vendorDir . '/symfony/http-foundation/',
-    'Symfony\\Component\\EventDispatcher' => $vendorDir . '/symfony/event-dispatcher/',
-    'Symfony\\Component\\DependencyInjection' => $vendorDir . '/symfony/dependency-injection/',
-    'Symfony\\Component\\ClassLoader' => $vendorDir . '/symfony/class-loader/',
-    'SessionHandlerInterface' => $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs',
+    'Symfony\\Component\\HttpKernel\\' => $vendorDir . '/symfony/http-kernel/',
+    'Symfony\\Component\\HttpFoundation\\' => $vendorDir . '/symfony/http-foundation/',
+    'Symfony\\Component\\EventDispatcher\\' => $vendorDir . '/symfony/event-dispatcher/',
+    'Symfony\\Component\\DependencyInjection\\' => $vendorDir . '/symfony/dependency-injection/',
+    'Symfony\\Component\\ClassLoader\\' => $vendorDir . '/symfony/class-loader/',
     'Doctrine\\Common' => $vendorDir . '/doctrine/common/lib/',
     'Assetic' => $vendorDir . '/kriswallsmith/assetic/src/',
 );
diff --git a/core/vendor/composer/autoload_real.php b/core/vendor/composer/autoload_real.php
index 7d64f49..9028b73 100644
--- a/core/vendor/composer/autoload_real.php
+++ b/core/vendor/composer/autoload_real.php
@@ -6,9 +6,15 @@

 class ComposerAutoloaderInit
 {
+    private static $loader;
+
     public static function getLoader()
     {
-        $loader = new \Composer\Autoload\ClassLoader();
+        if (null !== static::$loader) {
+            return static::$loader;
+        }
+
+        static::$loader = $loader = new \Composer\Autoload\ClassLoader();
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);

diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json
index 3fe9a18..2c711eb 100644
--- a/core/vendor/composer/installed.json
+++ b/core/vendor/composer/installed.json
@@ -1,141 +1,156 @@
 [
     {
-        "name": "twig/twig",
-        "version": "v1.8.3",
-        "version_normalized": "1.8.3.0",
-        "time": "2012-06-18 18:48:16",
+        "name": "kriswallsmith/assetic",
+        "version": "v1.1.0-alpha1",
+        "version_normalized": "1.1.0.0-alpha1",
         "source": {
             "type": "git",
-            "url": "git://github.com/fabpot/Twig.git",
-            "reference": "v1.8.3"
+            "url": "http://github.com/kriswallsmith/assetic.git",
+            "reference": "v1.1.0-alpha1"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/fabpot/Twig/zipball/v1.8.3",
-            "reference": "v1.8.3",
+            "url": "https://github.com/kriswallsmith/assetic/zipball/v1.1.0-alpha1",
+            "reference": "v1.1.0-alpha1",
             "shasum": ""
         },
         "require": {
-            "php": ">=5.2.4"
+            "php": ">=5.3.1",
+            "symfony/process": "2.1.*"
+        },
+        "require-dev": {
+            "twig/twig": ">=1.6.0,<2.0",
+            "leafo/lessphp": "*",
+            "leafo/scssphp": "*",
+            "ptachoire/cssembed": "*"
+        },
+        "suggest": {
+            "twig/twig": "Assetic provides the integration with the Twig templating engine",
+            "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
+            "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler",
+            "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris"
         },
+        "time": "2012-08-28 05:33:44",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "1.8-dev"
+                "dev-master": "1.1-dev"
             }
         },
         "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Assetic": "src/"
+            }
+        },
         "license": [
-            "BSD-3"
+            "MIT"
         ],
         "authors": [
             {
-                "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
-            },
-            {
-                "name": "Armin Ronacher",
-                "email": "armin.ronacher@active-4.com",
-                "homepage": null,
-                "role": null
+                "name": "Kris Wallsmith",
+                "email": "kris.wallsmith@gmail.com",
+                "homepage": "http://kriswallsmith.net/"
             }
         ],
-        "description": "Twig, the flexible, fast, and secure template language for PHP",
-        "homepage": "http://twig.sensiolabs.org",
+        "description": "Asset Management for PHP",
+        "homepage": "https://github.com/kriswallsmith/assetic",
         "keywords": [
-            "templating"
-        ],
-        "autoload": {
-            "psr-0": {
-                "Twig_": "lib/"
-            }
-        }
+            "assets",
+            "compression",
+            "minification"
+        ]
     },
     {
-        "name": "symfony/class-loader",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/ClassLoader",
-        "time": "2012-08-27 14:51:49",
+        "name": "doctrine/common",
+        "version": "2.3.0",
+        "version_normalized": "2.3.0.0",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/ClassLoader",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/doctrine/common",
+            "reference": "2.3.0"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/ClassLoader/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/doctrine/common/zipball/2.3.0",
+            "reference": "2.3.0",
             "shasum": ""
         },
         "require": {
-            "php": ">=5.3.3"
-        },
-        "require-dev": {
-            "symfony/finder": "2.1.*"
+            "php": ">=5.3.2"
         },
+        "time": "2012-09-19 22:55:18",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.1-dev"
+                "dev-master": "2.3.x-dev"
             }
         },
         "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Doctrine\\Common": "lib/"
+            }
+        },
         "license": [
             "MIT"
         ],
         "authors": [
             {
-                "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
+                "name": "Jonathan Wage",
+                "email": "jonwage@gmail.com",
+                "homepage": "http://www.jwage.com/"
             },
             {
-                "name": "Symfony Community",
-                "email": null,
-                "homepage": "http://symfony.com/contributors",
-                "role": null
+                "name": "Guilherme Blanco",
+                "email": "guilhermeblanco@gmail.com",
+                "homepage": "http://www.instaclick.com"
+            },
+            {
+                "name": "Roman Borschel",
+                "email": "roman@code-factory.org"
+            },
+            {
+                "name": "Benjamin Eberlei",
+                "email": "kontakt@beberlei.de"
+            },
+            {
+                "name": "Johannes Schmitt",
+                "email": "schmittjoh@gmail.com",
+                "homepage": "http://jmsyst.com",
+                "role": "Developer of wrapped JMSSerializerBundle"
             }
         ],
-        "description": "Symfony ClassLoader Component",
-        "homepage": "http://symfony.com",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\ClassLoader": ""
-            }
-        }
+        "description": "Common Library for Doctrine projects",
+        "homepage": "http://www.doctrine-project.org",
+        "keywords": [
+            "collections",
+            "spl",
+            "eventmanager",
+            "annotations",
+            "persistence"
+        ]
     },
     {
-        "name": "symfony/dependency-injection",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/DependencyInjection",
-        "time": "2012-08-28 06:54:42",
+        "name": "symfony/process",
+        "version": "v2.1.3",
+        "version_normalized": "2.1.3.0",
+        "target-dir": "Symfony/Component/Process",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/DependencyInjection",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/symfony/Process",
+            "reference": "v2.1.3"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/DependencyInjection/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/symfony/Process/zipball/v2.1.3",
+            "reference": "v2.1.3",
             "shasum": ""
         },
         "require": {
             "php": ">=5.3.3"
         },
-        "require-dev": {
-            "symfony/yaml": "2.1.*",
-            "symfony/config": "2.1.*"
-        },
-        "suggest": {
-            "symfony/yaml": "v2.1.0-RC2",
-            "symfony/config": "v2.1.0-RC2"
-        },
+        "time": "2012-10-20 00:10:30",
         "type": "library",
         "extra": {
             "branch-alias": {
@@ -143,433 +158,449 @@
             }
         },
         "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\Process": ""
+            }
+        },
         "license": [
             "MIT"
         ],
         "authors": [
             {
                 "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
+                "email": "fabien@symfony.com"
             },
             {
                 "name": "Symfony Community",
-                "email": null,
-                "homepage": "http://symfony.com/contributors",
-                "role": null
+                "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Symfony DependencyInjection Component",
-        "homepage": "http://symfony.com",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\DependencyInjection": ""
-            }
-        }
+        "description": "Symfony Process Component",
+        "homepage": "http://symfony.com"
     },
     {
-        "name": "doctrine/common",
-        "version": "2.3.0-RC2",
-        "version_normalized": "2.3.0.0-RC2",
-        "time": "2012-08-29 13:06:32",
+        "name": "twig/twig",
+        "version": "v1.11.0",
+        "version_normalized": "1.11.0.0",
         "source": {
             "type": "git",
-            "url": "https://github.com/doctrine/common",
-            "reference": "2.3.0-RC2"
+            "url": "git://github.com/fabpot/Twig.git",
+            "reference": "v1.11.0"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/doctrine/common/zipball/2.3.0-RC2",
-            "reference": "2.3.0-RC2",
+            "url": "https://github.com/fabpot/Twig/archive/v1.11.0.zip",
+            "reference": "v1.11.0",
             "shasum": ""
         },
         "require": {
-            "php": ">=5.3.2"
+            "php": ">=5.2.4"
         },
+        "time": "2012-11-07 11:20:21",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.3.x-dev"
+                "dev-master": "1.11-dev"
             }
         },
         "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Twig_": "lib/"
+            }
+        },
         "license": [
-            "MIT"
+            "BSD-3"
         ],
         "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": "Fabien Potencier",
+                "email": "fabien@symfony.com"
             },
             {
-                "name": "Johannes Schmitt",
-                "email": "schmittjoh@gmail.com",
-                "homepage": "http://jmsyst.com",
-                "role": "Developer of wrapped JMSSerializerBundle"
+                "name": "Armin Ronacher",
+                "email": "armin.ronacher@active-4.com"
             }
         ],
-        "description": "Common Library for Doctrine projects",
-        "homepage": "http://www.doctrine-project.org",
+        "description": "Twig, the flexible, fast, and secure template language for PHP",
+        "homepage": "http://twig.sensiolabs.org",
         "keywords": [
-            "collections",
-            "spl",
-            "eventmanager",
-            "annotations",
-            "persistence"
-        ],
-        "autoload": {
-            "psr-0": {
-                "Doctrine\\Common": "lib/"
-            }
-        }
+            "templating"
+        ]
     },
     {
-        "name": "symfony/http-foundation",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/HttpFoundation",
-        "time": "2012-08-22 12:48:41",
+        "name": "symfony/class-loader",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/ClassLoader",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/HttpFoundation",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/symfony/ClassLoader",
+            "reference": "2d1cdaebc9d5a38750bc420cd6ea66d0dfa98c59"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/HttpFoundation/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/symfony/ClassLoader/archive/2d1cdaebc9d5a38750bc420cd6ea66d0dfa98c59.zip",
+            "reference": "2d1cdaebc9d5a38750bc420cd6ea66d0dfa98c59",
             "shasum": ""
         },
         "require": {
             "php": ">=5.3.3"
         },
+        "require-dev": {
+            "symfony/finder": "2.2.*"
+        },
+        "time": "2012-10-27 08:59:37",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.1-dev"
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\ClassLoader\\": ""
             }
         },
-        "installation-source": "dist",
         "license": [
             "MIT"
         ],
         "authors": [
             {
                 "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
+                "email": "fabien@symfony.com"
             },
             {
                 "name": "Symfony Community",
-                "email": null,
-                "homepage": "http://symfony.com/contributors",
-                "role": null
+                "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Symfony HttpFoundation Component",
-        "homepage": "http://symfony.com",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\HttpFoundation": "",
-                "SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs"
-            }
-        }
+        "description": "Symfony ClassLoader Component",
+        "homepage": "http://symfony.com"
     },
     {
-        "name": "symfony/event-dispatcher",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/EventDispatcher",
-        "time": "2012-08-22 12:48:41",
+        "name": "symfony/dependency-injection",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/DependencyInjection",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/EventDispatcher",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/symfony/DependencyInjection",
+            "reference": "c39ee4ea93a14fafd27ba30ab74720aa5653f430"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/EventDispatcher/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/symfony/DependencyInjection/archive/c39ee4ea93a14fafd27ba30ab74720aa5653f430.zip",
+            "reference": "c39ee4ea93a14fafd27ba30ab74720aa5653f430",
             "shasum": ""
         },
         "require": {
             "php": ">=5.3.3"
         },
         "require-dev": {
-            "symfony/dependency-injection": "2.1.*"
+            "symfony/yaml": "2.2.*",
+            "symfony/config": "2.2.*"
         },
         "suggest": {
-            "symfony/dependency-injection": "v2.1.0-RC2",
-            "symfony/http-kernel": "v2.1.0-RC2"
+            "symfony/yaml": "2.2.*",
+            "symfony/config": "2.2.*"
         },
+        "time": "2012-10-24 08:41:27",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.1-dev"
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\DependencyInjection\\": ""
             }
         },
-        "installation-source": "dist",
         "license": [
             "MIT"
         ],
         "authors": [
             {
                 "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
+                "email": "fabien@symfony.com"
             },
             {
                 "name": "Symfony Community",
-                "email": null,
-                "homepage": "http://symfony.com/contributors",
-                "role": null
+                "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Symfony EventDispatcher Component",
-        "homepage": "http://symfony.com",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\EventDispatcher": ""
-            }
-        }
+        "description": "Symfony DependencyInjection Component",
+        "homepage": "http://symfony.com"
     },
     {
-        "name": "symfony/http-kernel",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/HttpKernel",
-        "time": "2012-08-28 07:00:18",
+        "name": "symfony/event-dispatcher",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/EventDispatcher",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/HttpKernel",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/symfony/EventDispatcher",
+            "reference": "24a1039d52b6b9f533cb73dcb96c7748262db686"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/HttpKernel/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/symfony/EventDispatcher/archive/24a1039d52b6b9f533cb73dcb96c7748262db686.zip",
+            "reference": "24a1039d52b6b9f533cb73dcb96c7748262db686",
             "shasum": ""
         },
         "require": {
-            "php": ">=5.3.3",
-            "symfony/event-dispatcher": "2.1.*",
-            "symfony/http-foundation": "2.1.*"
+            "php": ">=5.3.3"
         },
         "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.*"
+            "symfony/dependency-injection": "2.2.*"
         },
         "suggest": {
-            "symfony/browser-kit": "v2.1.0-RC2",
-            "symfony/class-loader": "v2.1.0-RC2",
-            "symfony/config": "v2.1.0-RC2",
-            "symfony/console": "v2.1.0-RC2",
-            "symfony/dependency-injection": "v2.1.0-RC2",
-            "symfony/finder": "v2.1.0-RC2"
+            "symfony/dependency-injection": "2.2.*",
+            "symfony/http-kernel": "2.2.*"
         },
+        "time": "2012-10-06 12:57:59",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.1-dev"
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\EventDispatcher\\": ""
             }
         },
-        "installation-source": "dist",
         "license": [
             "MIT"
         ],
         "authors": [
             {
                 "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
+                "email": "fabien@symfony.com"
             },
             {
                 "name": "Symfony Community",
-                "email": null,
-                "homepage": "http://symfony.com/contributors",
-                "role": null
+                "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Symfony HttpKernel Component",
-        "homepage": "http://symfony.com",
+        "description": "Symfony EventDispatcher Component",
+        "homepage": "http://symfony.com"
+    },
+    {
+        "name": "symfony/http-foundation",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/HttpFoundation",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/symfony/HttpFoundation",
+            "reference": "61c1551f4e429fda1609ed0c8aa5a194ace599ec"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://github.com/symfony/HttpFoundation/archive/61c1551f4e429fda1609ed0c8aa5a194ace599ec.zip",
+            "reference": "61c1551f4e429fda1609ed0c8aa5a194ace599ec",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.3"
+        },
+        "time": "2012-11-06 19:55:32",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
         "autoload": {
             "psr-0": {
-                "Symfony\\Component\\HttpKernel": ""
+                "Symfony\\Component\\HttpFoundation\\": ""
+            },
+            "classmap": [
+                "Symfony/Component/HttpFoundation/Resources/stubs"
+            ]
+        },
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Fabien Potencier",
+                "email": "fabien@symfony.com"
+            },
+            {
+                "name": "Symfony Community",
+                "homepage": "http://symfony.com/contributors"
             }
-        }
+        ],
+        "description": "Symfony HttpFoundation Component",
+        "homepage": "http://symfony.com"
     },
     {
-        "name": "symfony/routing",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/Routing",
-        "time": "2012-08-28 06:54:42",
+        "name": "symfony/http-kernel",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/HttpKernel",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/Routing",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/symfony/HttpKernel",
+            "reference": "4dcb0bf602788342fb80c28c6e28be818839d417"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/Routing/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/symfony/HttpKernel/archive/4dcb0bf602788342fb80c28c6e28be818839d417.zip",
+            "reference": "4dcb0bf602788342fb80c28c6e28be818839d417",
             "shasum": ""
         },
         "require": {
-            "php": ">=5.3.3"
+            "php": ">=5.3.3",
+            "symfony/event-dispatcher": "2.2.*",
+            "symfony/http-foundation": "2.2.*"
         },
         "require-dev": {
-            "symfony/config": "2.1.*",
-            "symfony/yaml": "2.1.*",
-            "symfony/http-kernel": "2.1.*",
-            "doctrine/common": ">=2.2,<2.4-dev"
+            "symfony/browser-kit": "2.2.*",
+            "symfony/class-loader": "2.2.*",
+            "symfony/config": "2.2.*",
+            "symfony/console": "2.2.*",
+            "symfony/dependency-injection": "2.2.*",
+            "symfony/finder": "2.2.*",
+            "symfony/process": "2.2.*",
+            "symfony/routing": "2.2.*"
         },
         "suggest": {
-            "symfony/config": "v2.1.0-RC2",
-            "symfony/yaml": "v2.1.0-RC2",
-            "doctrine/common": ">=2.2,<2.4-dev"
-        },
+            "symfony/browser-kit": "2.2.*",
+            "symfony/class-loader": "2.2.*",
+            "symfony/config": "2.2.*",
+            "symfony/console": "2.2.*",
+            "symfony/dependency-injection": "2.2.*",
+            "symfony/finder": "2.2.*"
+        },
+        "time": "2012-10-29 10:07:35",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.1-dev"
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\HttpKernel\\": ""
             }
         },
-        "installation-source": "dist",
         "license": [
             "MIT"
         ],
         "authors": [
             {
                 "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
+                "email": "fabien@symfony.com"
             },
             {
                 "name": "Symfony Community",
-                "email": null,
-                "homepage": "http://symfony.com/contributors",
-                "role": null
+                "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Symfony Routing Component",
-        "homepage": "http://symfony.com",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\Routing": ""
-            }
-        }
+        "description": "Symfony HttpKernel Component",
+        "homepage": "http://symfony.com"
     },
     {
-        "name": "symfony/yaml",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/Yaml",
-        "time": "2012-08-22 12:48:41",
+        "name": "symfony/routing",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/Routing",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/Yaml",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/symfony/Routing",
+            "reference": "b4c39ea080cfcce4efbfa90fc6cac4222c36432b"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/Yaml/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/symfony/Routing/zipball/b4c39ea080cfcce4efbfa90fc6cac4222c36432b",
+            "reference": "b4c39ea080cfcce4efbfa90fc6cac4222c36432b",
             "shasum": ""
         },
         "require": {
             "php": ">=5.3.3"
         },
+        "require-dev": {
+            "doctrine/common": ">=2.2,<2.4-dev",
+            "symfony/config": "2.2.*",
+            "symfony/yaml": "2.2.*",
+            "symfony/http-kernel": "2.2.*"
+        },
+        "suggest": {
+            "doctrine/common": ">=2.2,<2.4-dev",
+            "symfony/config": "2.2.*",
+            "symfony/yaml": "2.2.*"
+        },
+        "time": "2012-11-04 08:30:21",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.1-dev"
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\Routing\\": ""
             }
         },
-        "installation-source": "dist",
         "license": [
             "MIT"
         ],
         "authors": [
             {
                 "name": "Fabien Potencier",
-                "email": "fabien@symfony.com",
-                "homepage": null,
-                "role": null
+                "email": "fabien@symfony.com"
             },
             {
                 "name": "Symfony Community",
-                "email": null,
-                "homepage": "http://symfony.com/contributors",
-                "role": null
+                "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Symfony Yaml Component",
-        "homepage": "http://symfony.com",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\Yaml": ""
-            }
-        }
+        "description": "Symfony Routing Component",
+        "homepage": "http://symfony.com"
     },
     {
-        "name": "symfony/process",
-        "version": "v2.1.0-RC2",
-        "version_normalized": "2.1.0.0-RC2",
-        "target-dir": "Symfony/Component/Process",
-        "time": "2012-08-26 06:13:51",
+        "name": "symfony/serializer",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/Serializer",
         "source": {
             "type": "git",
-            "url": "https://github.com/symfony/Process",
-            "reference": "v2.1.0-RC2"
+            "url": "https://github.com/symfony/Serializer",
+            "reference": "dac97be810125b025f6dedff302bf32bd47179c8"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/symfony/Process/zipball/v2.1.0-RC2",
-            "reference": "v2.1.0-RC2",
+            "url": "https://github.com/symfony/Serializer/archive/dac97be810125b025f6dedff302bf32bd47179c8.zip",
+            "reference": "dac97be810125b025f6dedff302bf32bd47179c8",
             "shasum": ""
         },
         "require": {
             "php": ">=5.3.3"
         },
+        "time": "2012-10-24 08:41:27",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "2.1-dev"
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\Serializer\\": ""
             }
         },
-        "installation-source": "dist",
         "license": [
             "MIT"
         ],
@@ -583,74 +614,55 @@
                 "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Symfony Process Component",
-        "homepage": "http://symfony.com",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\Process": ""
-            }
-        }
+        "description": "Symfony Serializer Component",
+        "homepage": "http://symfony.com"
     },
     {
-        "name": "kriswallsmith/assetic",
-        "version": "v1.1.0-alpha1",
-        "version_normalized": "1.1.0.0-alpha1",
-        "time": "2012-08-28 05:33:44",
+        "name": "symfony/yaml",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/Yaml",
         "source": {
             "type": "git",
-            "url": "http://github.com/kriswallsmith/assetic.git",
-            "reference": "v1.1.0-alpha1"
+            "url": "https://github.com/symfony/Yaml",
+            "reference": "5435fd7bd42dbea42fbfc5aec6bf3274c3bb38ed"
         },
         "dist": {
             "type": "zip",
-            "url": "https://github.com/kriswallsmith/assetic/zipball/v1.1.0-alpha1",
-            "reference": "v1.1.0-alpha1",
+            "url": "https://github.com/symfony/Yaml/zipball/5435fd7bd42dbea42fbfc5aec6bf3274c3bb38ed",
+            "reference": "5435fd7bd42dbea42fbfc5aec6bf3274c3bb38ed",
             "shasum": ""
         },
         "require": {
-            "php": ">=5.3.1",
-            "symfony/process": "2.1.*"
-        },
-        "require-dev": {
-            "twig/twig": ">=1.6.0,<2.0",
-            "leafo/lessphp": "*",
-            "leafo/scssphp": "*",
-            "ptachoire/cssembed": "*"
-        },
-        "suggest": {
-            "twig/twig": "Assetic provides the integration with the Twig templating engine",
-            "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
-            "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler",
-            "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris"
+            "php": ">=5.3.3"
         },
+        "time": "2012-11-04 08:29:56",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "1.1-dev"
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\Yaml\\": ""
             }
         },
-        "installation-source": "dist",
         "license": [
             "MIT"
         ],
         "authors": [
             {
-                "name": "Kris Wallsmith",
-                "email": "kris.wallsmith@gmail.com",
-                "homepage": "http://kriswallsmith.net/"
+                "name": "Fabien Potencier",
+                "email": "fabien@symfony.com"
+            },
+            {
+                "name": "Symfony Community",
+                "homepage": "http://symfony.com/contributors"
             }
         ],
-        "description": "Asset Management for PHP",
-        "homepage": "https://github.com/kriswallsmith/assetic",
-        "keywords": [
-            "assets",
-            "compression",
-            "minification"
-        ],
-        "autoload": {
-            "psr-0": {
-                "Assetic": "src/"
-            }
-        }
+        "description": "Symfony Yaml Component",
+        "homepage": "http://symfony.com"
     }
 ]
diff --git a/core/vendor/doctrine/common/composer.json b/core/vendor/doctrine/common/composer.json
index ff87dba..c87258d 100644
--- a/core/vendor/doctrine/common/composer.json
+++ b/core/vendor/doctrine/common/composer.json
@@ -1,6 +1,6 @@
 {
     "name": "doctrine/common",
-    "type": "library","version":"2.3.0-RC2",
+    "type": "library",
     "description": "Common Library for Doctrine projects",
     "keywords": ["collections", "spl", "eventmanager", "annotations", "persistence"],
     "homepage": "http://www.doctrine-project.org",
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocLexer.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocLexer.php
index fc3c2d4..c9a6f7a 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocLexer.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocLexer.php
@@ -52,6 +52,24 @@
     const T_NULL                = 111;
     const T_COLON               = 112;

+    protected $noCase = array(
+        '@'  => self::T_AT,
+        ','  => self::T_COMMA,
+        '('  => self::T_OPEN_PARENTHESIS,
+        ')'  => self::T_CLOSE_PARENTHESIS,
+        '{'  => self::T_OPEN_CURLY_BRACES,
+        '}'  => self::T_CLOSE_CURLY_BRACES,
+        '='  => self::T_EQUALS,
+        ':'  => self::T_COLON,
+        '\\' => self::T_NAMESPACE_SEPARATOR
+    );
+
+    protected $withCase = array(
+        'true'  => self::T_TRUE,
+        'false' => self::T_FALSE,
+        'null'  => self::T_NULL
+    );
+
     /**
      * {@inheritdoc}
      */
@@ -83,61 +101,30 @@ protected function getType(&$value)
     {
         $type = self::T_NONE;

-        // Checking numeric value
-        if (is_numeric($value)) {
-            return (strpos($value, '.') !== false || stripos($value, 'e') !== false)
-                ? self::T_FLOAT : self::T_INTEGER;
-        }
-
         if ($value[0] === '"') {
             $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2));

             return self::T_STRING;
-        } else {
-            switch (strtolower($value)) {
-                case '@':
-                    return self::T_AT;
-
-                case ',':
-                    return self::T_COMMA;
-
-                case '(':
-                    return self::T_OPEN_PARENTHESIS;
-
-                case ')':
-                    return self::T_CLOSE_PARENTHESIS;
-
-                case '{':
-                    return self::T_OPEN_CURLY_BRACES;
-
-                case '}':
-                    return self::T_CLOSE_CURLY_BRACES;
-
-                case '=':
-                    return self::T_EQUALS;
-
-                case '\\':
-                    return self::T_NAMESPACE_SEPARATOR;
-
-                case 'true':
-                    return self::T_TRUE;
+        }

-                case 'false':
-                    return self::T_FALSE;
+        if (isset($this->noCase[$value])) {
+            return $this->noCase[$value];
+        }

-                case 'null':
-                    return self::T_NULL;
+        if ($value[0] === '_' || $value[0] === '\\' || ctype_alpha($value[0])) {
+            return self::T_IDENTIFIER;
+        }

-                case ':':
-                    return self::T_COLON;
+        $lowerValue = strtolower($value);

-                default:
-                    if (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\') {
-                        return self::T_IDENTIFIER;
-                    }
+        if (isset($this->withCase[$lowerValue])) {
+            return $this->withCase[$lowerValue];
+        }

-                    break;
-            }
+        // Checking numeric value
+        if (is_numeric($value)) {
+            return (strpos($value, '.') !== false || stripos($value, 'e') !== false)
+                ? self::T_FLOAT : self::T_INTEGER;
         }

         return $type;
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php
index 4435975..da650b4 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/FileCache.php
@@ -102,7 +102,7 @@ protected function getFilename($id)
      */
     protected function doDelete($id)
     {
-        return unlink($this->getFilename($id));
+        return @unlink($this->getFilename($id));
     }

     /**
@@ -116,7 +116,7 @@ protected function doFlush()
         $iterator = new \RegexIterator($iterator, $pattern);

         foreach ($iterator as $name => $file) {
-            unlink($name);
+            @unlink($name);
         }

         return true;
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php
index 0782163..cca4894 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Version.php
@@ -36,7 +36,7 @@ class Version
     /**
      * Current Doctrine Version
      */
-    const VERSION = '2.3.0-RC2';
+    const VERSION = '2.3.0';

     /**
      * Compares a Doctrine version with the current one.
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/.gitattributes b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php
index 7f5bdd1..98514c5 100644
--- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/ClassCollectionLoader.php
@@ -20,6 +20,7 @@ class ClassCollectionLoader
 {
     private static $loaded;
     private static $seen;
+    private static $useTokenizer = true;

     /**
      * Loads a list of classes and caches them in one big file.
@@ -103,14 +104,14 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive =

             $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($class->getFileName()));

-            // add namespace declaration for global code
+            // fakes namespace declaration for global code
             if (!$class->inNamespace()) {
-                $c = "\nnamespace\n{\n".self::stripComments($c)."\n}\n";
-            } else {
-                $c = self::fixNamespaceDeclarations('<?php '.$c);
-                $c = preg_replace('/^\s*<\?php/', '', $c);
+                $c = "\nnamespace\n{\n".$c."\n}\n";
             }

+            $c = self::fixNamespaceDeclarations('<?php '.$c);
+            $c = preg_replace('/^\s*<\?php/', '', $c);
+
             $content .= $c;
         }

@@ -135,7 +136,11 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive =
      */
     public static function fixNamespaceDeclarations($source)
     {
-        if (!function_exists('token_get_all')) {
+        if (!function_exists('token_get_all') || !self::$useTokenizer) {
+            if (preg_match('/namespace(.*?)\s*;/', $source)) {
+                $source = preg_replace('/namespace(.*?)\s*;/', "namespace$1\n{", $source)."}\n";
+            }
+
             return $source;
         }

@@ -201,37 +206,6 @@ private static function writeCacheFile($file, $content)
     }

     /**
-     * Removes comments from a PHP source string.
-     *
-     * We don't use the PHP php_strip_whitespace() function
-     * as we want the content to be readable and well-formatted.
-     *
-     * @param string $source A PHP string
-     *
-     * @return string The PHP string with the comments removed
-     */
-    private static function stripComments($source)
-    {
-        if (!function_exists('token_get_all')) {
-            return $source;
-        }
-
-        $output = '';
-        foreach (token_get_all($source) as $token) {
-            if (is_string($token)) {
-                $output .= $token;
-            } elseif (!in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) {
-                $output .= $token[1];
-            }
-        }
-
-        // replace multiple new lines with a single newline
-        $output = preg_replace(array('/\s+$/Sm', '/\n+/S'), "\n", $output);
-
-        return $output;
-    }
-
-    /**
      * Gets an ordered array of passed classes including all their dependencies.
      *
      * @param array $classes
@@ -317,4 +291,12 @@ private static function getTraits(\ReflectionClass $class)

         return $classes;
     }
+
+    /**
+     * This method is only useful for testing.
+     */
+    public static function enableTokenizer($bool)
+    {
+        self::$useTokenizer = (Boolean) $bool;
+    }
 }
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php
index 90eca1d..95fafea 100644
--- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php
@@ -117,60 +117,93 @@ public function getDifferentOrdersForTraits()
         );
     }

-    public function testFixNamespaceDeclarations()
+    /**
+     * @dataProvider getFixNamespaceDeclarationsData
+     */
+    public function testFixNamespaceDeclarations($source, $expected)
     {
-        $source = <<<EOF
-<?php
+        $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
+    }

-namespace Foo;
-class Foo {}
-namespace   Bar ;
-class Foo {}
-namespace Foo\Bar;
-class Foo {}
-namespace Foo\Bar\Bar
-{
-    class Foo {}
-}
-namespace
-{
-    class Foo {}
-}
-EOF;
+    /**
+     * @dataProvider getFixNamespaceDeclarationsData
+     */
+    public function testFixNamespaceDeclarationsWithoutTokenizer($source, $expected)
+    {
+        ClassCollectionLoader::enableTokenizer(false);
+        $this->assertEquals('<?php '.$expected, ClassCollectionLoader::fixNamespaceDeclarations('<?php '.$source));
+        ClassCollectionLoader::enableTokenizer(true);
+    }

-        $expected = <<<EOF
-<?php
+    public function getFixNamespaceDeclarationsData()
+    {
+        return array(
+            array("namespace;\nclass Foo {}\n", "namespace\n{\nclass Foo {}\n}\n"),
+            array("namespace Foo;\nclass Foo {}\n", "namespace Foo\n{\nclass Foo {}\n}\n"),
+            array("namespace   Bar ;\nclass Foo {}\n", "namespace   Bar\n{\nclass Foo {}\n}\n"),
+            array("namespace Foo\Bar;\nclass Foo {}\n", "namespace Foo\Bar\n{\nclass Foo {}\n}\n"),
+            array("namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n", "namespace Foo\Bar\Bar\n{\nclass Foo {}\n}\n"),
+            array("namespace\n{\nclass Foo {}\n}\n", "namespace\n{\nclass Foo {}\n}\n"),
+        );
+    }

-namespace Foo
-{
-class Foo {}
-}
-namespace   Bar
+    /**
+     * @expectedException InvalidArgumentException
+     */
+    public function testUnableToLoadClassException()
+    {
+        if (is_file($file = sys_get_temp_dir().'/foo.php')) {
+            unlink($file);
+        }
+
+        ClassCollectionLoader::load(array('SomeNotExistingClass'), sys_get_temp_dir(), 'foo', false);
+    }
+
+    public function testCommentStripping()
+    {
+        if (is_file($file = sys_get_temp_dir().'/bar.php')) {
+            unlink($file);
+        }
+        spl_autoload_register($r = function ($class) {
+            require_once __DIR__.'/Fixtures/'.str_replace(array('\\', '_'), '/', $class).'.php';
+        });
+
+        ClassCollectionLoader::load(array('Namespaced\\WithComments', 'Pearlike_WithComments'), sys_get_temp_dir(), 'bar', false);
+
+        spl_autoload_unregister($r);
+
+        $this->assertEquals(<<<EOF
+<?php
+
+
+
+namespace Namespaced
 {
-class Foo {}
-}
-namespace Foo\Bar
+
+class WithComments
 {
-class Foo {}
+
+    public static \$loaded = true;
 }
-namespace Foo\Bar\Bar
-{
-    class Foo {}
 }
+
 namespace
 {
-    class Foo {}
+
+
+
+
+class Pearlike_WithComments
+{
+
+    public static \$loaded = true;
 }
-EOF;

-        $this->assertEquals($expected, ClassCollectionLoader::fixNamespaceDeclarations($source));
-    }
+}

-    /**
-     * @expectedException InvalidArgumentException
-     */
-    public function testUnableToLoadClassException()
-    {
-        ClassCollectionLoader::load(array('SomeNotExistingClass'), '', 'foo', false);
+EOF
+        , file_get_contents($file));
+
+        unlink($file);
     }
 }
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php
index e69502b..c4ef810 100644
--- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php
@@ -72,9 +72,10 @@ public function getTestCreateMapTests()
     {
         $data = array(
             array(__DIR__.'/Fixtures/Namespaced', array(
-                'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php',
-                'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php',
-                'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php',
+                'Namespaced\\Bar'          => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php',
+                'Namespaced\\Foo'          => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php',
+                'Namespaced\\Baz'          => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php',
+                'Namespaced\\WithComments' => realpath(__DIR__).'/Fixtures/Namespaced/WithComments.php',
                 )
             ),
             array(__DIR__.'/Fixtures/beta/NamespaceCollision', array(
@@ -84,9 +85,10 @@ public function getTestCreateMapTests()
                 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php',
             )),
             array(__DIR__.'/Fixtures/Pearlike', array(
-                'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php',
-                'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php',
-                'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php',
+                'Pearlike_Foo'          => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php',
+                'Pearlike_Bar'          => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php',
+                'Pearlike_Baz'          => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php',
+                'Pearlike_WithComments' => realpath(__DIR__).'/Fixtures/Pearlike/WithComments.php',
             )),
             array(__DIR__.'/Fixtures/classmap', array(
                 'Foo\\Bar\\A'             => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php',
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php
new file mode 100644
index 0000000..6973653
--- /dev/null
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php
@@ -0,0 +1,18 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Namespaced;
+
+class WithComments
+{
+    /** @Boolean */
+    public static $loaded = true;
+}
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike/WithComments.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike/WithComments.php
new file mode 100644
index 0000000..d0fd206
--- /dev/null
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/Pearlike/WithComments.php
@@ -0,0 +1,16 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+class Pearlike_WithComments
+{
+    /** @Boolean */
+    public static $loaded = true;
+}
diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/UniversalClassLoaderTest.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/UniversalClassLoaderTest.php
index fd60fdf..308700b 100644
--- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/UniversalClassLoaderTest.php
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/UniversalClassLoaderTest.php
@@ -23,7 +23,7 @@ public function testLoadClass($className, $testClassName, $message)
         $loader = new UniversalClassLoader();
         $loader->registerNamespace('Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
         $loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
-        $loader->loadClass($testClassName);
+        $this->assertTrue($loader->loadClass($testClassName));
         $this->assertTrue(class_exists($className), $message);
     }

@@ -92,7 +92,7 @@ public function testLoadClassFromFallback($className, $testClassName, $message)
         $loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
         $loader->registerNamespaceFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback'));
         $loader->registerPrefixFallbacks(array(__DIR__.DIRECTORY_SEPARATOR.'Fixtures/fallback'));
-        $loader->loadClass($testClassName);
+        $this->assertTrue($loader->loadClass($testClassName));
         $this->assertTrue(class_exists($className), $message);
     }

@@ -128,7 +128,7 @@ public function testLoadClassNamespaceCollision($namespaces, $className, $messag
         $loader = new UniversalClassLoader();
         $loader->registerNamespaces($namespaces);

-        $loader->loadClass($className);
+        $this->assertTrue($loader->loadClass($className));
         $this->assertTrue(class_exists($className), $message);
     }

@@ -178,7 +178,7 @@ public function testLoadClassPrefixCollision($prefixes, $className, $message)
         $loader = new UniversalClassLoader();
         $loader->registerPrefixes($prefixes);

-        $loader->loadClass($className);
+        $this->assertTrue($loader->loadClass($className));
         $this->assertTrue(class_exists($className), $message);
     }

diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php
index b6128ad..e3170cc 100644
--- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php
@@ -242,11 +242,15 @@ public function register($prepend = false)
      * Loads the given class or interface.
      *
      * @param string $class The name of the class
+     *
+     * @return Boolean|null True, if loaded
      */
     public function loadClass($class)
     {
         if ($file = $this->findFile($class)) {
             require $file;
+
+            return true;
         }
     }

diff --git a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/composer.json b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/composer.json
index ccd9ba9..effcb83 100644
--- a/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/composer.json
+++ b/core/vendor/symfony/class-loader/Symfony/Component/ClassLoader/composer.json
@@ -20,16 +20,16 @@
         "php": ">=5.3.3"
     },
     "require-dev": {
-        "symfony/finder": "2.1.*"
+        "symfony/finder": "2.2.*"
     },
     "autoload": {
-        "psr-0": { "Symfony\\Component\\ClassLoader": "" }
+        "psr-0": { "Symfony\\Component\\ClassLoader\\": "" }
     },
     "target-dir": "Symfony/Component/ClassLoader",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/.gitattributes b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php
index 19079b4..f7aa471 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php
@@ -116,7 +116,7 @@ private function processArguments(array $arguments)
      *
      * @param string $id A full id or alias for a service definition.
      *
-     * @return Definition The definition related to the supplied id
+     * @return Definition|null The definition related to the supplied id
      */
     private function getDefinition($id)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
index 70592df..ab8895a 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php
@@ -70,6 +70,8 @@ public function process(ContainerBuilder $container)
      *
      * @param ContainerBuilder $container The ContainerBuilder
      * @param array            $arguments An array of arguments
+     *
+     * @return array
      */
     private function inlineArguments(ContainerBuilder $container, array $arguments)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php
index d4af431..41779b7 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php
@@ -28,7 +28,8 @@ class RepeatedPass implements CompilerPassInterface
      * Constructor.
      *
      * @param array $passes An array of RepeatablePassInterface objects
-     * @throws InvalidArgumentException if a pass is not a RepeatablePassInterface instance
+     *
+     * @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface
      */
     public function __construct(array $passes)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
index 5d00ed6..1964184 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
@@ -97,6 +97,8 @@ private function updateReferences($container, $currentId, $newId)
      * @param array  $arguments An array of Arguments
      * @param string $currentId The alias identifier
      * @param string $newId     The identifier the alias points to
+     *
+     * @return array
      */
     private function updateArgumentReferences(array $arguments, $currentId, $newId)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php
index 53c6f52..4fb5b0d 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php
@@ -58,6 +58,8 @@ public function process(ContainerBuilder $container)
      * @param DefinitionDecorator $definition
      *
      * @return Definition
+     *
+     * @throws \RuntimeException When the definition is invalid
      */
     private function resolveDefinition($id, DefinitionDecorator $definition)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php
index 996199c..0674ad4 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php
@@ -71,6 +71,10 @@ public function process(ContainerBuilder $container)
      *
      * @param array   $arguments    An array of Reference objects
      * @param Boolean $inMethodCall
+     *
+     * @return array
+     *
+     * @throws \RuntimeException When the config is invalid
      */
     private function processArguments(array $arguments, $inMethodCall = false)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php
index f6e4c85..0d9ed16 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php
@@ -25,6 +25,8 @@ class ResolveParameterPlaceHoldersPass implements CompilerPassInterface
      * Processes the ContainerBuilder to resolve parameter placeholders.
      *
      * @param ContainerBuilder $container
+     *
+     * @throws ParameterNotFoundException When an invalid parameter is referenced
      */
     public function process(ContainerBuilder $container)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php
index b241bf8..267bac4 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/ServiceReferenceGraph.php
@@ -37,6 +37,8 @@ public function __construct()
      * Checks if the graph has a specific node.
      *
      * @param string $id Id to check
+     *
+     * @return Boolean
      */
     public function hasNode($id)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php
index 88e1f26..1786158 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php
@@ -180,6 +180,9 @@ public function setParameter($name, $value)
      * @param object $service The service instance
      * @param string $scope   The scope of the service
      *
+     * @throws \RuntimeException When trying to set a service in an inactive scope
+     * @throws \InvalidArgumentException When trying to set a service in the prototype scope
+     *
      * @api
      */
     public function set($id, $service, $scope = self::SCOPE_CONTAINER)
@@ -229,6 +232,8 @@ public function has($id)
      * @return object The associated service
      *
      * @throws InvalidArgumentException if the service is not defined
+     * @throws ServiceCircularReferenceException When a circular reference is detected
+     * @throws ServiceNotFoundException When the service is not defined
      *
      * @see Reference
      *
@@ -253,6 +258,11 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
                 $service = $this->$method();
             } catch (\Exception $e) {
                 unset($this->loading[$id]);
+
+                if (isset($this->services[$id])) {
+                    unset($this->services[$id]);
+                }
+
                 throw $e;
             }

@@ -301,6 +311,9 @@ public function getServiceIds()
      *
      * @param string $name
      *
+     * @throws RuntimeException         When the parent scope is inactive
+     * @throws InvalidArgumentException When the scope does not exist
+     *
      * @api
      */
     public function enterScope($name)
@@ -384,6 +397,8 @@ public function leaveScope($name)
      *
      * @param ScopeInterface $scope
      *
+     * @throws \InvalidArgumentException When the scope is invalid
+     *
      * @api
      */
     public function addScope(ScopeInterface $scope)
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
index 5bf7ead..8053f59 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php
@@ -62,6 +62,8 @@ public function registerExtension(ExtensionInterface $extension)
      *
      * @return ExtensionInterface An extension instance
      *
+     * @throws \LogicException if the extension is not registered
+     *
      * @api
      */
     public function getExtension($name)
@@ -162,6 +164,8 @@ public function addObjectResource($object)
      * @return ContainerBuilder The current instance
      * @throws BadMethodCallException When this ContainerBuilder is frozen
      *
+     * @throws \LogicException if the container is frozen
+     *
      * @api
      */
     public function loadFromExtension($extension, array $values = array())
@@ -493,8 +497,11 @@ public function setAliases(array $aliases)
     /**
      * Sets an alias for an existing service.
      *
-     * @param string $alias The alias to create
-     * @param mixed  $id    The service to alias
+     * @param string        $alias The alias to create
+     * @param string|Alias  $id    The service to alias
+     *
+     * @throws \InvalidArgumentException if the id is not a string or an Alias
+     * @throws \InvalidArgumentException if the alias is for itself
      *
      * @api
      */
@@ -546,7 +553,7 @@ public function hasAlias($id)
     /**
      * Gets all defined aliases.
      *
-     * @return array An array of aliases
+     * @return Alias[] An array of aliases
      *
      * @api
      */
@@ -625,7 +632,7 @@ public function setDefinitions(array $definitions)
     /**
      * Gets all service definitions.
      *
-     * @return array An array of Definition instances
+     * @return Definition[] An array of Definition instances
      *
      * @api
      */
@@ -640,6 +647,8 @@ public function getDefinitions()
      * @param string     $id         The service identifier
      * @param Definition $definition A Definition instance
      *
+     * @return Definition the service definition
+     *
      * @throws BadMethodCallException When this ContainerBuilder is frozen
      *
      * @api
@@ -721,9 +730,10 @@ public function findDefinition($id)
      * @param Definition $definition A service definition instance
      * @param string     $id         The service identifier
      *
-     * @return object              The service described by the service definition
+     * @return object The service described by the service definition
      *
-     * @throws RuntimeException         When factory specification is incomplete or scope is inactive
+     * @throws RuntimeException When the scope is inactive
+     * @throws RuntimeException When the factory definition is incomplete
      * @throws InvalidArgumentException When configure callable is not callable
      */
     private function createService(Definition $definition, $id)
@@ -848,6 +858,21 @@ public function findTaggedServiceIds($name)
     }

     /**
+     * Returns all tags the defined services use.
+     *
+     * @return array An array of tags
+     */
+    public function findTags()
+    {
+        $tags = array();
+        foreach ($this->getDefinitions() as $id => $definition) {
+            $tags = array_merge(array_keys($definition->getTags()), $tags);
+        }
+
+        return array_unique($tags);
+    }
+
+    /**
      * Returns the Service Conditionals.
      *
      * @param mixed $value An array of conditionals to return.
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerInterface.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerInterface.php
index d5e07a0..1951ae7 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerInterface.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerInterface.php
@@ -12,6 +12,8 @@
 namespace Symfony\Component\DependencyInjection;

 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;

 /**
  * ContainerInterface is the interface implemented by service container classes.
@@ -49,6 +51,8 @@ public function set($id, $service, $scope = self::SCOPE_CONTAINER);
      * @return object The associated service
      *
      * @throws InvalidArgumentException if the service is not defined
+     * @throws ServiceCircularReferenceException When a circular reference is detected
+     * @throws ServiceNotFoundException When the service is not defined
      *
      * @see Reference
      *
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Definition.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Definition.php
index e7265f2..6928df8 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Definition.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Definition.php
@@ -241,6 +241,8 @@ public function addArgument($argument)
      *
      * @return Definition The current instance
      *
+     * @throws \OutOfBoundsException When the replaced argument does not exist
+     *
      * @api
      */
     public function replaceArgument($index, $argument)
@@ -273,6 +275,8 @@ public function getArguments()
      *
      * @return mixed The argument value
      *
+     * @throws \OutOfBoundsException When the argument does not exist
+     *
      * @api
      */
     public function getArgument($index)
@@ -628,7 +632,7 @@ public function isAbstract()
     /**
      * Sets a configurator to call after the service is fully initialized.
      *
-     * @param mixed $callable A PHP callable
+     * @param callable $callable A PHP callable
      *
      * @return Definition The current instance
      *
@@ -644,7 +648,7 @@ public function setConfigurator($callable)
     /**
      * Gets the configurator to call after the service is fully initialized.
      *
-     * @return mixed The PHP callable to call
+     * @return callable The PHP callable to call
      *
      * @api
      */
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/DefinitionDecorator.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/DefinitionDecorator.php
index 0306f75..3ac561a 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/DefinitionDecorator.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/DefinitionDecorator.php
@@ -29,7 +29,7 @@ class DefinitionDecorator extends Definition
     /**
      * Constructor.
      *
-     * @param Definition $parent The Definition instance to decorate.
+     * @param string $parent The id of Definition instance to decorate.
      *
      * @api
      */
@@ -44,7 +44,7 @@ public function __construct($parent)
     /**
      * Returns the Definition being decorated.
      *
-     * @return Definition
+     * @return string
      *
      * @api
      */
@@ -159,6 +159,8 @@ public function setPublic($boolean)
      *
      * @return mixed The argument value
      *
+     * @throws \OutOfBoundsException When the argument does not exist
+     *
      * @api
      */
     public function getArgument($index)
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
index 4a29d23..f64da99 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
@@ -186,6 +186,9 @@ private function addServiceInclude($id, $definition)
      * @param Definition $definition
      *
      * @return string
+     *
+     * @throws \RuntimeException When the factory definition is incomplete
+     * @throws ServiceCircularReferenceException When a circular reference is detected
      */
     private function addServiceInlinedDefinitions($id, $definition)
     {
@@ -877,9 +880,9 @@ private function wrapServiceConditionals($value, $code)
     /**
      * Builds service calls from arguments
      *
-     * @param array $arguments
-     * @param string &$calls    By reference
-     * @param string &$behavior By reference
+     * @param array  $arguments
+     * @param array  &$calls    By reference
+     * @param array  &$behavior By reference
      */
     private function getServiceCallsFromArguments(array $arguments, array &$calls, array &$behavior)
     {
@@ -1049,9 +1052,6 @@ private function dumpValue($value, $interpolate = true)

                 $code = str_replace('%%', '%', preg_replace_callback('/(?<!%)(%)([^%]+)\1/', $replaceParameters, var_export($value, true)));

-                // optimize string
-                $code = preg_replace(array("/^''\./", "/\.''$/", "/(\w+)(?:'\.')/", "/(.+)(?:\.''\.)/"), array('', '', '$1', '$1.'), $code);
-
                 return $code;
             }
         } elseif (is_object($value) || is_resource($value)) {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
index d8791ce..66d6c5d 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php
@@ -63,7 +63,7 @@ public function dump(array $options = array())
     /**
      * Adds parameters.
      *
-     * @param DOMElement $parent
+     * @param \DOMElement $parent
      */
     private function addParameters(\DOMElement $parent)
     {
@@ -84,8 +84,8 @@ private function addParameters(\DOMElement $parent)
     /**
      * Adds method calls.
      *
-     * @param array      $methodcalls
-     * @param DOMElement $parent
+     * @param array       $methodcalls
+     * @param \DOMElement $parent
      */
     private function addMethodCalls(array $methodcalls, \DOMElement $parent)
     {
@@ -102,9 +102,9 @@ private function addMethodCalls(array $methodcalls, \DOMElement $parent)
     /**
      * Adds a service.
      *
-     * @param Definition $definition
-     * @param string     $id
-     * @param DOMElement $parent
+     * @param Definition  $definition
+     * @param string      $id
+     * @param \DOMElement $parent
      */
     private function addService($definition, $id, \DOMElement $parent)
     {
@@ -172,9 +172,9 @@ private function addService($definition, $id, \DOMElement $parent)
     /**
      * Adds a service alias.
      *
-     * @param string     $alias
-     * @param string     $id
-     * @param DOMElement $parent
+     * @param string      $alias
+     * @param string      $id
+     * @param \DOMElement $parent
      */
     private function addServiceAlias($alias, $id, \DOMElement $parent)
     {
@@ -190,7 +190,7 @@ private function addServiceAlias($alias, $id, \DOMElement $parent)
     /**
      * Adds services.
      *
-     * @param DOMElement $parent
+     * @param \DOMElement $parent
      */
     private function addServices(\DOMElement $parent)
     {
@@ -213,10 +213,10 @@ private function addServices(\DOMElement $parent)
     /**
      * Converts parameters.
      *
-     * @param array      $parameters
-     * @param string     $type
-     * @param DOMElement $parent
-     * @param string     $keyAttribute
+     * @param array       $parameters
+     * @param string      $type
+     * @param \DOMElement $parent
+     * @param string      $keyAttribute
      */
     private function convertParameters($parameters, $type, \DOMElement $parent, $keyAttribute = 'key')
     {
@@ -280,6 +280,10 @@ private function escape($arguments)
      * Converts php types to xml types.
      *
      * @param mixed $value Value to convert
+     *
+     * @return string
+     *
+     * @throws RuntimeException When trying to dump object or resource
      */
     public static function phpToXml($value)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
index 9717a25..bd87161 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
@@ -12,7 +12,9 @@
 namespace Symfony\Component\DependencyInjection\Dumper;

 use Symfony\Component\Yaml\Dumper as YmlDumper;
+use Symfony\Component\DependencyInjection\Alias;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
 use Symfony\Component\DependencyInjection\Parameter;
 use Symfony\Component\DependencyInjection\Reference;
 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
@@ -135,7 +137,7 @@ private function addService($id, $definition)
      * Adds a service alias
      *
      * @param string $alias
-     * @param string $id
+     * @param Alias  $id
      *
      * @return string
      */
@@ -196,6 +198,8 @@ private function addParameters()
      *
      * @param mixed $value
      *
+     * @return mixed
+     *
      * @throws RuntimeException When trying to dump object or resource
      */
     private function dumpValue($value)
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/FileLoader.php
index 0699ab9..ad437b5 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/FileLoader.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/FileLoader.php
@@ -13,7 +13,7 @@

 use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\Config\Loader\FileLoader as BaseFileLoader;
-use Symfony\Component\Config\FileLocator;
+use Symfony\Component\Config\FileLocatorInterface;

 /**
  * FileLoader is the abstract class used by all built-in loaders that are file based.
@@ -28,9 +28,9 @@
      * Constructor.
      *
      * @param ContainerBuilder $container A ContainerBuilder instance
-     * @param FileLocator      $locator   A FileLocator instance
+     * @param FileLocatorInterface      $locator   A FileLocator instance
      */
-    public function __construct(ContainerBuilder $container, FileLocator $locator)
+    public function __construct(ContainerBuilder $container, FileLocatorInterface $locator)
     {
         $this->container = $container;

diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
index 5329195..eba7f2c 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
@@ -11,13 +11,13 @@

 namespace Symfony\Component\DependencyInjection\Loader;

+use Symfony\Component\Config\Resource\FileResource;
 use Symfony\Component\DependencyInjection\DefinitionDecorator;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\DependencyInjection\Alias;
 use Symfony\Component\DependencyInjection\Definition;
 use Symfony\Component\DependencyInjection\Reference;
 use Symfony\Component\DependencyInjection\SimpleXMLElement;
-use Symfony\Component\Config\Resource\FileResource;
 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
 use Symfony\Component\DependencyInjection\Exception\RuntimeException;

@@ -200,7 +200,9 @@ private function parseDefinition($id, $service, $file)
      *
      * @param string $file Path to a file
      *
-     * @throws InvalidArgumentException When loading of XML file returns error
+     * @return SimpleXMLElement
+     *
+     * @throws \InvalidArgumentException When loading of XML file returns error
      */
     private function parseFile($file)
     {
@@ -213,7 +215,7 @@ private function parseFile($file)
         if (!$dom->loadXML(file_get_contents($file), LIBXML_NONET | (defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0))) {
             libxml_disable_entity_loader($disableEntities);

-            throw new \InvalidArgumentException(implode("\n", $this->getXmlErrors($internalErrors)));
+            throw new InvalidArgumentException(implode("\n", $this->getXmlErrors($internalErrors)));
         }
         $dom->normalizeDocument();

@@ -222,7 +224,7 @@ private function parseFile($file)

         foreach ($dom->childNodes as $child) {
             if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
-                throw new \InvalidArgumentException('Document types are not allowed.');
+                throw new InvalidArgumentException('Document types are not allowed.');
             }
         }

@@ -286,8 +288,8 @@ private function processAnonymousServices(SimpleXMLElement $xml, $file)
     /**
      * Validates an XML document.
      *
-     * @param DOMDocument $dom
-     * @param string      $file
+     * @param \DOMDocument $dom
+     * @param string       $file
      */
     private function validate(\DOMDocument $dom, $file)
     {
@@ -302,7 +304,7 @@ private function validate(\DOMDocument $dom, $file)
      * @param string       $file
      *
      * @throws RuntimeException         When extension references a non-existent XSD file
-     * @throws InvalidArgumentException When XML doesn't validate its XSD schema
+     * @throws InvalidArgumentException When xml doesn't validate its xsd schema
      */
     private function validateSchema(\DOMDocument $dom, $file)
     {
@@ -404,6 +406,8 @@ private function validateExtensions(\DOMDocument $dom, $file)
     /**
      * Returns an array of XML errors.
      *
+     * @param Boolean $internalErrors
+     *
      * @return array
      */
     private function getXmlErrors($internalErrors)
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
index 63f3893..6ef3e73 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
@@ -119,6 +119,8 @@ private function parseDefinitions($content, $file)
      * @param string $id
      * @param array  $service
      * @param string $file
+     *
+     * @throws InvalidArgumentException When tags are invalid
      */
     private function parseDefinition($id, $service, $file)
     {
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php
index 908e2a1..70f3956 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php
@@ -84,7 +84,7 @@ public function all()
      *
      * @return mixed  The parameter value
      *
-     * @throws  ParameterNotFoundException if the parameter is not defined
+     * @throws ParameterNotFoundException if the parameter is not defined
      *
      * @api
      */
@@ -129,13 +129,13 @@ public function has($name)
     /**
      * Removes a parameter.
      *
-     * @param string $key The key
+     * @param string $name The parameter name
      *
      * @api
      */
-    public function remove($key)
+    public function remove($name)
     {
-        unset($this->parameters[$key]);
+        unset($this->parameters[strtolower($name)]);
     }

     /**
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
index 1be5106..95b3953 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
@@ -98,7 +98,7 @@ public function testGetServiceIds()
         $this->assertEquals(array('service_container', 'foo', 'bar'), $sc->getServiceIds(), '->getServiceIds() returns all defined service ids');

         $sc = new ProjectServiceContainer();
-        $this->assertEquals(array('scoped', 'scoped_foo', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'service_container'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods');
+        $this->assertEquals(array('scoped', 'scoped_foo', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'service_container'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods');
     }

     /**
@@ -367,6 +367,27 @@ public function testGetThrowsException()
         }
     }

+    public function testGetThrowsExceptionOnServiceConfiguration()
+    {
+        $c = new ProjectServiceContainer();
+
+        try {
+            $c->get('throws_exception_on_service_configuration');
+            $this->fail('The container can not contain invalid service!');
+        } catch (\Exception $e) {
+            $this->assertEquals('Something was terribly wrong while trying to configure the service!', $e->getMessage());
+        }
+        $this->assertFalse($c->initialized('throws_exception_on_service_configuration'));
+
+        try {
+            $c->get('throws_exception_on_service_configuration');
+            $this->fail('The container can not contain invalid service!');
+        } catch (\Exception $e) {
+            $this->assertEquals('Something was terribly wrong while trying to configure the service!', $e->getMessage());
+        }
+        $this->assertFalse($c->initialized('throws_exception_on_service_configuration'));
+    }
+
     public function getInvalidParentScopes()
     {
         return array(
@@ -447,4 +468,11 @@ protected function getThrowExceptionService()
     {
         throw new \Exception('Something went terribly wrong!');
     }
+
+    protected function getThrowsExceptionOnServiceConfigurationService()
+    {
+        $this->services['throws_exception_on_service_configuration'] = $instance = new \stdClass();
+
+        throw new \Exception('Something was terribly wrong while trying to configure the service!');
+    }
 }
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
index c1513b6..a0d2ece 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php
@@ -65,7 +65,7 @@ protected function getFooService()
     {
         $a = $this->get('foo.baz');

-        $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo'), 'bar' => $this->getParameter('foo')), true, $this);
+        $instance = call_user_func(array('FooClass', 'getInstance'), 'foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'bar' => $this->getParameter('foo')), true, $this);

         $instance->setBar($this->get('bar'));
         $instance->initialize();
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
index 46fb358..968ae9b 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php
@@ -54,6 +54,8 @@ public function testRemove()
         ));
         $bag->remove('foo');
         $this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter');
+        $bag->remove('BAR');
+        $this->assertEquals(array(), $bag->all(), '->remove() converts key to lowercase before removing');
     }

     /**
diff --git a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/composer.json b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/composer.json
index 81811c3..d951f30 100644
--- a/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/composer.json
+++ b/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/composer.json
@@ -19,21 +19,21 @@
         "php": ">=5.3.3"
     },
     "require-dev": {
-        "symfony/yaml": "2.1.*",
-        "symfony/config": "2.1.*"
+        "symfony/yaml": "2.2.*",
+        "symfony/config": "2.2.*"
     },
     "suggest": {
-        "symfony/yaml": "self.version",
-        "symfony/config": "self.version"
+        "symfony/yaml": "2.2.*",
+        "symfony/config": "2.2.*"
     },
     "autoload": {
-        "psr-0": { "Symfony\\Component\\DependencyInjection": "" }
+        "psr-0": { "Symfony\\Component\\DependencyInjection\\": "" }
     },
     "target-dir": "Symfony/Component/DependencyInjection",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitattributes b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php
index fc2c0d4..42f09ea 100644
--- a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php
+++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php
@@ -74,11 +74,11 @@ public function stopPropagation()
     /**
      * Stores the EventDispatcher that dispatches this Event
      *
-     * @param EventDispatcher $dispatcher
+     * @param EventDispatcherInterface $dispatcher
      *
      * @api
      */
-    public function setDispatcher(EventDispatcher $dispatcher)
+    public function setDispatcher(EventDispatcherInterface $dispatcher)
     {
         $this->dispatcher = $dispatcher;
     }
@@ -86,7 +86,7 @@ public function setDispatcher(EventDispatcher $dispatcher)
     /**
      * Returns the EventDispatcher that dispatches this Event
      *
-     * @return EventDispatcher
+     * @return EventDispatcherInterface
      *
      * @api
      */
diff --git a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json
index 93abade..1a90992 100644
--- a/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json
+++ b/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json
@@ -19,20 +19,20 @@
         "php": ">=5.3.3"
     },
     "require-dev": {
-        "symfony/dependency-injection": "2.1.*"
+        "symfony/dependency-injection": "2.2.*"
     },
     "suggest": {
-        "symfony/dependency-injection": "self.version",
-        "symfony/http-kernel": "self.version"
+        "symfony/dependency-injection": "2.2.*",
+        "symfony/http-kernel": "2.2.*"
     },
     "autoload": {
-        "psr-0": { "Symfony\\Component\\EventDispatcher": "" }
+        "psr-0": { "Symfony\\Component\\EventDispatcher\\": "" }
     },
     "target-dir": "Symfony/Component/EventDispatcher",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitattributes b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeader.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeader.php
new file mode 100644
index 0000000..e88f5b8
--- /dev/null
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeader.php
@@ -0,0 +1,172 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpFoundation;
+
+/**
+ * Represents an Accept-* header.
+ *
+ * An accept header is compound with a list of items,
+ * sorted by descending quality.
+ *
+ * @author Jean-François Simon <contact@jfsimon.fr>
+ */
+class AcceptHeader
+{
+    /**
+     * @var AcceptHeaderItem[]
+     */
+    private $items = array();
+
+    /**
+     * @var bool
+     */
+    private $sorted = true;
+
+    /**
+     * Constructor.
+     *
+     * @param AcceptHeaderItem[] $items
+     */
+    public function __construct(array $items)
+    {
+        foreach ($items as $item) {
+            $this->add($item);
+        }
+    }
+
+    /**
+     * Builds an AcceptHeader instance from a string.
+     *
+     * @param string $headerValue
+     *
+     * @return AcceptHeader
+     */
+    public static function fromString($headerValue)
+    {
+        $index = 0;
+
+        return new self(array_map(function ($itemValue) use (&$index) {
+            $item = AcceptHeaderItem::fromString($itemValue);
+            $item->setIndex($index++);
+
+            return $item;
+        }, preg_split('/\s*(?:,*("[^"]+"),*|,*(\'[^\']+\'),*|,+)\s*/', $headerValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE)));
+    }
+
+    /**
+     * Returns header value's string representation.
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        return implode(',', $this->items);
+    }
+
+    /**
+     * Tests if header has given value.
+     *
+     * @param string $value
+     *
+     * @return Boolean
+     */
+    public function has($value)
+    {
+        return isset($this->items[$value]);
+    }
+
+    /**
+     * Returns given value's item, if exists.
+     *
+     * @param string $value
+     *
+     * @return AcceptHeaderItem|null
+     */
+    public function get($value)
+    {
+        return isset($this->items[$value]) ? $this->items[$value] : null;
+    }
+
+    /**
+     * Adds an item.
+     *
+     * @param AcceptHeaderItem $item
+     *
+     * @return AcceptHeader
+     */
+    public function add(AcceptHeaderItem $item)
+    {
+        $this->items[$item->getValue()] = $item;
+        $this->sorted = false;
+
+        return $this;
+    }
+
+    /**
+     * Returns all items.
+     *
+     * @return AcceptHeaderItem[]
+     */
+    public function all()
+    {
+        $this->sort();
+
+        return $this->items;
+    }
+
+    /**
+     * Filters items on their value using given regex.
+     *
+     * @param string $pattern
+     *
+     * @return AcceptHeader
+     */
+    public function filter($pattern)
+    {
+        return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) {
+            return preg_match($pattern, $item->getValue());
+        }));
+    }
+
+    /**
+     * Returns first item.
+     *
+     * @return AcceptHeaderItem|null
+     */
+    public function first()
+    {
+        $this->sort();
+
+        return !empty($this->items) ? current($this->items) : null;
+    }
+
+    /**
+     * Sorts items by descending quality
+     */
+    private function sort()
+    {
+        if (!$this->sorted) {
+            uasort($this->items, function ($a, $b) {
+                $qA = $a->getQuality();
+                $qB = $b->getQuality();
+
+                if ($qA === $qB) {
+                    return $a->getIndex() > $b->getIndex() ? 1 : -1;
+                }
+
+                return $qA > $qB ? -1 : 1;
+            });
+
+            $this->sorted = true;
+        }
+    }
+}
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeaderItem.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeaderItem.php
new file mode 100644
index 0000000..9d4c313
--- /dev/null
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeaderItem.php
@@ -0,0 +1,226 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpFoundation;
+
+/**
+ * Represents an Accept-* header item.
+ *
+ * @author Jean-François Simon <contact@jfsimon.fr>
+ */
+class AcceptHeaderItem
+{
+    /**
+     * @var string
+     */
+    private $value;
+
+    /**
+     * @var float
+     */
+    private $quality = 1.0;
+
+    /**
+     * @var int
+     */
+    private $index = 0;
+
+    /**
+     * @var array
+     */
+    private $attributes = array();
+
+    /**
+     * Constructor.
+     *
+     * @param string $value
+     * @param array  $attributes
+     */
+    public function __construct($value, array $attributes = array())
+    {
+        $this->value = $value;
+        foreach ($attributes as $name => $value) {
+            $this->setAttribute($name, $value);
+        }
+    }
+
+    /**
+     * Builds an AcceptHeaderInstance instance from a string.
+     *
+     * @param string $itemValue
+     *
+     * @return AcceptHeaderItem
+     */
+    public static function fromString($itemValue)
+    {
+        $bits = preg_split('/\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\s*/', $itemValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
+        $value = array_shift($bits);
+        $attributes = array();
+
+        $lastNullAttribute = null;
+        foreach ($bits as $bit) {
+            if (($start = substr($bit, 0, 1)) === ($end = substr($bit, -1)) && ($start === '"' || $start === '\'')) {
+                $attributes[$lastNullAttribute] = substr($bit, 1, -1);
+            } elseif ('=' === $end) {
+                $lastNullAttribute = $bit = substr($bit, 0, -1);
+                $attributes[$bit] = null;
+            } else {
+                $parts = explode('=', $bit);
+                $attributes[$parts[0]] = isset($parts[1]) && strlen($parts[1]) > 0 ? $parts[1] : '';
+            }
+        }
+
+        return new self(($start = substr($value, 0, 1)) === ($end = substr($value, -1)) && ($start === '"' || $start === '\'') ? substr($value, 1, -1) : $value, $attributes);
+    }
+
+    /**
+     * Returns header  value's string representation.
+     *
+     * @return string
+     */
+    public function __toString()
+    {
+        $string = $this->value.($this->quality < 1 ? ';q='.$this->quality : '');
+        if (count($this->attributes) > 0) {
+            $string .= ';'.implode(';', array_map(function($name, $value) {
+                return sprintf(preg_match('/[,;=]/', $value) ? '%s="%s"' : '%s=%s', $name, $value);
+            }, array_keys($this->attributes), $this->attributes));
+        }
+
+        return $string;
+    }
+
+    /**
+     * Set the item value.
+     *
+     * @param string $value
+     *
+     * @return AcceptHeaderItem
+     */
+    public function setValue($value)
+    {
+        $this->value = $value;
+
+        return $this;
+    }
+
+    /**
+     * Returns the item value.
+     *
+     * @return string
+     */
+    public function getValue()
+    {
+        return $this->value;
+    }
+
+    /**
+     * Set the item quality.
+     *
+     * @param float $quality
+     *
+     * @return AcceptHeaderItem
+     */
+    public function setQuality($quality)
+    {
+        $this->quality = $quality;
+
+        return $this;
+    }
+
+    /**
+     * Returns the item quality.
+     *
+     * @return float
+     */
+    public function getQuality()
+    {
+        return $this->quality;
+    }
+
+    /**
+     * Set the item index.
+     *
+     * @param int $index
+     *
+     * @return AcceptHeaderItem
+     */
+    public function setIndex($index)
+    {
+        $this->index = $index;
+
+        return $this;
+    }
+
+    /**
+     * Returns the item index.
+     *
+     * @return int
+     */
+    public function getIndex()
+    {
+        return $this->index;
+    }
+
+    /**
+     * Tests if an attribute exists.
+     *
+     * @param string $name
+     *
+     * @return Boolean
+     */
+    public function hasAttribute($name)
+    {
+        return isset($this->attributes[$name]);
+    }
+
+    /**
+     * Returns an attribute by its name.
+     *
+     * @param string $name
+     * @param mixed  $default
+     *
+     * @return mixed
+     */
+    public function getAttribute($name, $default = null)
+    {
+        return isset($this->attributes[$name]) ? $this->attributes[$name] : $default;
+    }
+
+    /**
+     * Returns all attributes.
+     *
+     * @return array
+     */
+    public function getAttributes()
+    {
+        return $this->attributes;
+    }
+
+    /**
+     * Set an attribute.
+     *
+     * @param string $name
+     * @param string $value
+     *
+     * @return AcceptHeaderItem
+     */
+    public function setAttribute($name, $value)
+    {
+        if ('q' === $name) {
+            $this->quality = (float) $value;
+        } else {
+            $this->attributes[$name] = (string) $value;
+        }
+
+        return $this;
+    }
+}
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php
new file mode 100644
index 0000000..080a440
--- /dev/null
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php
@@ -0,0 +1,259 @@
+<?php
+
+/**
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpFoundation;
+
+use Symfony\Component\HttpFoundation\File\File;
+use Symfony\Component\HttpFoundation\File\Exception\FileException;
+
+/**
+ * BinaryFileResponse represents an HTTP response delivering a file.
+ *
+ * @author Niklas Fiekas <niklas.fiekas@tu-clausthal.de>
+ * @author stealth35 <stealth35-php@live.fr>
+ * @author Igor Wiedler <igor@wiedler.ch>
+ * @author Jordan Alliot <jordan.alliot@gmail.com>
+ * @author Sergey Linnik <linniksa@gmail.com>
+ */
+class BinaryFileResponse extends Response
+{
+    protected static $trustXSendfileTypeHeader = false;
+
+    protected $file;
+    protected $offset;
+    protected $maxlen;
+
+    /**
+     * Constructor.
+     *
+     * @param SplFileInfo|string $file               The file to stream
+     * @param integer            $status             The response status code
+     * @param array              $headers            An array of response headers
+     * @param boolean            $public             Files are public by default
+     * @param null|string        $contentDisposition The type of Content-Disposition to set automatically with the filename
+     * @param boolean            $autoEtag           Whether the ETag header should be automatically set
+     * @param boolean            $autoLastModified   Whether the Last-Modified header should be automatically set
+     */
+    public function __construct($file, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true)
+    {
+        parent::__construct(null, $status, $headers);
+
+        $this->setFile($file, $contentDisposition, $autoEtag, $autoLastModified);
+
+        if ($public) {
+            $this->setPublic();
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true)
+    {
+        return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified);
+    }
+
+    /**
+     * Sets the file to stream.
+     *
+     * @param SplFileInfo|string $file The file to stream
+     */
+    public function setFile($file, $contentDisposition = null, $autoEtag = false, $autoLastModified = true)
+    {
+        $file = new File((string) $file);
+
+        if (!$file->isReadable()) {
+            throw new FileException('File must be readable.');
+        }
+
+        $this->file = $file;
+
+        if ($autoEtag) {
+            $this->setAutoEtag();
+        }
+
+        if ($autoLastModified) {
+            $this->setAutoLastModified();
+        }
+
+        if ($contentDisposition) {
+            $this->setContentDisposition($contentDisposition);
+        }
+
+        return $this;
+    }
+
+    /**
+     * Gets the file.
+     *
+     * @return File The file to stream
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+
+    /**
+     * Automatically sets the Last-Modified header according the file modification date.
+     */
+    public function setAutoLastModified()
+    {
+        $this->setLastModified(\DateTime::createFromFormat('U', $this->file->getMTime()));
+
+        return $this;
+    }
+
+    /**
+     * Automatically sets the ETag header according to the checksum of the file.
+     */
+    public function setAutoEtag()
+    {
+        $this->setEtag(sha1_file($this->file->getPathname()));
+
+        return $this;
+    }
+
+    /**
+     * Sets the Content-Disposition header with the given filename.
+     *
+     * @param string $disposition      ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT
+     * @param string $filename         Optionally use this filename instead of the real name of the file
+     * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename
+     */
+    public function setContentDisposition($disposition, $filename = '', $filenameFallback = '')
+    {
+        if ($filename === '') {
+            $filename = $this->file->getFilename();
+        }
+
+        $dispositionHeader = $this->headers->makeDisposition($disposition, $filename, $filenameFallback);
+        $this->headers->set('Content-Disposition', $dispositionHeader);
+
+        return $this;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function prepare(Request $request)
+    {
+        $this->headers->set('Content-Length', $this->file->getSize());
+        $this->headers->set('Accept-Ranges', 'bytes');
+        $this->headers->set('Content-Transfer-Encoding', 'binary');
+
+        if (!$this->headers->has('Content-Type')) {
+            $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream');
+        }
+
+        if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) {
+            $this->setProtocolVersion('1.1');
+        }
+
+        $this->offset = 0;
+        $this->maxlen = -1;
+
+        if (self::$trustXSendfileTypeHeader && $request->headers->has('X-Sendfile-Type')) {
+            // Use X-Sendfile, do not send any content.
+            $type = $request->headers->get('X-Sendfile-Type');
+            $path = $this->file->getRealPath();
+            if (strtolower($type) == 'x-accel-redirect') {
+                // Do X-Accel-Mapping substitutions.
+                foreach (explode(',', $request->headers->get('X-Accel-Mapping', ''))  as $mapping) {
+                    $mapping = explode('=', $mapping, 2);
+
+                    if (2 == count($mapping)) {
+                        $location = trim($mapping[0]);
+                        $pathPrefix = trim($mapping[1]);
+
+                        if (substr($path, 0, strlen($pathPrefix)) == $pathPrefix) {
+                            $path = $location . substr($path, strlen($pathPrefix));
+                            break;
+                        }
+                    }
+                }
+            }
+            $this->headers->set($type, $path);
+            $this->maxlen = 0;
+        } elseif ($request->headers->has('Range')) {
+            // Process the range headers.
+            if (!$request->headers->has('If-Range') || $this->getEtag() == $request->headers->get('If-Range')) {
+                $range = $request->headers->get('Range');
+
+                list($start, $end) = array_map('intval', explode('-', substr($range, 6), 2)) + array(0);
+
+                if ('' !== $end) {
+                    $this->maxlen = $end - $start;
+                } else {
+                    $end = $this->file->getSize() - 1;
+                }
+
+                $this->offset = $start;
+
+                $this->setStatusCode(206);
+                $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $this->file->getSize()));
+            }
+        }
+    }
+
+    /**
+     * Sends the file.
+     */
+    public function sendContent()
+    {
+        if (!$this->isSuccessful()) {
+            parent::sendContent();
+
+            return;
+        }
+
+        if (0 === $this->maxlen) {
+            return;
+        }
+
+        $out = fopen('php://output', 'wb');
+        $file = fopen($this->file->getPathname(), 'rb');
+
+        stream_copy_to_stream($file, $out, $this->maxlen, $this->offset);
+
+        fclose($out);
+        fclose($file);
+    }
+
+    /**
+     * {@inheritdoc}
+     *
+     * @throws \LogicException when the content is not null
+     */
+    public function setContent($content)
+    {
+        if (null !== $content) {
+            throw new \LogicException('The content cannot be set on a BinaryFileResponse instance.');
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     *
+     * @return false
+     */
+    public function getContent()
+    {
+        return false;
+    }
+
+    /**
+     * Trust X-Sendfile-Type header.
+     */
+    public static function trustXSendfileTypeHeader()
+    {
+        self::$trustXSendfileTypeHeader = true;
+    }
+}
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md
index 4a00207..8cb0db8 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md
@@ -1,6 +1,11 @@
 CHANGELOG
 =========

+2.2.0
+-----
+
+ * Request::splitHttpAcceptHeader() method is deprecated and will be removed in 2.3
+
 2.1.0
 -----

diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php
index 6d6dda1..0ebafc6 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php
@@ -119,6 +119,19 @@ public function getClientOriginalName()
     }

     /**
+     * Returns the original file extension
+     *
+     * It is extracted from the original file name that was uploaded.
+     * Then is should not be considered as a safe value.
+     *
+     * @return string The extension
+     */
+    public function getClientOriginalExtension()
+    {
+        return pathinfo($this->originalName, PATHINFO_EXTENSION);
+    }
+
+    /**
      * Returns the file mime type.
      *
      * It is extracted from the request from which the file has been uploaded.
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php
index bb579b6..f26899d 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php
@@ -223,7 +223,9 @@ public function remove($key)
      * @param string    $key     The parameter key
      * @param \DateTime $default The default value
      *
-     * @return \DateTime The filtered value
+     * @return null|\DateTime The filtered value
+     *
+     * @throws \RuntimeException When the HTTP header is not parseable
      *
      * @api
      */
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md
index bb6f02c..0c4a4a9 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md
@@ -31,7 +31,7 @@ the HTTP specification.
 Loading
 -------

-If you are using PHP 5.3.x you must add the following to your autoloader:
+If you are not using Composer but are using PHP 5.3.x, you must add the following to your autoloader:

     // SessionHandlerInterface
     if (!interface_exists('SessionHandlerInterface')) {
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php
index 848c3d1..79d34e8 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php
@@ -217,7 +217,7 @@ public static function createFromGlobals()
     {
         $request = new static($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);

-        if (0 === strpos($request->server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
+        if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
             && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH'))
         ) {
             parse_str($request->getContent(), $data);
@@ -286,7 +286,7 @@ public static function create($uri, $method = 'GET', $parameters = array(), $coo
         }

         if (!isset($components['path'])) {
-            $components['path'] = '';
+            $components['path'] = '/';
         }

         switch (strtoupper($method)) {
@@ -508,7 +508,7 @@ public static function normalizeQueryString($qs)
      *
      * This method is mainly useful for libraries that want to provide some flexibility.
      *
-     * Order of precedence: GET, PATH, POST, COOKIE
+     * Order of precedence: GET, PATH, POST
      *
      * Avoid using this method in controllers:
      *
@@ -516,7 +516,7 @@ public static function normalizeQueryString($qs)
      *  * prefer to get from a "named" source
      *
      * It is better to explicitly get request parameters from the appropriate
-     * public property instead (query, request, attributes, ...).
+     * public property instead (query, attributes, request).
      *
      * @param string  $key     the key
      * @param mixed   $default the default value
@@ -795,11 +795,14 @@ public function getRequestUri()
     /**
      * Gets the scheme and HTTP host.
      *
+     * If the URL was called with basic authentication, the user
+     * and the password are not added to the generated string.
+     *
      * @return string The scheme and HTTP host
      */
     public function getSchemeAndHttpHost()
     {
-        return $this->getScheme().'://'.(('' != $auth = $this->getUserInfo()) ? $auth.'@' : '').$this->getHttpHost();
+        return $this->getScheme().'://'.$this->getHttpHost();
     }

     /**
@@ -1040,7 +1043,7 @@ public function setRequestFormat($format)
      */
     public function getContentType()
     {
-        return $this->getFormat($this->server->get('CONTENT_TYPE'));
+        return $this->getFormat($this->headers->get('CONTENT_TYPE'));
     }

     /**
@@ -1052,7 +1055,11 @@ public function getContentType()
      */
     public function setDefaultLocale($locale)
     {
-        $this->setPhpDefaultLocale($this->defaultLocale = $locale);
+        $this->defaultLocale = $locale;
+
+        if (null === $this->locale) {
+            $this->setPhpDefaultLocale($locale);
+        }
     }

     /**
@@ -1184,9 +1191,9 @@ public function getLanguages()
             return $this->languages;
         }

-        $languages = $this->splitHttpAcceptHeader($this->headers->get('Accept-Language'));
+        $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all();
         $this->languages = array();
-        foreach ($languages as $lang => $q) {
+        foreach (array_keys($languages) as $lang) {
             if (strstr($lang, '-')) {
                 $codes = explode('-', $lang);
                 if ($codes[0] == 'i') {
@@ -1226,7 +1233,7 @@ public function getCharsets()
             return $this->charsets;
         }

-        return $this->charsets = array_keys($this->splitHttpAcceptHeader($this->headers->get('Accept-Charset')));
+        return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all());
     }

     /**
@@ -1242,7 +1249,7 @@ public function getAcceptableContentTypes()
             return $this->acceptableContentTypes;
         }

-        return $this->acceptableContentTypes = array_keys($this->splitHttpAcceptHeader($this->headers->get('Accept')));
+        return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all());
     }

     /**
@@ -1266,32 +1273,21 @@ public function isXmlHttpRequest()
      * @param string $header Header to split
      *
      * @return array Array indexed by the values of the Accept-* header in preferred order
+     *
+     * @deprecated Deprecated since version 2.2, to be removed in 2.3.
      */
     public function splitHttpAcceptHeader($header)
     {
-        if (!$header) {
-            return array();
-        }
-
-        $values = array();
-        foreach (array_filter(explode(',', $header)) as $value) {
-            // Cut off any q-value that might come after a semi-colon
-            if (preg_match('/;\s*(q=.*$)/', $value, $match)) {
-                $q     = (float) substr(trim($match[1]), 2);
-                $value = trim(substr($value, 0, -strlen($match[0])));
-            } else {
-                $q = 1;
-            }
-
-            if (0 < $q) {
-                $values[trim($value)] = $q;
+        $headers = array();
+        foreach (AcceptHeader::fromString($header)->all() as $item) {
+            $key = $item->getValue();
+            foreach ($item->getAttributes() as $name => $value) {
+                $key .= sprintf(';%s=%s', $name, $value);
             }
+            $headers[$key] = $item->getQuality();
         }

-        arsort($values);
-        reset($values);
-
-        return $values;
+        return $headers;
     }

     /*
@@ -1306,8 +1302,11 @@ protected function prepareRequestUri()
     {
         $requestUri = '';

-        if ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {
-            // check this first so IIS will catch
+        if ($this->headers->has('X_ORIGINAL_URL') && false !== stripos(PHP_OS, 'WIN')) {
+            // IIS with Microsoft Rewrite Module
+            $requestUri = $this->headers->get('X_ORIGINAL_URL');
+        } elseif ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {
+            // IIS with ISAPI_Rewrite
             $requestUri = $this->headers->get('X_REWRITE_URL');
         } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') {
             // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php
index 2982952..ff2e24c 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php
@@ -198,7 +198,7 @@ protected function checkIp4($requestIp, $ip)
      */
     protected function checkIp6($requestIp, $ip)
     {
-        if (!defined('AF_INET6')) {
+        if (!((extension_loaded('sockets') && defined('AF_INET6')) || @inet_pton('::1'))) {
             throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".');
         }

diff --git 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
index 1d2106e..b6bbfc2 100644
--- 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
@@ -50,6 +50,8 @@ public function close();
     /**
      * Read session.
      *
+     * @param string $sessionId
+     *
      * @see http://php.net/sessionhandlerinterface.read
      *
      * @throws \RuntimeException On fatal error but not "record not found".
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php
index dbc82d1..a1744f7 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php
@@ -231,7 +231,7 @@ public function prepare(Request $request)
             $headers->remove('Content-Length');
         }

-        if ('HEAD' === $request->getMethod()) {
+        if ($request->isMethod('HEAD')) {
             // cf. RFC2616 14.13
             $length = $headers->get('Content-Length');
             $this->setContent(null);
@@ -259,7 +259,7 @@ public function sendHeaders()
         header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));

         // headers
-        foreach ($this->headers->all() as $name => $values) {
+        foreach ($this->headers->allPreserveCase() as $name => $values) {
             foreach ($values as $value) {
                 header($name.': '.$value, false);
             }
@@ -574,7 +574,7 @@ public function mustRevalidate()
      */
     public function getDate()
     {
-        return $this->headers->getDate('Date');
+        return $this->headers->getDate('Date', new \DateTime());
     }

     /**
@@ -1097,7 +1097,7 @@ public function isOk()
     }

     /**
-     * Is the reponse forbidden?
+     * Is the response forbidden?
      *
      * @return Boolean
      *
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
index c27d811..531e003 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
@@ -37,6 +37,11 @@ class ResponseHeaderBag extends HeaderBag
     protected $cookies              = array();

     /**
+     * @var array
+     */
+    protected $headerNames          = array();
+
+    /**
      * Constructor.
      *
      * @param array $headers An array of HTTP headers
@@ -48,7 +53,7 @@ public function __construct(array $headers = array())
         parent::__construct($headers);

         if (!isset($this->headers['cache-control'])) {
-            $this->set('cache-control', '');
+            $this->set('Cache-Control', '');
         }
     }

@@ -66,16 +71,28 @@ public function __toString()
     }

     /**
+     * Returns the headers, with original capitalizations.
+     *
+     * @return array An array of headers
+     */
+    public function allPreserveCase()
+    {
+        return array_combine($this->headerNames, $this->headers);
+    }
+
+    /**
      * {@inheritdoc}
      *
      * @api
      */
     public function replace(array $headers = array())
     {
+        $this->headerNames = array();
+
         parent::replace($headers);

         if (!isset($this->headers['cache-control'])) {
-            $this->set('cache-control', '');
+            $this->set('Cache-Control', '');
         }
     }

@@ -88,10 +105,14 @@ public function set($key, $values, $replace = true)
     {
         parent::set($key, $values, $replace);

+        $uniqueKey = strtr(strtolower($key), '_', '-');
+        $this->headerNames[$uniqueKey] = $key;
+
         // ensure the cache-control header has sensible defaults
-        if (in_array(strtr(strtolower($key), '_', '-'), array('cache-control', 'etag', 'last-modified', 'expires'))) {
+        if (in_array($uniqueKey, array('cache-control', 'etag', 'last-modified', 'expires'))) {
             $computed = $this->computeCacheControlValue();
             $this->headers['cache-control'] = array($computed);
+            $this->headerNames['cache-control'] = 'Cache-Control';
             $this->computedCacheControl = $this->parseCacheControl($computed);
         }
     }
@@ -105,7 +126,10 @@ public function remove($key)
     {
         parent::remove($key);

-        if ('cache-control' === strtr(strtolower($key), '_', '-')) {
+        $uniqueKey = strtr(strtolower($key), '_', '-');
+        unset($this->headerNames[$uniqueKey]);
+
+        if ('cache-control' === $uniqueKey) {
             $this->computedCacheControl = array();
         }
     }
diff --git 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
index 9ae5a3d..a68dcfd 100644
--- 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
@@ -31,18 +31,18 @@ public function add($type, $message);
     /**
      * Registers a message for a given type.
      *
-     * @param string $type
-     * @param string $message
+     * @param string       $type
+     * @param string|array $message
      */
     public function set($type, $message);

     /**
-     * Gets flash message for a given type.
+     * Gets flash messages for a given type.
      *
      * @param string $type    Message category type.
-     * @param array  $default Default value if $type doee not exist.
+     * @param array  $default Default value if $type does not exist.
      *
-     * @return string
+     * @return array
      */
     public function peek($type, array $default = array());

@@ -57,9 +57,9 @@ public function peekAll();
      * Gets and clears flash from the stack.
      *
      * @param string $type
-     * @param array  $default Default value if $type doee not exist.
+     * @param array  $default Default value if $type does not exist.
      *
-     * @return string
+     * @return array
      */
     public function get($type, array $default = array());

diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
index e8293e4..4a262aa 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
@@ -36,6 +36,13 @@ class MongoDbSessionHandler implements \SessionHandlerInterface
     /**
      * Constructor.
      *
+     * List of available options:
+     *  * database: The name of the database [required]
+     *  * collection: The name of the collection [required]
+     *  * id_field: The field name for storing the session id [default: _id]
+     *  * data_field: The field name for storing the session data [default: data]
+     *  * time_field: The field name for storing the timestamp [default: time]
+     *
      * @param \Mongo $mongo   A "Mongo" instance
      * @param array  $options An associative array of field options
      *
@@ -50,9 +57,9 @@ public function __construct(\Mongo $mongo, array $options)
         $this->mongo = $mongo;

         $this->options = array_merge(array(
-            'id_field'   => 'sess_id',
-            'data_field' => 'sess_data',
-            'time_field' => 'sess_time',
+            'id_field'   => '_id',
+            'data_field' => 'data',
+            'time_field' => 'time',
         ), $options);
     }

@@ -77,10 +84,9 @@ public function close()
      */
     public function destroy($sessionId)
     {
-        $this->getCollection()->remove(
-            array($this->options['id_field'] => $sessionId),
-            array('justOne' => true)
-        );
+        $this->getCollection()->remove(array(
+            $this->options['id_field'] => $sessionId
+        ));

         return true;
     }
@@ -90,11 +96,21 @@ public function destroy($sessionId)
      */
     public function gc($lifetime)
     {
-        $time = new \MongoTimestamp(time() - $lifetime);
+        /* Note: MongoDB 2.2+ supports TTL collections, which may be used in
+         * place of this method by indexing the "time_field" field with an
+         * "expireAfterSeconds" option. Regardless of whether TTL collections
+         * are used, consider indexing this field to make the remove query more
+         * efficient.
+         *
+         * See: http://docs.mongodb.org/manual/tutorial/expire-data/
+         */
+        $time = new \MongoDate(time() - $lifetime);

         $this->getCollection()->remove(array(
             $this->options['time_field'] => array('$lt' => $time),
         ));
+
+        return true;
     }

     /**
@@ -102,16 +118,13 @@ public function gc($lifetime)
      */
     public function write($sessionId, $data)
     {
-        $data = array(
-            $this->options['id_field']   => $sessionId,
-            $this->options['data_field'] => new \MongoBinData($data, \MongoBinData::BYTE_ARRAY),
-            $this->options['time_field'] => new \MongoTimestamp()
-        );
-
         $this->getCollection()->update(
             array($this->options['id_field'] => $sessionId),
-            array('$set' => $data),
-            array('upsert' => true)
+            array('$set' => array(
+                $this->options['data_field'] => new \MongoBinData($data, \MongoBinData::BYTE_ARRAY),
+                $this->options['time_field'] => new \MongoDate(),
+            )),
+            array('upsert' => true, 'multiple' => false)
         );

         return true;
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php
new file mode 100644
index 0000000..d579be8
--- /dev/null
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php
@@ -0,0 +1,112 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpFoundation\Tests;
+
+use Symfony\Component\HttpFoundation\AcceptHeaderItem;
+
+class AcceptHeaderItemTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @dataProvider provideFromStringData
+     */
+    public function testFromString($string, $value, array $attributes)
+    {
+        $item = AcceptHeaderItem::fromString($string);
+        $this->assertEquals($value, $item->getValue());
+        $this->assertEquals($attributes, $item->getAttributes());
+    }
+
+    /**
+     * @dataProvider provideToStringData
+     */
+    public function testToString($value, array $attributes, $string)
+    {
+        $item = new AcceptHeaderItem($value, $attributes);
+        $this->assertEquals($string, (string) $item);
+    }
+
+    public function testValue()
+    {
+        $item = new AcceptHeaderItem('value', array());
+        $this->assertEquals('value', $item->getValue());
+
+        $item->setValue('new value');
+        $this->assertEquals('new value', $item->getValue());
+
+        $item->setValue(1);
+        $this->assertEquals('1', $item->getValue());
+    }
+
+    public function testQuality()
+    {
+        $item = new AcceptHeaderItem('value', array());
+        $this->assertEquals(1.0, $item->getQuality());
+
+        $item->setQuality(0.5);
+        $this->assertEquals(0.5, $item->getQuality());
+
+        $item->setAttribute('q', 0.75);
+        $this->assertEquals(0.75, $item->getQuality());
+        $this->assertFalse($item->hasAttribute('q'));
+    }
+
+    public function testAttribute()
+    {
+        $item = new AcceptHeaderItem('value', array());
+        $this->assertEquals(array(), $item->getAttributes());
+        $this->assertFalse($item->hasAttribute('test'));
+        $this->assertNull($item->getAttribute('test'));
+        $this->assertEquals('default', $item->getAttribute('test', 'default'));
+
+        $item->setAttribute('test', 'value');
+        $this->assertEquals(array('test' => 'value'), $item->getAttributes());
+        $this->assertTrue($item->hasAttribute('test'));
+        $this->assertEquals('value', $item->getAttribute('test'));
+        $this->assertEquals('value', $item->getAttribute('test', 'default'));
+    }
+
+    public function provideFromStringData()
+    {
+        return array(
+            array(
+                'text/html',
+                'text/html', array()
+            ),
+            array(
+                '"this;should,not=matter"',
+                'this;should,not=matter', array()
+            ),
+            array(
+                "text/plain; charset=utf-8;param=\"this;should,not=matter\";\tfootnotes=true",
+                'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true')
+            ),
+            array(
+                '"this;should,not=matter";charset=utf-8',
+                'this;should,not=matter', array('charset' => 'utf-8')
+            ),
+        );
+    }
+
+    public function provideToStringData()
+    {
+        return array(
+            array(
+                'text/html', array(),
+                'text/html'
+            ),
+            array(
+                'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'),
+                'text/plain;charset=utf-8;param="this;should,not=matter";footnotes=true'
+            ),
+        );
+    }
+}
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
new file mode 100644
index 0000000..dcb4b96
--- /dev/null
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpFoundation\Tests;
+
+use Symfony\Component\HttpFoundation\AcceptHeader;
+use Symfony\Component\HttpFoundation\AcceptHeaderItem;
+
+class AcceptHeaderTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @dataProvider provideFromStringData
+     */
+    public function testFromString($string, array $items)
+    {
+        $header = AcceptHeader::fromString($string);
+        $parsed = array_values($header->all());
+        // reset index since the fixtures don't have them set
+        foreach ($parsed as $item) {
+            $item->setIndex(0);
+        }
+        $this->assertEquals($items, $parsed);
+    }
+
+    /**
+     * @dataProvider provideToStringData
+     */
+    public function testToString(array $items, $string)
+    {
+        $header = new AcceptHeader($items);
+        $this->assertEquals($string, (string) $header);
+    }
+
+    /**
+     * @dataProvider provideFilterData
+     */
+    public function testFilter($string, $filter, array $values)
+    {
+        $header = AcceptHeader::fromString($string)->filter($filter);
+        $this->assertEquals($values, array_keys($header->all()));
+    }
+
+    /**
+     * @dataProvider provideSortingData
+     */
+    public function testSorting($string, array $values)
+    {
+        $header = AcceptHeader::fromString($string);
+        $this->assertEquals($values, array_keys($header->all()));
+    }
+
+    public function provideFromStringData()
+    {
+        return array(
+            array('', array()),
+            array('gzip', array(new AcceptHeaderItem('gzip'))),
+            array('gzip,deflate,sdch', array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))),
+            array("gzip, deflate\t,sdch", array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))),
+            array('"this;should,not=matter"', array(new AcceptHeaderItem('this;should,not=matter'))),
+        );
+    }
+
+    public function provideFilterData()
+    {
+        return array(
+            array('fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', array('fr-FR', 'fr')),
+        );
+    }
+
+    public function provideSortingData()
+    {
+        return array(
+            'quality has priority' => array('*;q=0.3,ISO-8859-1,utf-8;q=0.7',  array('ISO-8859-1', 'utf-8', '*')),
+            'order matters when q is equal' => array('*;q=0.3,ISO-8859-1;q=0.7,utf-8;q=0.7',  array('ISO-8859-1', 'utf-8', '*')),
+            'order matters when q is equal2' => array('*;q=0.3,utf-8;q=0.7,ISO-8859-1;q=0.7',  array('utf-8', 'ISO-8859-1', '*')),
+        );
+    }
+
+    public function provideToStringData()
+    {
+        return array(
+            array(array(), ''),
+            array(array(new AcceptHeaderItem('gzip')), 'gzip'),
+            array(array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')), 'gzip,deflate,sdch'),
+            array(array(new AcceptHeaderItem('this;should,not=matter')), 'this;should,not=matter'),
+        );
+    }
+}
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
new file mode 100644
index 0000000..4a8fe54
--- /dev/null
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
@@ -0,0 +1,124 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpFoundation\Tests;
+
+use Symfony\Component\HttpFoundation\BinaryFileResponse;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\ResponseHeaderBag;
+
+class BinaryFileResponseTest extends \PHPUnit_Framework_TestCase
+{
+    public function testConstruction()
+    {
+        $response = new BinaryFileResponse('README.md', 404, array('X-Header' => 'Foo'), true, null, true, true);
+        $this->assertEquals(404, $response->getStatusCode());
+        $this->assertEquals('Foo', $response->headers->get('X-Header'));
+        $this->assertTrue($response->headers->has('ETag'));
+        $this->assertTrue($response->headers->has('Last-Modified'));
+        $this->assertFalse($response->headers->has('Content-Disposition'));
+
+        $response = BinaryFileResponse::create('README.md', 404, array(), true, ResponseHeaderBag::DISPOSITION_INLINE);
+        $this->assertEquals(404, $response->getStatusCode());
+        $this->assertFalse($response->headers->has('ETag'));
+        $this->assertEquals('inline; filename="README.md"', $response->headers->get('Content-Disposition'));
+    }
+
+    /**
+     * @expectedException \LogicException
+     */
+    public function testSetContent()
+    {
+        $response = new BinaryFileResponse('README.md');
+        $response->setContent('foo');
+    }
+
+    public function testGetContent()
+    {
+        $response = new BinaryFileResponse('README.md');
+        $this->assertFalse($response->getContent());
+    }
+
+    public function testRequests()
+    {
+        $response = BinaryFileResponse::create('src/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif')->setAutoEtag();
+
+        // do a request to get the ETag
+        $request = Request::create('/');
+        $response->prepare($request);
+        $etag = $response->headers->get('ETag');
+
+        // prepare a request for a range of the testing file
+        $request = Request::create('/');
+        $request->headers->set('If-Range', $etag);
+        $request->headers->set('Range', 'bytes=1-4');
+
+        $this->expectOutputString('IF8');
+        $response = clone $response;
+        $response->prepare($request);
+        $response->sendContent();
+
+        $this->assertEquals('binary', $response->headers->get('Content-Transfer-Encoding'));
+    }
+
+    public function testXSendfile()
+    {
+        $request = Request::create('/');
+        $request->headers->set('X-Sendfile-Type', 'X-Sendfile');
+
+        BinaryFileResponse::trustXSendfileTypeHeader();
+        $response = BinaryFileResponse::create('README.md');
+        $response->prepare($request);
+
+        $this->expectOutputString('');
+        $response->sendContent();
+
+        $this->assertContains('README.md', $response->headers->get('X-Sendfile'));
+    }
+
+    /**
+     * @dataProvider getSampleXAccelMappings
+     */
+    public function testXAccelMapping($realpath, $mapping, $virtual)
+    {
+        $request = Request::create('/');
+        $request->headers->set('X-Sendfile-Type', 'X-Accel-Redirect');
+        $request->headers->set('X-Accel-Mapping', $mapping);
+
+        $file = $this->getMockBuilder('Symfony\Component\HttpFoundation\File\File')
+                     ->disableOriginalConstructor()
+                     ->getMock();
+        $file->expects($this->any())
+             ->method('getRealPath')
+             ->will($this->returnValue($realpath));
+        $file->expects($this->any())
+             ->method('isReadable')
+             ->will($this->returnValue(true));
+
+        BinaryFileResponse::trustXSendFileTypeHeader();
+        $response = new BinaryFileResponse('README.md');
+        $reflection = new \ReflectionObject($response);
+        $property = $reflection->getProperty('file');
+        $property->setAccessible(true);
+        $property->setValue($response, $file);
+
+        $response->prepare($request);
+        $this->assertEquals($virtual, $response->headers->get('X-Accel-Redirect'));
+    }
+
+    public function getSampleXAccelMappings()
+    {
+        return array(
+            array('/var/www/var/www/files/foo.txt', '/files/=/var/www/', '/files/var/www/files/foo.txt'),
+            array('/home/foo/bar.txt', '/files/=/var/www/,/baz/=/home/foo/', '/baz/bar.txt'),
+        );
+    }
+}
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/CookieTest.php
index 6a9948d..721cc3c 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/CookieTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/CookieTest.php
@@ -79,6 +79,23 @@ public function testGetExpiresTime()
         $this->assertEquals(3600, $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date');
     }

+    public function testConstructorWithDateTime()
+    {
+        $expire = new \DateTime();
+        $cookie = new Cookie('foo', 'bar', $expire);
+
+        $this->assertEquals($expire->format('U'), $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date');
+    }
+
+    public function testGetExpiresTimeWithStringValue()
+    {
+        $value = "+1 day";
+        $cookie = new Cookie('foo', 'bar', $value);
+        $expire = strtotime($value);
+
+        $this->assertEquals($expire, $cookie->getExpiresTime(), '->getExpiresTime() returns the expire date');
+    }
+
     public function testGetDomain()
     {
         $cookie = new Cookie('foo', 'bar', 3600, '/', '.myfoodomain.com');
diff --git 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
index b42a3fc..ae12aa0 100644
--- 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
@@ -89,6 +89,20 @@ public function testGetClientOriginalName()
         $this->assertEquals('original.gif', $file->getClientOriginalName());
     }

+    public function testGetClientOriginalExtension()
+    {
+        $file = new UploadedFile(
+            __DIR__.'/Fixtures/test.gif',
+            'original.gif',
+            'image/gif',
+            filesize(__DIR__.'/Fixtures/test.gif'),
+            null
+        );
+
+        $this->assertEquals('gif', $file->getClientOriginalExtension());
+    }
+
+
     /**
      * @expectedException Symfony\Component\HttpFoundation\File\Exception\FileException
      */
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php
index bafccb2..20d3603 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php
@@ -24,6 +24,49 @@ public function testConstructor()
         $this->assertTrue($bag->has('foo'));
     }

+    public function testToStringNull()
+    {
+        $bag = new HeaderBag();
+        $this->assertEquals('', $bag->__toString());
+    }
+
+    public function testToStringNotNull()
+    {
+        $bag = new HeaderBag(array('foo' => 'bar'));
+        $this->assertEquals("Foo: bar\r\n", $bag->__toString());
+    }
+
+    public function testKeys()
+    {
+        $bag = new HeaderBag(array('foo' => 'bar'));
+        $keys = $bag->keys();
+        $this->assertEquals("foo", $keys[0]);
+    }
+
+    public function testGetDate()
+    {
+        $bag = new HeaderBag(array('foo' => 'Tue, 4 Sep 2012 20:00:00 +0200'));
+        $headerDate = $bag->getDate('foo');
+        $this->assertInstanceOf('DateTime', $headerDate);
+    }
+
+    /**
+     * @expectedException \RuntimeException
+     */
+    public function testGetDateException()
+    {
+        $bag = new HeaderBag(array('foo' => 'Tue'));
+        $headerDate = $bag->getDate('foo');
+    }
+
+    public function testGetCacheControlHeader()
+    {
+        $bag = new HeaderBag();
+        $bag->addCacheControlDirective('public', '#a');
+        $this->assertTrue($bag->hasCacheControlDirective('public'));
+        $this->assertEquals('#a', $bag->getCacheControlDirective('public'));
+    }
+
     /**
      * @covers Symfony\Component\HttpFoundation\HeaderBag::all
      */
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
index a89da93..8f1383f 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
@@ -13,11 +13,6 @@

 use Symfony\Component\HttpFoundation\JsonResponse;

-/**
- * @covers Symfony\Component\HttpFoundation\JsonResponse::__construct
- * @covers Symfony\Component\HttpFoundation\JsonResponse::setData
- * @covers Symfony\Component\HttpFoundation\JsonResponse::setCallback
- */
 class JsonResponseTest extends \PHPUnit_Framework_TestCase
 {
     public function testConstructorEmptyCreatesJsonObject()
@@ -89,6 +84,73 @@ public function testCreate()
         $this->assertEquals(204, $response->getStatusCode());
     }

+    public function testStaticCreateEmptyJsonObject()
+    {
+        $response = JsonResponse::create();
+        $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
+        $this->assertSame('{}', $response->getContent());
+    }
+
+    public function testStaticCreateJsonArray()
+    {
+        $response = JsonResponse::create(array(0, 1, 2, 3));
+        $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
+        $this->assertSame('[0,1,2,3]', $response->getContent());
+    }
+
+    public function testStaticCreateJsonObject()
+    {
+        $response = JsonResponse::create(array('foo' => 'bar'));
+        $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
+        $this->assertSame('{"foo":"bar"}', $response->getContent());
+    }
+
+    public function testStaticCreateWithSimpleTypes()
+    {
+        $response = JsonResponse::create('foo');
+        $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
+        $this->assertSame('"foo"', $response->getContent());
+
+        $response = JsonResponse::create(0);
+        $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
+        $this->assertSame('0', $response->getContent());
+
+        $response = JsonResponse::create(0.1);
+        $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
+        $this->assertSame('0.1', $response->getContent());
+
+        $response = JsonResponse::create(true);
+        $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
+        $this->assertSame('true', $response->getContent());
+    }
+
+    public function testStaticCreateWithCustomStatus()
+    {
+        $response = JsonResponse::create(array(), 202);
+        $this->assertSame(202, $response->getStatusCode());
+    }
+
+    public function testStaticCreateAddsContentTypeHeader()
+    {
+        $response = JsonResponse::create();
+        $this->assertSame('application/json', $response->headers->get('Content-Type'));
+    }
+
+    public function testStaticCreateWithCustomHeaders()
+    {
+        $response = JsonResponse::create(array(), 200, array('ETag' => 'foo'));
+        $this->assertSame('application/json', $response->headers->get('Content-Type'));
+        $this->assertSame('foo', $response->headers->get('ETag'));
+    }
+
+    public function testStaticCreateWithCustomContentType()
+    {
+        $headers = array('Content-Type' => 'application/vnd.acme.blog-v1+json');
+
+        $response = JsonResponse::create(array(), 200, $headers);
+        $this->assertSame('application/vnd.acme.blog-v1+json', $response->headers->get('Content-Type'));
+    }
+
     public function testSetCallback()
     {
         $response = JsonResponse::create(array('foo' => 'bar'))->setCallback('callback');
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
index c3c0b16..6cd42bf 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
@@ -32,6 +32,28 @@ public function testAll()
         $this->assertEquals(array('foo' => 'bar'), $bag->all(), '->all() gets all the input');
     }

+    public function testKeys()
+    {
+        $bag = new ParameterBag(array('foo' => 'bar'));
+        $this->assertEquals(array('foo'), $bag->keys());
+    }
+
+    public function testAdd()
+    {
+        $bag = new ParameterBag(array('foo' => 'bar'));
+        $bag->add(array('bar' => 'bas'));
+        $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all());
+    }
+
+    public function testRemove()
+    {
+        $bag = new ParameterBag(array('foo' => 'bar'));
+        $bag->add(array('bar' => 'bas'));
+        $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all());
+        $bag->remove('bar');
+        $this->assertEquals(array('foo' => 'bar'), $bag->all());
+    }
+
     /**
      * @covers Symfony\Component\HttpFoundation\ParameterBag::replace
      */
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php
index b55c3b6..330d9fe 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php
@@ -25,6 +25,22 @@ public function testGenerateMetaRedirect()
         ));
     }

+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testRedirectResponseConstructorNullUrl()
+    {
+        $response = new RedirectResponse(null);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testRedirectResponseConstructorWrongStatusCode()
+    {
+        $response = new RedirectResponse('foo.bar', 404);
+    }
+
     public function testGenerateLocationHeader()
     {
         $response = new RedirectResponse('foo.bar');
@@ -48,6 +64,15 @@ public function testSetTargetUrl()
         $this->assertEquals('baz.beep', $response->getTargetUrl());
     }

+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testSetTargetUrlNull()
+    {
+        $response = new RedirectResponse('foo.bar');
+        $response->setTargetUrl(null);
+    }
+
     public function testCreate()
     {
         $response = RedirectResponse::create('foo', 301);
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php
index 1e447c5..488bf5e 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php
@@ -45,6 +45,55 @@ public function testInitialize()
         $this->assertEquals('bar', $request->headers->get('FOO'), '->initialize() takes an array of HTTP headers as its fourth argument');
     }

+    public function testGetLocale()
+    {
+        $request = new Request();
+        $request->setLocale('pl');
+        $locale = $request->getLocale();
+        $this->assertEquals('pl', $locale);
+    }
+
+    public function testGetUser()
+    {
+        $request = Request::create('http://user_test:password_test@test.com/');
+        $user = $request->getUser();
+
+        $this->assertEquals('user_test', $user);
+    }
+
+    public function testGetPassword()
+    {
+        $request = Request::create('http://user_test:password_test@test.com/');
+        $password = $request->getPassword();
+
+        $this->assertEquals('password_test', $password);
+    }
+
+    public function testIsNoCache()
+    {
+        $request = new Request();
+        $isNoCache = $request->isNoCache();
+
+        $this->assertFalse($isNoCache);
+    }
+
+    public function testGetContentType()
+    {
+        $request = new Request();
+        $contentType = $request->getContentType();
+
+        $this->assertNull($contentType);
+    }
+
+    public function testSetDefaultLocale()
+    {
+        $request = new Request();
+        $request->setDefaultLocale('pl');
+        $locale = $request->getLocale();
+
+        $this->assertEquals('pl', $locale);
+    }
+
     /**
      * @covers Symfony\Component\HttpFoundation\Request::create
      */
@@ -127,6 +176,14 @@ public function testCreate()
         $this->assertEquals('test.com', $request->getHttpHost());
         $this->assertFalse($request->isSecure());

+        $request = Request::create('http://test.com?test=1');
+        $this->assertEquals('http://test.com/?test=1', $request->getUri());
+        $this->assertEquals('/', $request->getPathInfo());
+        $this->assertEquals('test=1', $request->getQueryString());
+        $this->assertEquals(80, $request->getPort());
+        $this->assertEquals('test.com', $request->getHttpHost());
+        $this->assertFalse($request->isSecure());
+
         $request = Request::create('http://test.com:90/?test=1');
         $this->assertEquals('http://test.com:90/?test=1', $request->getUri());
         $this->assertEquals('/', $request->getPathInfo());
@@ -136,7 +193,7 @@ public function testCreate()
         $this->assertFalse($request->isSecure());

         $request = Request::create('http://test:test@test.com');
-        $this->assertEquals('http://test:test@test.com/', $request->getUri());
+        $this->assertEquals('http://test.com/', $request->getUri());
         $this->assertEquals('/', $request->getPathInfo());
         $this->assertEquals('', $request->getQueryString());
         $this->assertEquals(80, $request->getPort());
@@ -146,7 +203,7 @@ public function testCreate()
         $this->assertFalse($request->isSecure());

         $request = Request::create('http://testnopass@test.com');
-        $this->assertEquals('http://testnopass@test.com/', $request->getUri());
+        $this->assertEquals('http://test.com/', $request->getUri());
         $this->assertEquals('/', $request->getPathInfo());
         $this->assertEquals('', $request->getQueryString());
         $this->assertEquals(80, $request->getPort());
@@ -340,11 +397,11 @@ public function testGetUri()

         $server['PHP_AUTH_USER'] = 'fabien';
         $request->initialize(array(), array(), array(), array(), array(), $server);
-        $this->assertEquals('http://fabien@hostname:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri());
+        $this->assertEquals('http://hostname:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri());

         $server['PHP_AUTH_PW'] = 'symfony';
         $request->initialize(array(), array(), array(), array(), array(), $server);
-        $this->assertEquals('http://fabien:symfony@hostname:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri());
+        $this->assertEquals('http://hostname:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri());
     }

     /**
@@ -450,11 +507,11 @@ public function testGetUriForPath()

         $server['PHP_AUTH_USER'] = 'fabien';
         $request->initialize(array(), array(), array(), array(), array(), $server);
-        $this->assertEquals('http://fabien@servername/some/path', $request->getUriForPath('/some/path'));
+        $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path'));

         $server['PHP_AUTH_PW'] = 'symfony';
         $request->initialize(array(), array(), array(), array(), array(), $server);
-        $this->assertEquals('http://fabien:symfony@servername/some/path', $request->getUriForPath('/some/path'));
+        $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path'));
     }

     /**
@@ -491,15 +548,15 @@ public function testGetSchemeAndHttpHost()

         $server['PHP_AUTH_USER'] = 'fabien';
         $request->initialize(array(), array(), array(), array(), array(), $server);
-        $this->assertEquals('http://fabien@servername:90', $request->getSchemeAndHttpHost());
+        $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost());

         $server['PHP_AUTH_USER'] = '0';
         $request->initialize(array(), array(), array(), array(), array(), $server);
-        $this->assertEquals('http://0@servername:90', $request->getSchemeAndHttpHost());
+        $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost());

         $server['PHP_AUTH_PW'] = '0';
         $request->initialize(array(), array(), array(), array(), array(), $server);
-        $this->assertEquals('http://0:0@servername:90', $request->getSchemeAndHttpHost());
+        $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost());
     }

     /**
@@ -900,6 +957,27 @@ public function testIsXmlHttpRequest()
         $this->assertFalse($request->isXmlHttpRequest());
     }

+    public function testIntlLocale()
+    {
+        if (!extension_loaded('intl')) {
+            $this->markTestSkipped('The intl extension is needed to run this test.');
+        }
+
+        $request = new Request();
+
+        $request->setDefaultLocale('fr');
+        $this->assertEquals('fr', $request->getLocale());
+        $this->assertEquals('fr', \Locale::getDefault());
+
+        $request->setLocale('en');
+        $this->assertEquals('en', $request->getLocale());
+        $this->assertEquals('en', \Locale::getDefault());
+
+        $request->setDefaultLocale('de');
+        $this->assertEquals('en', $request->getLocale());
+        $this->assertEquals('en', \Locale::getDefault());
+    }
+
     public function testGetCharsets()
     {
         $request = new Request();
@@ -913,7 +991,7 @@ public function testGetCharsets()

         $request = new Request();
         $request->headers->set('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7');
-        $this->assertEquals(array('ISO-8859-1', '*', 'utf-8'), $request->getCharsets());
+        $this->assertEquals(array('ISO-8859-1', 'utf-8', '*'), $request->getCharsets());
     }

     public function testGetAcceptableContentTypes()
@@ -925,7 +1003,7 @@ public function testGetAcceptableContentTypes()

         $request = new Request();
         $request->headers->set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*');
-        $this->assertEquals(array('multipart/mixed', '*/*', 'text/html', 'application/xhtml+xml', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/vnd.wap.wmlscriptc'), $request->getAcceptableContentTypes());
+        $this->assertEquals(array('application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'), $request->getAcceptableContentTypes());
     }

     public function testGetLanguages()
@@ -939,6 +1017,18 @@ public function testGetLanguages()
         $this->assertEquals(array('zh', 'en_US', 'en'), $request->getLanguages());

         $request = new Request();
+        $request->headers->set('Accept-language', 'zh, en-us; q=0.6, en; q=0.8');
+        $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test out of order qvalues
+
+        $request = new Request();
+        $request->headers->set('Accept-language', 'zh, en, en-us');
+        $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test equal weighting without qvalues
+
+        $request = new Request();
+        $request->headers->set('Accept-language', 'zh; q=0.6, en, en-us; q=0.6');
+        $this->assertEquals(array('en', 'zh', 'en_US'), $request->getLanguages()); // Test equal weighting with qvalues
+
+        $request = new Request();
         $request->headers->set('Accept-language', 'zh, i-cherokee; q=0.6');
         $this->assertEquals(array('zh', 'cherokee'), $request->getLanguages());
     }
@@ -977,6 +1067,19 @@ public function testHasSession()
         $this->assertTrue($request->hasSession());
     }

+    public function testGetSession()
+    {
+        $request = new Request();
+
+        $request->setSession(new Session(new MockArraySessionStorage()));
+        $this->assertTrue($request->hasSession());
+
+        $session = $request->getSession();
+        $this->assertObjectHasAttribute('storage', $session);
+        $this->assertObjectHasAttribute('flashName', $session);
+        $this->assertObjectHasAttribute('attributeName', $session);
+    }
+
     public function testHasPreviousSession()
     {
         $request = new Request();
@@ -1014,10 +1117,10 @@ public function splitHttpAcceptHeaderData()
             array('text/html;q=0.8', array('text/html' => 0.8)),
             array('text/html;foo=bar;q=0.8 ', array('text/html;foo=bar' => 0.8)),
             array('text/html;charset=utf-8; q=0.8', array('text/html;charset=utf-8' => 0.8)),
-            array('text/html,application/xml;q=0.9,*/*;charset=utf-8; q=0.8', array('text/html' => 1, 'application/xml' => 0.9, '*/*;charset=utf-8' => 0.8)),
-            array('text/html,application/xhtml+xml;q=0.9,*/*;q=0.8; foo=bar', array('text/html' => 1, 'application/xhtml+xml' => 0.9, '*/*' => 0.8)),
-            array('text/html,application/xhtml+xml;charset=utf-8;q=0.9; foo=bar,*/*', array('text/html' => 1, '*/*' => 1, 'application/xhtml+xml;charset=utf-8' => 0.9)),
-            array('text/html,application/xhtml+xml', array('application/xhtml+xml' => 1, 'text/html' => 1)),
+            array('text/html,application/xml;q=0.9,*/*;charset=utf-8; q=0.8', array('text/html' => 1.0, 'application/xml' => 0.9, '*/*;charset=utf-8' => 0.8)),
+            array('text/html,application/xhtml+xml;q=0.9,*/*;q=0.8; foo=bar', array('text/html' => 1.0, 'application/xhtml+xml' => 0.9, '*/*;foo=bar' => 0.8)),
+            array('text/html,application/xhtml+xml;charset=utf-8;q=0.9; foo=bar,*/*', array('text/html' => 1.0, '*/*' => 1.0, 'application/xhtml+xml;charset=utf-8;foo=bar' => 0.9)),
+            array('text/html,application/xhtml+xml', array('text/html' => 1.0, 'application/xhtml+xml' => 1.0)),
         );
     }

diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php
index 0e8a67d..fd163d1 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php
@@ -16,6 +16,51 @@

 class ResponseHeaderBagTest extends \PHPUnit_Framework_TestCase
 {
+    /**
+     * @covers Symfony\Component\HttpFoundation\ResponseHeaderBag::allPreserveCase
+     * @dataProvider provideAllPreserveCase
+     */
+    public function testAllPreserveCase($headers, $expected)
+    {
+        $bag = new ResponseHeaderBag($headers);
+
+        $this->assertEquals($expected, $bag->allPreserveCase(), '->allPreserveCase() gets all input keys in original case');
+    }
+
+    public function provideAllPreserveCase()
+    {
+        return array(
+            array(
+                array('fOo' => 'BAR'),
+                array('fOo' => array('BAR'), 'Cache-Control' => array('no-cache'))
+            ),
+            array(
+                array('ETag' => 'xyzzy'),
+                array('ETag' => array('xyzzy'), 'Cache-Control' => array('private, must-revalidate'))
+            ),
+            array(
+                array('Content-MD5' => 'Q2hlY2sgSW50ZWdyaXR5IQ=='),
+                array('Content-MD5' => array('Q2hlY2sgSW50ZWdyaXR5IQ=='), 'Cache-Control' => array('no-cache'))
+            ),
+            array(
+                array('P3P' => 'CP="CAO PSA OUR"'),
+                array('P3P' => array('CP="CAO PSA OUR"'), 'Cache-Control' => array('no-cache'))
+            ),
+            array(
+                array('WWW-Authenticate' => 'Basic realm="WallyWorld"'),
+                array('WWW-Authenticate' => array('Basic realm="WallyWorld"'), 'Cache-Control' => array('no-cache'))
+            ),
+            array(
+                array('X-UA-Compatible' => 'IE=edge,chrome=1'),
+                array('X-UA-Compatible' => array('IE=edge,chrome=1'), 'Cache-Control' => array('no-cache'))
+            ),
+            array(
+                array('X-XSS-Protection' => '1; mode=block'),
+                array('X-XSS-Protection' => array('1; mode=block'), 'Cache-Control' => array('no-cache'))
+            ),
+        );
+    }
+
     public function testCacheControlHeader()
     {
         $bag = new ResponseHeaderBag(array());
@@ -76,6 +121,29 @@ public function testToStringIncludesCookieHeaders()
         $this->assertContains("Set-Cookie: foo=deleted; expires=".gmdate("D, d-M-Y H:i:s T", time() - 31536001)."; httponly", explode("\r\n", $bag->__toString()));
     }

+    public function testReplace()
+    {
+        $bag = new ResponseHeaderBag(array());
+        $this->assertEquals('no-cache', $bag->get('Cache-Control'));
+        $this->assertTrue($bag->hasCacheControlDirective('no-cache'));
+
+        $bag->replace(array('Cache-Control' => 'public'));
+        $this->assertEquals('public', $bag->get('Cache-Control'));
+        $this->assertTrue($bag->hasCacheControlDirective('public'));
+    }
+
+    public function testReplaceWithRemove()
+    {
+        $bag = new ResponseHeaderBag(array());
+        $this->assertEquals('no-cache', $bag->get('Cache-Control'));
+        $this->assertTrue($bag->hasCacheControlDirective('no-cache'));
+
+        $bag->remove('Cache-Control');
+        $bag->replace(array());
+        $this->assertEquals('no-cache', $bag->get('Cache-Control'));
+        $this->assertTrue($bag->hasCacheControlDirective('no-cache'));
+    }
+
     public function testCookiesWithSameNames()
     {
         $bag = new ResponseHeaderBag();
@@ -119,6 +187,34 @@ public function testRemoveCookie()
         $this->assertFalse(isset($cookies['foo.bar']));
     }

+    public function testRemoveCookieWithNullRemove()
+    {
+        $bag = new ResponseHeaderBag();
+        $bag->setCookie(new Cookie('foo', 'bar', 0));
+        $bag->setCookie(new Cookie('bar', 'foo', 0));
+
+        $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY);
+        $this->assertTrue(isset($cookies['']['/']));
+
+        $bag->removeCookie('foo', null);
+        $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY);
+        $this->assertFalse(isset($cookies['']['/']['foo']));
+
+        $bag->removeCookie('bar', null);
+        $cookies = $bag->getCookies(ResponseHeaderBag::COOKIES_ARRAY);
+        $this->assertFalse(isset($cookies['']['/']['bar']));
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testGetCookiesWithInvalidArgument()
+    {
+        $bag = new ResponseHeaderBag();
+
+        $cookies = $bag->getCookies('invalid_argument');
+    }
+
     /**
      * @expectedException \InvalidArgumentException
      */
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
index cbbdd29..c14dc4b 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
@@ -25,6 +25,99 @@ public function testCreate()
         $this->assertEquals('bar', $response->headers->get('foo'));
     }

+    public function testToString()
+    {
+        $response = new Response();
+        $response = explode("\r\n", $response);
+        $this->assertEquals("HTTP/1.0 200 OK", $response[0]);
+        $this->assertEquals("Cache-Control: no-cache", $response[1]);
+    }
+
+    public function testClone()
+    {
+        $response = new Response();
+        $responseClone = clone $response;
+        $this->assertEquals($response, $responseClone);
+    }
+
+    public function testSendHeaders()
+    {
+        $response = new Response();
+        $headers = $response->sendHeaders();
+        $this->assertObjectHasAttribute('headers', $headers);
+        $this->assertObjectHasAttribute('content', $headers);
+        $this->assertObjectHasAttribute('version', $headers);
+        $this->assertObjectHasAttribute('statusCode', $headers);
+        $this->assertObjectHasAttribute('statusText', $headers);
+        $this->assertObjectHasAttribute('charset', $headers);
+    }
+
+    public function testSend()
+    {
+        $response = new Response();
+        $responseSend = $response->send();
+        $this->assertObjectHasAttribute('headers', $responseSend);
+        $this->assertObjectHasAttribute('content', $responseSend);
+        $this->assertObjectHasAttribute('version', $responseSend);
+        $this->assertObjectHasAttribute('statusCode', $responseSend);
+        $this->assertObjectHasAttribute('statusText', $responseSend);
+        $this->assertObjectHasAttribute('charset', $responseSend);
+    }
+
+    public function testGetCharset()
+    {
+        $response = new Response();
+        $charsetOrigin = 'UTF-8';
+        $response->setCharset($charsetOrigin);
+        $charset = $response->getCharset();
+        $this->assertEquals($charsetOrigin, $charset);
+    }
+
+    public function testIsCacheable()
+    {
+        $response = new Response();
+        $this->assertFalse($response->isCacheable());
+    }
+
+    public function testIsCacheableWithSetTtl()
+    {
+        $response = new Response();
+        $response->setTtl(10);
+        $this->assertTrue($response->isCacheable());
+    }
+
+    public function testMustRevalidate()
+    {
+        $response = new Response();
+        $this->assertFalse($response->mustRevalidate());
+    }
+
+    public function testSetNotModified()
+    {
+        $response = new Response();
+        $modified = $response->setNotModified();
+        $this->assertObjectHasAttribute('headers', $modified);
+        $this->assertObjectHasAttribute('content', $modified);
+        $this->assertObjectHasAttribute('version', $modified);
+        $this->assertObjectHasAttribute('statusCode', $modified);
+        $this->assertObjectHasAttribute('statusText', $modified);
+        $this->assertObjectHasAttribute('charset', $modified);
+        $this->assertEquals(304, $modified->getStatusCode());
+    }
+
+    public function testIsSuccessful()
+    {
+        $response = new Response();
+        $this->assertTrue($response->isSuccessful());
+    }
+
+    public function testIsNotModified()
+    {
+        $response = new Response();
+        $modified = $response->isNotModified(new Request());
+        $this->assertFalse($modified);
+    }
+
     public function testIsValidateable()
     {
         $response = new Response('', 200, array('Last-Modified' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822)));
@@ -50,6 +143,10 @@ public function testGetDate()
         $now = $this->createDateTimeNow();
         $response->headers->set('Date', $now->format(DATE_RFC2822));
         $this->assertEquals(0, $now->diff($response->getDate())->format('%s'), '->getDate() returns the date when the header has been modified');
+
+        $response = new Response('', 200);
+        $response->headers->remove('Date');
+        $this->assertInstanceOf('\DateTime', $response->getDate());
     }

     public function testGetMaxAge()
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php
index 432499e..622d65b 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php
@@ -9,7 +9,7 @@
  * file that was distributed with this source code.
  */

-namespace Symfony\Component\HttpFoundation\Tests;
+namespace Symfony\Component\HttpFoundation\Tests\Session\Attribute;

 use Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag;

diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
index 7bdc127..2568b3c 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php
@@ -54,6 +54,29 @@ public function testStart()
         $this->assertNotEquals('', $this->session->getId());
     }

+    public function testIsStarted()
+    {
+        $this->assertFalse($this->session->isStarted());
+        $this->session->start();
+        $this->assertTrue($this->session->isStarted());
+    }
+
+    public function testSetId()
+    {
+        $this->assertEquals('', $this->session->getId());
+        $this->session->setId('0123456789abcdef');
+        $this->session->start();
+        $this->assertEquals('0123456789abcdef', $this->session->getId());
+    }
+
+    public function testSetName()
+    {
+        $this->assertEquals('MOCKSESSID', $this->session->getName());
+        $this->session->setName('session.test.com');
+        $this->session->start();
+        $this->assertEquals('session.test.com', $this->session->getName());
+    }
+
     public function testGet()
     {
         // tests defaults
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
index c9eb0b3..409296e 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
@@ -18,35 +18,32 @@
  */
 class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase
 {
-    private static $mongo;
-
-    public static function setUpBeforeClass()
-    {
-        if (class_exists('\Mongo')) {
-            try {
-                self::$mongo = new \Mongo();
-            } catch (\Exception $e) {
-            }
-        }
-    }
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $mongo;
+    private $storage;
+    public $options;

     protected function setUp()
     {
-        if (null === self::$mongo) {
-            $this->markTestSkipped('MongoDbSessionHandler requires the php "mongo" extension and a mongodb server on localhost');
+        if (!class_exists('\Mongo')) {
+            $this->markTestSkipped('MongoDbSessionHandler requires the mongo extension.');
         }

-        $this->options = array('database' => 'sf2-test', 'collection' => 'session-test');
-        $this->options = array('database' => 'sf2-test', 'collection' => 'session-test');
+        $this->mongo = $this->getMockBuilder('Mongo')
+            ->disableOriginalConstructor()
+            ->getMock();

-        $this->storage = new MongoDbSessionHandler(self::$mongo, $this->options);
-    }
+        $this->options = array(
+            'id_field'   => '_id',
+            'data_field' => 'data',
+            'time_field' => 'time',
+            'database' => 'sf2-test',
+            'collection' => 'session-test'
+        );

-    protected function tearDown()
-    {
-        if (null !== self::$mongo) {
-            self::$mongo->dropDB($this->options['database']);
-        }
+        $this->storage = new MongoDbSessionHandler($this->mongo, $this->options);
     }

     public function testOpenMethodAlwaysReturnTrue()
@@ -61,39 +58,132 @@ public function testCloseMethodAlwaysReturnTrue()

     public function testWrite()
     {
+        $database = $this->getMockBuilder('MongoDB')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $collection = $this->getMockBuilder('MongoCollection')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->mongo->expects($this->once())
+            ->method('selectDB')
+            ->with($this->options['database'])
+            ->will($this->returnValue($database));
+
+        $database->expects($this->once())
+            ->method('selectCollection')
+            ->with($this->options['collection'])
+            ->will($this->returnValue($collection));
+
+        $that = $this;
+        $data = array();
+
+        $collection->expects($this->once())
+            ->method('update')
+            ->will($this->returnCallback(function($criteria, $updateData, $options) use ($that, &$data) {
+                $that->assertEquals(array($that->options['id_field'] => 'foo'), $criteria);
+                $that->assertEquals(array('upsert' => true, 'multiple' => false), $options);
+
+                $data = $updateData['$set'];
+            }));
+
         $this->assertTrue($this->storage->write('foo', 'bar'));
-        $this->assertEquals('bar', $this->storage->read('foo'));
+
+        $this->assertEquals('bar', $data[$this->options['data_field']]->bin);
+        $that->assertInstanceOf('MongoDate', $data[$this->options['time_field']]);
     }

     public function testReplaceSessionData()
     {
+        $database = $this->getMockBuilder('MongoDB')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $collection = $this->getMockBuilder('MongoCollection')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->mongo->expects($this->once())
+            ->method('selectDB')
+            ->with($this->options['database'])
+            ->will($this->returnValue($database));
+
+        $database->expects($this->once())
+            ->method('selectCollection')
+            ->with($this->options['collection'])
+            ->will($this->returnValue($collection));
+
+        $data = array();
+
+        $collection->expects($this->exactly(2))
+            ->method('update')
+            ->will($this->returnCallback(function($criteria, $updateData, $options) use (&$data) {
+                $data = $updateData;
+            }));
+
         $this->storage->write('foo', 'bar');
         $this->storage->write('foo', 'foobar');

-        $coll = self::$mongo->selectDB($this->options['database'])->selectCollection($this->options['collection']);
-
-        $this->assertEquals('foobar', $this->storage->read('foo'));
-        $this->assertEquals(1, $coll->find(array('sess_id' => 'foo'))->count());
+        $this->assertEquals('foobar', $data['$set'][$this->options['data_field']]->bin);
     }

     public function testDestroy()
     {
-        $this->storage->write('foo', 'bar');
-        $this->storage->destroy('foo');
+        $database = $this->getMockBuilder('MongoDB')
+            ->disableOriginalConstructor()
+            ->getMock();

-        $this->assertEquals('', $this->storage->read('foo'));
-    }
+        $collection = $this->getMockBuilder('MongoCollection')
+            ->disableOriginalConstructor()
+            ->getMock();

-    public function testGc()
-    {
-        $this->storage->write('foo', 'bar');
-        $this->storage->write('bar', 'foo');
+        $this->mongo->expects($this->once())
+            ->method('selectDB')
+            ->with($this->options['database'])
+            ->will($this->returnValue($database));

-        $coll = self::$mongo->selectDB($this->options['database'])->selectCollection($this->options['collection']);
+        $database->expects($this->once())
+            ->method('selectCollection')
+            ->with($this->options['collection'])
+            ->will($this->returnValue($collection));

-        $this->assertEquals(2, $coll->count());
-        $this->storage->gc(-1);
-        $this->assertEquals(0, $coll->count());
+        $collection->expects($this->once())
+            ->method('remove')
+            ->with(array($this->options['id_field'] => 'foo'));

+        $this->assertTrue($this->storage->destroy('foo'));
+    }
+
+    public function testGc()
+    {
+        $database = $this->getMockBuilder('MongoDB')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $collection = $this->getMockBuilder('MongoCollection')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->mongo->expects($this->once())
+            ->method('selectDB')
+            ->with($this->options['database'])
+            ->will($this->returnValue($database));
+
+        $database->expects($this->once())
+            ->method('selectCollection')
+            ->with($this->options['collection'])
+            ->will($this->returnValue($collection));
+
+        $that = $this;
+
+        $collection->expects($this->once())
+            ->method('remove')
+            ->will($this->returnCallback(function($criteria) use($that) {
+                $that->assertInstanceOf('MongoDate', $criteria[$that->options['time_field']]['$lt']);
+                $that->assertGreaterThanOrEqual(time() - -1, $criteria[$that->options['time_field']]['$lt']->sec);
+            }));
+
+        $this->assertTrue($this->storage->gc(-1));
     }
 }
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php
index 39f268b..ef70281 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php
@@ -82,6 +82,14 @@ public function testGetStorageKey()
         $this->assertEquals('_sf2_meta', $this->bag->getStorageKey());
     }

+    public function testGetLifetime()
+    {
+        $bag = new MetadataBag();
+        $array = array(MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 1000);
+        $bag->initialize($array);
+        $this->assertEquals(1000, $bag->getLifetime());
+    }
+
     public function testGetCreated()
     {
         $this->assertEquals(1234567, $this->bag->getCreated());
diff --git 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
index 4b88a23..b99941a 100644
--- 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
@@ -29,6 +29,8 @@
 class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase
 {
     /**
+     * @param array $options
+     *
      * @return NativeSessionStorage
      */
     protected function getStorage(array $options = array())
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php
index f52badf..0dfe651 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php
@@ -76,13 +76,22 @@ public function testSendContent()
      */
     public function testSendContentWithNonCallable()
     {
-        $response = new StreamedResponse('foobar');
+        $response = new StreamedResponse(null);
         $response->sendContent();
     }

     /**
      * @expectedException \LogicException
      */
+    public function testSetCallbackNonCallable()
+    {
+        $response = new StreamedResponse(null);
+        $response->setCallback(null);
+    }
+
+    /**
+     * @expectedException \LogicException
+     */
     public function testSetContent()
     {
         $response = new StreamedResponse(function () { echo 'foo'; });
diff --git a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json
index 91c23c2..09b8725 100644
--- a/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json
+++ b/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json
@@ -19,16 +19,14 @@
         "php": ">=5.3.3"
     },
     "autoload": {
-        "psr-0": {
-            "Symfony\\Component\\HttpFoundation": "",
-            "SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs"
-        }
+        "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" },
+        "classmap": [ "Symfony/Component/HttpFoundation/Resources/stubs" ]
     },
     "target-dir": "Symfony/Component/HttpFoundation",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/.gitattributes b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md
index c27de87..19859f5 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md
@@ -1,6 +1,13 @@
 CHANGELOG
 =========

+2.2.0
+-----
+
+ * added TraceableControllerResolver
+ * added TraceableEventDispatcher (removed ContainerAwareTraceableEventDispatcher)
+ * added support for WinCache opcode cache in ConfigDataCollector
+
 2.1.0
 -----

diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php
new file mode 100644
index 0000000..e3f29ae
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php
@@ -0,0 +1,66 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Controller;
+
+use Symfony\Component\HttpKernel\Debug\Stopwatch;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * TraceableControllerResolver.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class TraceableControllerResolver implements ControllerResolverInterface
+{
+    private $resolver;
+    private $stopwatch;
+
+    /**
+     * Constructor.
+     *
+     * @param ControllerResolverInterface $resolver  A ControllerResolverInterface instance
+     * @param Stopwatch                   $stopwatch A Stopwatch instance
+     */
+    public function __construct(ControllerResolverInterface $resolver, Stopwatch $stopwatch)
+    {
+        $this->resolver = $resolver;
+        $this->stopwatch = $stopwatch;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getController(Request $request)
+    {
+        $e = $this->stopwatch->start('controller.get_callable');
+
+        $ret = $this->resolver->getController($request);
+
+        $e->stop();
+
+        return $ret;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getArguments(Request $request, $controller)
+    {
+        $e = $this->stopwatch->start('controller.get_arguments');
+
+        $ret = $this->resolver->getArguments($request, $controller);
+
+        $e->stop();
+
+        return $ret;
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php
index 81ede39..97797a4 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php
@@ -42,17 +42,18 @@ public function setKernel(KernelInterface $kernel)
     public function collect(Request $request, Response $response, \Exception $exception = null)
     {
         $this->data = array(
-            'token'           => $response->headers->get('X-Debug-Token'),
-            'symfony_version' => Kernel::VERSION,
-            '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'),
-            'apc_enabled'     => extension_loaded('apc') && ini_get('apc.enabled'),
-            'xcache_enabled'  => extension_loaded('xcache') && ini_get('xcache.cacher'),
-            'bundles'         => array(),
+            'token'            => $response->headers->get('X-Debug-Token'),
+            'symfony_version'  => Kernel::VERSION,
+            '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'),
+            'apc_enabled'      => extension_loaded('apc') && ini_get('apc.enabled'),
+            'xcache_enabled'   => extension_loaded('xcache') && ini_get('xcache.cacher'),
+            'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'),
+            'bundles'          => array(),
         );

         if (isset($this->kernel)) {
@@ -163,13 +164,23 @@ public function hasXCache()
     }

     /**
+     * Returns true if WinCache is enabled.
+     *
+     * @return Boolean true if WinCache is enabled, false otherwise
+     */
+    public function hasWinCache()
+    {
+        return $this->data['wincache_enabled'];
+    }
+
+    /**
      * Returns true if any accelerator is enabled.
      *
      * @return Boolean true if any accelerator is enabled, false otherwise
      */
     public function hasAccelerator()
     {
-        return $this->hasApc() || $this->hasEAccelerator() || $this->hasXCache();
+        return $this->hasApc() || $this->hasEAccelerator() || $this->hasXCache() || $this->hasWinCache();
     }

     public function getBundles()
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
index 98eabdb..7d9c289 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php
@@ -31,4 +31,45 @@ public function unserialize($data)
     {
         $this->data = unserialize($data);
     }
+
+    /**
+     * Converts a PHP variable to a string.
+     *
+     * @param mixed $var A PHP variable
+     *
+     * @return string The string representation of the variable
+     */
+    protected function varToString($var)
+    {
+        if (is_object($var)) {
+            return sprintf('Object(%s)', get_class($var));
+        }
+
+        if (is_array($var)) {
+            $a = array();
+            foreach ($var as $k => $v) {
+                $a[] = sprintf('%s => %s', $k, $this->varToString($v));
+            }
+
+            return sprintf("Array(%s)", implode(', ', $a));
+        }
+
+        if (is_resource($var)) {
+            return sprintf('Resource(%s)', get_resource_type($var));
+        }
+
+        if (null === $var) {
+            return 'null';
+        }
+
+        if (false === $var) {
+            return 'false';
+        }
+
+        if (true === $var) {
+            return 'true';
+        }
+
+        return (string) $var;
+    }
 }
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php
index 406f1df..cd7f787 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php
@@ -14,7 +14,6 @@
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;

 /**
  * EventDataCollector.
@@ -23,27 +22,30 @@
  */
 class EventDataCollector extends DataCollector
 {
-    private $dispatcher;
-
-    public function setEventDispatcher(EventDispatcherInterface $dispatcher)
-    {
-        if ($dispatcher instanceof TraceableEventDispatcherInterface) {
-            $this->dispatcher = $dispatcher;
-        }
-    }
-
     /**
      * {@inheritdoc}
      */
     public function collect(Request $request, Response $response, \Exception $exception = null)
     {
         $this->data = array(
-            'called_listeners'     => null !== $this->dispatcher ? $this->dispatcher->getCalledListeners() : array(),
-            'not_called_listeners' => null !== $this->dispatcher ? $this->dispatcher->getNotCalledListeners() : array(),
+            'called_listeners'     => array(),
+            'not_called_listeners' => array(),
         );
     }

     /**
+     * Sets the called listeners.
+     *
+     * @param array $listeners An array of called listeners
+     *
+     * @see TraceableEventDispatcherInterface
+     */
+    public function setCalledListeners(array $listeners)
+    {
+        $this->data['called_listeners'] = $listeners;
+    }
+
+    /**
      * Gets the called listeners.
      *
      * @return array An array of called listeners
@@ -56,6 +58,18 @@ public function getCalledListeners()
     }

     /**
+     * Sets the not called listeners.
+     *
+     * @param array $listeners An array of not called listeners
+     *
+     * @see TraceableEventDispatcherInterface
+     */
+    public function setNotCalledListeners(array $listeners)
+    {
+        $this->data['not_called_listeners'] = $listeners;
+    }
+
+    /**
      * Gets the not called listeners.
      *
      * @return array An array of not called listeners
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php
index 20ff597..10a010b 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php
@@ -14,7 +14,6 @@
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpKernel\Exception\FlattenException;
-use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

 /**
  * ExceptionDataCollector.
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php
index b410c23..1b6540a 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php
@@ -11,7 +11,6 @@

 namespace Symfony\Component\HttpKernel\DataCollector;

-use Symfony\Component\HttpFoundation\Cookie;
 use Symfony\Component\HttpFoundation\ParameterBag;
 use Symfony\Component\HttpFoundation\HeaderBag;
 use Symfony\Component\HttpFoundation\Request;
@@ -51,14 +50,7 @@ public function collect(Request $request, Response $response, \Exception $except

         $attributes = array();
         foreach ($request->attributes->all() as $key => $value) {
-            if (is_object($value)) {
-                $attributes[$key] = sprintf('Object(%s)', get_class($value));
-                if (is_callable(array($value, '__toString'))) {
-                    $attributes[$key] .= sprintf(' = %s', (string) $value);
-                }
-            } else {
-                $attributes[$key] = $value;
-            }
+            $attributes[$key] = $this->varToString($value);
         }

         $content = null;
@@ -100,6 +92,7 @@ public function collect(Request $request, Response $response, \Exception $except
             'flashes'            => $flashes,
             'path_info'          => $request->getPathInfo(),
             'controller'         => 'n/a',
+            'locale'             => $request->getLocale(),
         );

         if (isset($this->controllers[$request])) {
@@ -196,6 +189,11 @@ public function getFormat()
         return $this->data['format'];
     }

+    public function getLocale()
+    {
+        return $this->data['locale'];
+    }
+
     /**
      * Gets the route name.
      *
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ContainerAwareTraceableEventDispatcher.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ContainerAwareTraceableEventDispatcher.php
deleted file mode 100644
index bba6ea7..0000000
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ContainerAwareTraceableEventDispatcher.php
+++ /dev/null
@@ -1,318 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\HttpKernel\Debug;
-
-use Symfony\Component\HttpKernel\Debug\Stopwatch;
-use Symfony\Component\HttpKernel\Log\LoggerInterface;
-use Symfony\Component\HttpKernel\Profiler\Profile;
-use Symfony\Component\HttpKernel\Profiler\Profiler;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\EventDispatcher\Event;
-use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
-use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
-
-/**
- * Extends the ContainerAwareEventDispatcher to add some debugging tools.
- *
- * @author Fabien Potencier <fabien@symfony.com>
- */
-class ContainerAwareTraceableEventDispatcher extends ContainerAwareEventDispatcher implements TraceableEventDispatcherInterface
-{
-    private $logger;
-    private $called;
-    private $stopwatch;
-    private $priorities;
-    private $profiler;
-
-    /**
-     * Constructor.
-     *
-     * @param ContainerInterface $container A ContainerInterface instance
-     * @param Stopwatch          $stopwatch A Stopwatch instance
-     * @param LoggerInterface    $logger    A LoggerInterface instance
-     */
-    public function __construct(ContainerInterface $container, Stopwatch $stopwatch, LoggerInterface $logger = null)
-    {
-        parent::__construct($container);
-
-        $this->stopwatch = $stopwatch;
-        $this->logger = $logger;
-        $this->called = array();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function dispatch($eventName, Event $event = null)
-    {
-        switch ($eventName) {
-            case 'kernel.request':
-                $this->stopwatch->openSection();
-                break;
-            case 'kernel.view':
-            case 'kernel.response':
-                // stop only if a controller has been executed
-                try {
-                    $this->stopwatch->stop('controller');
-                } catch (\LogicException $e) {
-                }
-                break;
-            case 'kernel.terminate':
-                $token = $event->getResponse()->headers->get('X-Debug-Token');
-                $this->stopwatch->openSection($token);
-                break;
-        }
-
-        $e1 = $this->stopwatch->start($eventName, 'section');
-
-        parent::dispatch($eventName, $event);
-
-        $e1->stop();
-
-        switch ($eventName) {
-            case 'kernel.controller':
-                $this->stopwatch->start('controller', 'section');
-                break;
-            case 'kernel.response':
-                $token = $event->getResponse()->headers->get('X-Debug-Token');
-                $this->stopwatch->stopSection($token);
-                if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
-                    // The profiles can only be updated once they have been created
-                    // that is after the 'kernel.response' event of the main request
-                    $this->updateProfiles($token, true);
-                }
-                break;
-            case 'kernel.terminate':
-                $this->stopwatch->stopSection($token);
-                // The children profiles have been updated by the previous 'kernel.response'
-                // event. Only the root profile need to be updated with the 'kernel.terminate'
-                // timing informations.
-                $this->updateProfiles($token, false);
-                break;
-        }
-
-        return $event;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws \RuntimeException if the listener method is not callable
-     */
-    public function addListener($eventName, $listener, $priority = 0)
-    {
-        if (!is_callable($listener)) {
-            throw new \RuntimeException(sprintf('The given callback (%s) for event "%s" is not callable.', $this->getListenerAsString($listener), $eventName));
-        }
-
-        $this->priorities[$eventName.'_'.$this->getListenerAsString($listener)] = $priority;
-
-        parent::addListener($eventName, $listener, $priority);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected function doDispatch($listeners, $eventName, Event $event)
-    {
-        foreach ($listeners as $listener) {
-            $info = $this->getListenerInfo($listener, $eventName);
-
-            if (null !== $this->logger) {
-                $this->logger->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, $info['pretty']));
-            }
-
-            $this->called[$eventName.'.'.$info['pretty']] = $info;
-
-            $e2 = $this->stopwatch->start(isset($info['class']) ? substr($info['class'], strrpos($info['class'], '\\') + 1) : $info['type'], 'event_listener');
-
-            call_user_func($listener, $event);
-
-            $e2->stop();
-
-            if ($event->isPropagationStopped()) {
-                if (null !== $this->logger) {
-                    $this->logger->debug(sprintf('Listener "%s" stopped propagation of the event "%s".', $info['pretty'], $eventName));
-
-                    $skippedListeners = $this->getListeners($eventName);
-                    $skipped = false;
-
-                    foreach ($skippedListeners as $skippedListener) {
-                        if ($skipped) {
-                            $info = $this->getListenerInfo($skippedListener, $eventName);
-                            $this->logger->debug(sprintf('Listener "%s" was not called for event "%s".', $info['pretty'], $eventName));
-                        }
-
-                        if ($skippedListener === $listener) {
-                            $skipped = true;
-                        }
-                    }
-                }
-
-                break;
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected function lazyLoad($eventName)
-    {
-        $e = $this->stopwatch->start($eventName.'.loading', 'event_listener_loading');
-
-        parent::lazyLoad($eventName);
-
-        $e->stop();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public function getCalledListeners()
-    {
-        return $this->called;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public function getNotCalledListeners()
-    {
-        $notCalled = array();
-
-        foreach ($this->getListeners() as $name => $listeners) {
-            foreach ($listeners as $listener) {
-                $info = $this->getListenerInfo($listener, $name);
-                if (!isset($this->called[$name.'.'.$info['pretty']])) {
-                    $notCalled[$name.'.'.$info['pretty']] = $info;
-                }
-            }
-        }
-
-        return $notCalled;
-    }
-
-    /**
-     * Returns information about the listener
-     *
-     * @param object $listener  The listener
-     * @param string $eventName The event name
-     *
-     * @return array Informations about the listener
-     */
-    private function getListenerInfo($listener, $eventName)
-    {
-        $info = array(
-            'event'    => $eventName,
-            'priority' => $this->priorities[$eventName.'_'.$this->getListenerAsString($listener)],
-        );
-        if ($listener instanceof \Closure) {
-            $info += array(
-                'type' => 'Closure',
-                'pretty' => 'closure'
-            );
-        } elseif (is_string($listener)) {
-            try {
-                $r = new \ReflectionFunction($listener);
-                $file = $r->getFileName();
-                $line = $r->getStartLine();
-            } catch (\ReflectionException $e) {
-                $file = null;
-                $line = null;
-            }
-            $info += array(
-                'type'  => 'Function',
-                'function' => $listener,
-                'file'  => $file,
-                'line'  => $line,
-                'pretty' => $listener,
-            );
-        } elseif (is_array($listener) || (is_object($listener) && is_callable($listener))) {
-            if (!is_array($listener)) {
-                $listener = array($listener, '__invoke');
-            }
-            $class = is_object($listener[0]) ? get_class($listener[0]) : $listener[0];
-            try {
-                $r = new \ReflectionMethod($class, $listener[1]);
-                $file = $r->getFileName();
-                $line = $r->getStartLine();
-            } catch (\ReflectionException $e) {
-                $file = null;
-                $line = null;
-            }
-            $info += array(
-                'type'  => 'Method',
-                'class' => $class,
-                'method' => $listener[1],
-                'file'  => $file,
-                'line'  => $line,
-                'pretty' => $class.'::'.$listener[1],
-            );
-        }
-
-        return $info;
-    }
-
-    /**
-     * Updates the stopwatch data in the profile hierarchy.
-     *
-     * @param string  $token          Profile token
-     * @param Boolean $updateChildren Whether to update the children altogether
-     */
-    private function updateProfiles($token, $updateChildren)
-    {
-        if (!$this->getContainer()->has('profiler')) {
-            return;
-        }
-
-        $this->profiler = $this->getContainer()->get('profiler');
-
-        if (!$profile = $this->profiler->loadProfile($token)) {
-            return;
-        }
-
-        $this->saveStopwatchInfoInProfile($profile, $updateChildren);
-    }
-
-    /**
-     * Update the profiles with the timing info and saves them.
-     *
-     * @param Profile $profile        The root profile
-     * @param Boolean $updateChildren Whether to update the children altogether
-     */
-    private function saveStopwatchInfoInProfile(Profile $profile, $updateChildren)
-    {
-        $profile->getCollector('time')->setEvents($this->stopwatch->getSectionEvents($profile->getToken()));
-        $this->profiler->saveProfile($profile);
-
-        if ($updateChildren) {
-            foreach ($profile->getChildren() as $child) {
-                $this->saveStopwatchInfoInProfile($child, true);
-            }
-        }
-    }
-
-    private function getListenerAsString($listener)
-    {
-        if (is_string($listener)) {
-            return '[string] '.$listener;
-        } elseif (is_array($listener)) {
-            return '[array] '.(is_object($listener[0]) ? get_class($listener[0]) : $listener[0]).'::'.$listener[1];
-        } elseif (is_object($listener)) {
-            return '[object] '.get_class($listener);
-        }
-
-        return '[?] '.var_export($listener, true);
-    }
-}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php
index c0133d4..37f588e 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php
@@ -43,6 +43,8 @@ public function __construct($debug = true, $charset = 'UTF-8')
     /**
      * Register the exception handler.
      *
+     * @param Boolean $debug
+     *
      * @return ExceptionHandler The registered exception handler
      */
     public static function register($debug = true)
@@ -73,100 +75,104 @@ public function handle(\Exception $exception)
      */
     public function createResponse($exception)
     {
-        $content = '';
-        $title = '';
-        try {
-            if (!$exception instanceof FlattenException) {
-                $exception = FlattenException::create($exception);
-            }
-
-            switch ($exception->getStatusCode()) {
-                case 404:
-                    $title = 'Sorry, the page you are looking for could not be found.';
-                    break;
-                default:
-                    $title = 'Whoops, looks like something went wrong.';
-            }
-
-            if ($this->debug) {
-                $content = $this->getContent($exception);
-            }
-        } catch (\Exception $e) {
-            // something nasty happened and we cannot throw an exception here anymore
-            if ($this->debug) {
-                $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($exception), $exception->getMessage());
-            } else {
-                $title = 'Whoops, looks like something went wrong.';
-            }
+        if (!$exception instanceof FlattenException) {
+            $exception = FlattenException::create($exception);
         }

-        return new Response($this->decorate($content, $title), $exception->getStatusCode(), $exception->getHeaders());
+        return new Response($this->decorate($this->getContent($exception), $this->getStylesheet($exception)), $exception->getStatusCode(), $exception->getHeaders());
     }

-    private function getContent($exception)
+    /**
+     * Gets the HTML content associated with the given exception.
+     *
+     * @param FlattenException $exception A FlattenException instance
+     *
+     * @return string The content as a string
+     */
+    public function getContent(FlattenException $exception)
     {
-        $message = nl2br($exception->getMessage());
-        $class = $this->abbrClass($exception->getClass());
-        $count = count($exception->getAllPrevious());
+        $title = '';
+        switch ($exception->getStatusCode()) {
+            case 404:
+                $title = 'Sorry, the page you are looking for could not be found.';
+                break;
+            default:
+                $title = 'Whoops, looks like something went wrong.';
+        }
+
         $content = '';
-        foreach ($exception->toArray() as $position => $e) {
-            $ind = $count - $position + 1;
-            $total = $count + 1;
-            $class = $this->abbrClass($e['class']);
-            $message = nl2br($e['message']);
-            $content .= sprintf(<<<EOF
-<div class="block_exception clear_fix">
-    <h2><span>%d/%d</span> %s: %s</h2>
-</div>
-<div class="block">
-    <ol class="traces list_exception">
+        if ($this->debug) {
+            try {
+                $message = nl2br($exception->getMessage());
+                $class = $this->abbrClass($exception->getClass());
+                $count = count($exception->getAllPrevious());
+                $content = '';
+                foreach ($exception->toArray() as $position => $e) {
+                    $ind = $count - $position + 1;
+                    $total = $count + 1;
+                    $class = $this->abbrClass($e['class']);
+                    $message = nl2br($e['message']);
+                    $content .= sprintf(<<<EOF
+                        <div class="block_exception clear_fix">
+                            <h2><span>%d/%d</span> %s: %s</h2>
+                        </div>
+                        <div class="block">
+                            <ol class="traces list_exception">

 EOF
-                , $ind, $total, $class, $message);
-            foreach ($e['trace'] as $i => $trace) {
-                $content .= '       <li>';
-                if ($trace['function']) {
-                    $content .= sprintf('at %s%s%s(%s)', $this->abbrClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args']));
-                }
-                if (isset($trace['file']) && isset($trace['line'])) {
-                    if ($linkFormat = ini_get('xdebug.file_link_format')) {
-                        $link = str_replace(array('%f', '%l'), array($trace['file'], $trace['line']), $linkFormat);
-                        $content .= sprintf(' in <a href="%s" title="Go to source">%s line %s</a>', $link, $trace['file'], $trace['line']);
-                    } else {
-                        $content .= sprintf(' in %s line %s', $trace['file'], $trace['line']);
+                        , $ind, $total, $class, $message);
+                    foreach ($e['trace'] as $i => $trace) {
+                        $content .= '       <li>';
+                        if ($trace['function']) {
+                            $content .= sprintf('at %s%s%s(%s)', $this->abbrClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args']));
+                        }
+                        if (isset($trace['file']) && isset($trace['line'])) {
+                            if ($linkFormat = ini_get('xdebug.file_link_format')) {
+                                $link = str_replace(array('%f', '%l'), array($trace['file'], $trace['line']), $linkFormat);
+                                $content .= sprintf(' in <a href="%s" title="Go to source">%s line %s</a>', $link, $trace['file'], $trace['line']);
+                            } else {
+                                $content .= sprintf(' in %s line %s', $trace['file'], $trace['line']);
+                            }
+                        }
+                        $content .= "</li>\n";
                     }
+
+                    $content .= "    </ol>\n</div>\n";
+                }
+            } catch (\Exception $e) {
+                // something nasty happened and we cannot throw an exception anymore
+                if ($this->debug) {
+                    $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($exception), $exception->getMessage());
+                } else {
+                    $title = 'Whoops, looks like something went wrong.';
                 }
-                $content .= "</li>\n";
             }
-
-            $content .= "    </ol>\n</div>\n";
         }

-        return $content;
+        return <<<EOF
+            <div id="sf-exceptionresetcontent" class="sf-exceptionreset">
+                <h1>$title</h1>
+                $content
+            </div>
+EOF;
     }

-    private function decorate($content, $title)
+    /**
+     * Gets the stylesheet associated with the given exception.
+     *
+     * @param FlattenException $exception A FlattenException instance
+     *
+     * @return string The stylesheet as a string
+     */
+    public function getStylesheet(FlattenException $exception)
     {
         return <<<EOF
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-        <meta name="robots" content="noindex,nofollow" />
-        <title>{$title}</title>
-        <style>
-            /* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */
-            html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
-
-            html { background: #eee; padding: 10px }
-            body { font: 11px Verdana, Arial, sans-serif; color: #333 }
-            img { border: 0; }
-            .clear { clear:both; height:0; font-size:0; line-height:0; }
-            .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
-            .clear_fix { display:inline-block; }
-            * html .clear_fix { height:1%; }
-            .clear_fix { display:block; }
-            #content { width:970px; margin:0 auto; }
+            .sf-exceptionreset { font: 11px Verdana, Arial, sans-serif; color: #333 }
+            .sf-exceptionreset .clear { clear:both; height:0; font-size:0; line-height:0; }
+            .sf-exceptionreset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
+            .sf-exceptionreset .clear_fix { display:inline-block; }
+            .sf-exceptionreset * html .clear_fix { height:1%; }
+            .sf-exceptionreset .clear_fix { display:block; }
             .sf-exceptionreset, .sf-exceptionreset .block { margin: auto }
             .sf-exceptionreset abbr { border-bottom: 1px dotted #000; cursor: help; }
             .sf-exceptionreset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }
@@ -209,13 +215,29 @@ private function decorate($content, $title)
                 border-radius: 10px;
                 border: 1px solid #ccc;
             }
+EOF;
+    }
+
+    private function decorate($content, $css)
+    {
+        return <<<EOF
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+        <meta name="robots" content="noindex,nofollow" />
+        <style>
+            /* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */
+            html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
+
+            html { background: #eee; padding: 10px }
+            img { border: 0; }
+            #sf-exceptionresetcontent { width:970px; margin:0 auto; }
+            $css
         </style>
     </head>
     <body>
-        <div id="content" class="sf-exceptionreset">
-            <h1>$title</h1>
-$content
-        </div>
+        $content
     </body>
 </html>
 EOF;
@@ -235,7 +257,7 @@ private function abbrClass($class)
      *
      * @return string
      */
-    public function formatArgs(array $args)
+    private function formatArgs(array $args)
     {
         $result = array();
         foreach ($args as $key => $item) {
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
new file mode 100644
index 0000000..aa878bc
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
@@ -0,0 +1,449 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Debug;
+
+use Symfony\Component\HttpKernel\Debug\Stopwatch;
+use Symfony\Component\HttpKernel\Log\LoggerInterface;
+use Symfony\Component\HttpKernel\Profiler\Profile;
+use Symfony\Component\HttpKernel\Profiler\Profiler;
+use Symfony\Component\HttpKernel\HttpKernelInterface;
+use Symfony\Component\EventDispatcher\Event;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
+
+/**
+ * Collects some data about event listeners.
+ *
+ * This event dispatcher delegates the dispatching to another one.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEventDispatcherInterface
+{
+    private $logger;
+    private $called;
+    private $stopwatch;
+    private $profiler;
+    private $dispatcher;
+    private $wrappedListeners;
+    private $firstCalledEvent;
+    private $id;
+
+    /**
+     * Constructor.
+     *
+     * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance
+     * @param Stopwatch                $stopwatch  A Stopwatch instance
+     * @param LoggerInterface          $logger     A LoggerInterface instance
+     */
+    public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null)
+    {
+        $this->dispatcher = $dispatcher;
+        $this->stopwatch = $stopwatch;
+        $this->logger = $logger;
+        $this->called = array();
+        $this->wrappedListeners = array();
+        $this->firstCalledEvent = array();
+    }
+
+    /**
+     * Sets the profiler.
+     *
+     * @param Profiler|null $profiler A Profiler instance
+     */
+    public function setProfiler(Profiler $profiler = null)
+    {
+        $this->profiler = $profiler;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function addListener($eventName, $listener, $priority = 0)
+    {
+        $this->dispatcher->addListener($eventName, $listener, $priority);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function addSubscriber(EventSubscriberInterface $subscriber)
+    {
+        $this->dispatcher->addSubscriber($subscriber);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function removeListener($eventName, $listener)
+    {
+        return $this->dispatcher->removeListener($eventName, $listener);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function removeSubscriber(EventSubscriberInterface $subscriber)
+    {
+        return $this->dispatcher->removeSubscriber($subscriber);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getListeners($eventName = null)
+    {
+        return $this->dispatcher->getListeners($eventName);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function hasListeners($eventName = null)
+    {
+        return $this->dispatcher->hasListeners($eventName);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function dispatch($eventName, Event $event = null)
+    {
+        if (null === $event) {
+            $event = new Event();
+        }
+
+        $this->id = spl_object_hash($event);
+
+        $this->preDispatch($eventName, $event);
+
+        $e = $this->stopwatch->start($eventName, 'section');
+
+        $this->firstCalledEvent[$eventName] = $this->stopwatch->start($eventName.'.loading', 'event_listener_loading');
+
+        $this->dispatcher->dispatch($eventName, $event);
+
+        // reset the id as another event might have been dispatched during the dispatching of this event
+        $this->id = spl_object_hash($event);
+
+        unset($this->firstCalledEvent[$eventName]);
+
+        $e->stop();
+
+        $this->postDispatch($eventName, $event);
+
+        return $event;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getCalledListeners()
+    {
+        return $this->called;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getNotCalledListeners()
+    {
+        $notCalled = array();
+
+        foreach ($this->getListeners() as $name => $listeners) {
+            foreach ($listeners as $listener) {
+                $info = $this->getListenerInfo($listener, $name);
+                if (!isset($this->called[$name.'.'.$info['pretty']])) {
+                    $notCalled[$name.'.'.$info['pretty']] = $info;
+                }
+            }
+        }
+
+        return $notCalled;
+    }
+
+    /**
+     * Proxies all method calls to the original event dispatcher.
+     *
+     * @param string $method    The method name
+     * @param array  $arguments The method arguments
+     */
+    public function __call($method, $arguments)
+    {
+        return call_user_func_array(array($this->dispatcher, $method), $arguments);
+    }
+
+    /**
+     * This is a private method and must not be used.
+     *
+     * This method is public because it is used in a closure.
+     * Whenever Symfony will require PHP 5.4, this could be changed
+     * to a proper private method.
+     */
+    public function logSkippedListeners($eventName, Event $event, $listener)
+    {
+        if (null === $this->logger) {
+            return;
+        }
+
+        $info = $this->getListenerInfo($listener, $eventName);
+
+        $this->logger->debug(sprintf('Listener "%s" stopped propagation of the event "%s".', $info['pretty'], $eventName));
+
+        $skippedListeners = $this->getListeners($eventName);
+        $skipped = false;
+
+        foreach ($skippedListeners as $skippedListener) {
+            $skippedListener = $this->unwrapListener($skippedListener, $eventName);
+
+            if ($skipped) {
+                $info = $this->getListenerInfo($skippedListener, $eventName);
+                $this->logger->debug(sprintf('Listener "%s" was not called for event "%s".', $info['pretty'], $eventName));
+            }
+
+            if ($skippedListener === $listener) {
+                $skipped = true;
+            }
+        }
+    }
+
+    /**
+     * This is a private method.
+     *
+     * This method is public because it is used in a closure.
+     * Whenever Symfony will require PHP 5.4, this could be changed
+     * to a proper private method.
+     */
+    public function preListenerCall($eventName, $listener)
+    {
+        // is it the first called listener?
+        if (isset($this->firstCalledEvent[$eventName])) {
+            $this->firstCalledEvent[$eventName]->stop();
+
+            unset($this->firstCalledEvent[$eventName]);
+        }
+
+        $info = $this->getListenerInfo($listener, $eventName);
+
+        if (null !== $this->logger) {
+            $this->logger->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, $info['pretty']));
+        }
+
+        $this->called[$eventName.'.'.$info['pretty']] = $info;
+
+        return $this->stopwatch->start(isset($info['class']) ? substr($info['class'], strrpos($info['class'], '\\') + 1) : $info['type'], 'event_listener');
+    }
+
+    /**
+     * Returns information about the listener
+     *
+     * @param object $listener  The listener
+     * @param string $eventName The event name
+     *
+     * @return array Informations about the listener
+     */
+    private function getListenerInfo($listener, $eventName)
+    {
+        $listener = $this->unwrapListener($listener, $eventName);
+
+        $info = array(
+            'event' => $eventName,
+        );
+        if ($listener instanceof \Closure) {
+            $info += array(
+                'type' => 'Closure',
+                'pretty' => 'closure'
+            );
+        } elseif (is_string($listener)) {
+            try {
+                $r = new \ReflectionFunction($listener);
+                $file = $r->getFileName();
+                $line = $r->getStartLine();
+            } catch (\ReflectionException $e) {
+                $file = null;
+                $line = null;
+            }
+            $info += array(
+                'type'  => 'Function',
+                'function' => $listener,
+                'file'  => $file,
+                'line'  => $line,
+                'pretty' => $listener,
+            );
+        } elseif (is_array($listener) || (is_object($listener) && is_callable($listener))) {
+            if (!is_array($listener)) {
+                $listener = array($listener, '__invoke');
+            }
+            $class = is_object($listener[0]) ? get_class($listener[0]) : $listener[0];
+            try {
+                $r = new \ReflectionMethod($class, $listener[1]);
+                $file = $r->getFileName();
+                $line = $r->getStartLine();
+            } catch (\ReflectionException $e) {
+                $file = null;
+                $line = null;
+            }
+            $info += array(
+                'type'  => 'Method',
+                'class' => $class,
+                'method' => $listener[1],
+                'file'  => $file,
+                'line'  => $line,
+                'pretty' => $class.'::'.$listener[1],
+            );
+        }
+
+        return $info;
+    }
+
+    /**
+     * Updates the stopwatch data in the profile hierarchy.
+     *
+     * @param string  $token          Profile token
+     * @param Boolean $updateChildren Whether to update the children altogether
+     */
+    private function updateProfiles($token, $updateChildren)
+    {
+        if (!$this->profiler || !$profile = $this->profiler->loadProfile($token)) {
+            return;
+        }
+
+        $this->saveInfoInProfile($profile, $updateChildren);
+    }
+
+    /**
+     * Update the profiles with the timing and events information and saves them.
+     *
+     * @param Profile $profile        The root profile
+     * @param Boolean $updateChildren Whether to update the children altogether
+     */
+    private function saveInfoInProfile(Profile $profile, $updateChildren)
+    {
+        $profile->getCollector('time')->setEvents($this->stopwatch->getSectionEvents($profile->getToken()));
+        $profile->getCollector('events')->setCalledListeners($this->getCalledListeners());
+        $profile->getCollector('events')->setNotCalledListeners($this->getNotCalledListeners());
+        $this->profiler->saveProfile($profile);
+
+        if ($updateChildren) {
+            foreach ($profile->getChildren() as $child) {
+                $this->saveInfoInProfile($child, true);
+            }
+        }
+    }
+
+    private function getListenerAsString($listener)
+    {
+        if (is_string($listener)) {
+            return '[string] '.$listener;
+        } elseif (is_array($listener)) {
+            return '[array] '.(is_object($listener[0]) ? get_class($listener[0]) : $listener[0]).'::'.$listener[1];
+        } elseif (is_object($listener)) {
+            return '[object] '.get_class($listener);
+        }
+
+        return '[?] '.var_export($listener, true);
+    }
+
+    private function preDispatch($eventName, Event $event)
+    {
+        // wrap all listeners before they are called
+        $this->wrappedListeners[$this->id] = new \SplObjectStorage();
+
+        $listeners = $this->dispatcher->getListeners($eventName);
+
+        foreach ($listeners as $listener) {
+            $this->dispatcher->removeListener($eventName, $listener);
+            $wrapped = $this->wrapListener($eventName, $listener);
+            $this->wrappedListeners[$this->id][$wrapped] = $listener;
+            $this->dispatcher->addListener($eventName, $wrapped);
+        }
+
+        switch ($eventName) {
+            case 'kernel.request':
+                $this->stopwatch->openSection();
+                break;
+            case 'kernel.view':
+            case 'kernel.response':
+                // stop only if a controller has been executed
+                try {
+                    $this->stopwatch->stop('controller');
+                } catch (\LogicException $e) {
+                }
+                break;
+            case 'kernel.terminate':
+                $token = $event->getResponse()->headers->get('X-Debug-Token');
+                $this->stopwatch->openSection($token);
+                break;
+        }
+    }
+
+    private function postDispatch($eventName, Event $event)
+    {
+        switch ($eventName) {
+            case 'kernel.controller':
+                $this->stopwatch->start('controller', 'section');
+                break;
+            case 'kernel.response':
+                $token = $event->getResponse()->headers->get('X-Debug-Token');
+                $this->stopwatch->stopSection($token);
+                if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
+                    // The profiles can only be updated once they have been created
+                    // that is after the 'kernel.response' event of the main request
+                    $this->updateProfiles($token, true);
+                }
+                break;
+            case 'kernel.terminate':
+                $token = $event->getResponse()->headers->get('X-Debug-Token');
+                $this->stopwatch->stopSection($token);
+                // The children profiles have been updated by the previous 'kernel.response'
+                // event. Only the root profile need to be updated with the 'kernel.terminate'
+                // timing informations.
+                $this->updateProfiles($token, false);
+                break;
+        }
+
+        foreach ($this->wrappedListeners[$this->id] as $wrapped) {
+            $this->dispatcher->removeListener($eventName, $wrapped);
+            $this->dispatcher->addListener($eventName, $this->wrappedListeners[$this->id][$wrapped]);
+        }
+
+        unset($this->wrappedListeners[$this->id]);
+    }
+
+    private function wrapListener($eventName, $listener)
+    {
+        $self = $this;
+
+        return function (Event $event) use ($self, $eventName, $listener) {
+            $e = $self->preListenerCall($eventName, $listener);
+
+            call_user_func($listener, $event);
+
+            $e->stop();
+
+            if ($event->isPropagationStopped()) {
+                $self->logSkippedListeners($eventName, $event, $listener);
+            }
+        };
+    }
+
+    private function unwrapListener($listener, $eventName)
+    {
+        // get the original listener
+        if (is_object($listener) && isset($this->wrappedListeners[$this->id][$listener])) {
+            return $this->wrappedListeners[$this->id][$listener];
+        }
+
+        return $listener;
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php
index 196bd67..8de76a5 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php
@@ -30,7 +30,7 @@ class FilterResponseEvent extends KernelEvent
 {
     /**
      * The current response object
-     * @var Symfony\Component\HttpFoundation\Response
+     * @var Response
      */
     private $response;

@@ -44,7 +44,7 @@ public function __construct(HttpKernelInterface $kernel, Request $request, $requ
     /**
      * Returns the current response object
      *
-     * @return Symfony\Component\HttpFoundation\Response
+     * @return Response
      *
      * @api
      */
@@ -56,7 +56,7 @@ public function getResponse()
     /**
      * Sets a new response object
      *
-     * @param Symfony\Component\HttpFoundation\Response $response
+     * @param Response $response
      *
      * @api
      */
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseEvent.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseEvent.php
index c8c2f00..f71ccae 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseEvent.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseEvent.php
@@ -28,14 +28,14 @@ class GetResponseEvent extends KernelEvent
 {
     /**
      * The response object
-     * @var Symfony\Component\HttpFoundation\Response
+     * @var Response
      */
     private $response;

     /**
      * Returns the response object
      *
-     * @return Symfony\Component\HttpFoundation\Response
+     * @return Response
      *
      * @api
      */
@@ -47,7 +47,7 @@ public function getResponse()
     /**
      * Sets a response and stops event propagation
      *
-     * @param Symfony\Component\HttpFoundation\Response $response
+     * @param Response $response
      *
      * @api
      */
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/KernelEvent.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/KernelEvent.php
index 2e1790a..e57eed4 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/KernelEvent.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/KernelEvent.php
@@ -26,13 +26,13 @@ class KernelEvent extends Event
 {
     /**
      * The kernel in which this event was thrown
-     * @var Symfony\Component\HttpKernel\HttpKernelInterface
+     * @var HttpKernelInterface
      */
     private $kernel;

     /**
      * The request the kernel is currently processing
-     * @var Symfony\Component\HttpFoundation\Request
+     * @var Request
      */
     private $request;

@@ -53,7 +53,7 @@ public function __construct(HttpKernelInterface $kernel, Request $request, $requ
     /**
      * Returns the kernel in which this event was thrown
      *
-     * @return Symfony\Component\HttpKernel\HttpKernelInterface
+     * @return HttpKernelInterface
      *
      * @api
      */
@@ -65,7 +65,7 @@ public function getKernel()
     /**
      * Returns the request the kernel is currently processing
      *
-     * @return Symfony\Component\HttpFoundation\Request
+     * @return Request
      *
      * @api
      */
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php
index 7778df8..714102b 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php
@@ -22,9 +22,9 @@ class AccessDeniedHttpException extends HttpException
     /**
      * Constructor.
      *
-     * @param string    $message  The internal exception message
-     * @param Exception $previous The previous exception
-     * @param integer   $code     The internal exception code
+     * @param string     $message  The internal exception message
+     * @param \Exception $previous The previous exception
+     * @param integer    $code     The internal exception code
      */
     public function __construct($message = null, \Exception $previous = null, $code = 0)
     {
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php
new file mode 100644
index 0000000..753839c
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * BadRequestHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class BadRequestHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(400, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php
new file mode 100644
index 0000000..95f1db0
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * ConflictHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class ConflictHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(409, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php
index b2ffb9f..eb5e571 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php
@@ -221,6 +221,9 @@ private function flattenArgs($args, $level = 0)
                 $result[$key] = array('boolean', $value);
             } elseif (is_resource($value)) {
                 $result[$key] = array('resource', get_resource_type($value));
+            } elseif ($value instanceof \__PHP_Incomplete_Class) {
+                // Special case of object, is_object will return false
+                $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value));
             } else {
                 $result[$key] = array('string', (string) $value);
             }
@@ -228,4 +231,11 @@ private function flattenArgs($args, $level = 0)

         return $result;
     }
+
+    private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value)
+    {
+        $array = new \ArrayObject($value);
+
+        return $array['__PHP_Incomplete_Class_Name'];
+    }
 }
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php
new file mode 100644
index 0000000..5099944
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * GoneHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class GoneHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(410, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php
new file mode 100644
index 0000000..ab54b9a
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * LengthRequiredHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class LengthRequiredHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(411, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php
index cdfcc8a..3a81586 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php
@@ -21,10 +21,10 @@ class MethodNotAllowedHttpException extends HttpException
     /**
      * Constructor.
      *
-     * @param array     $allow    An array of allowed methods
-     * @param string    $message  The internal exception message
-     * @param Exception $previous The previous exception
-     * @param integer   $code     The internal exception code
+     * @param array      $allow    An array of allowed methods
+     * @param string     $message  The internal exception message
+     * @param \Exception $previous The previous exception
+     * @param integer    $code     The internal exception code
      */
     public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0)
     {
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php
new file mode 100644
index 0000000..19fc443
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * NotAcceptableHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class NotAcceptableHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(406, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php
index c99502d..547976c 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php
@@ -21,9 +21,9 @@ class NotFoundHttpException extends HttpException
     /**
      * Constructor.
      *
-     * @param string    $message  The internal exception message
-     * @param Exception $previous The previous exception
-     * @param integer   $code     The internal exception code
+     * @param string     $message  The internal exception message
+     * @param \Exception $previous The previous exception
+     * @param integer    $code     The internal exception code
      */
     public function __construct($message = null, \Exception $previous = null, $code = 0)
     {
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php
new file mode 100644
index 0000000..02d992d
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * PreconditionFailedHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class PreconditionFailedHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(412, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php
new file mode 100644
index 0000000..e0ffe2d
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php
@@ -0,0 +1,33 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * PreconditionRequiredHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ * @see http://tools.ietf.org/html/rfc6585
+ */
+class PreconditionRequiredHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(428, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php
new file mode 100644
index 0000000..031b85d
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php
@@ -0,0 +1,38 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * ServiceUnavailableHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class ServiceUnavailableHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
+     * @param string     $message    The internal exception message
+     * @param Exception  $previous   The previous exception
+     * @param integer    $code       The internal exception code
+     */
+    public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0)
+    {
+        $headers = array();
+        if ($retryAfter) {
+            $headers = array('Retry-After' => $retryAfter);
+        }
+
+        parent::__construct(503, $message, $previous, $headers, $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php
new file mode 100644
index 0000000..7a7c10f
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * TooManyRequestsHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ * @see http://tools.ietf.org/html/rfc6585
+ */
+class TooManyRequestsHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
+     * @param string     $message    The internal exception message
+     * @param Exception  $previous   The previous exception
+     * @param integer    $code       The internal exception code
+     */
+    public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0)
+    {
+        $headers = array();
+        if ($retryAfter) {
+            $headers = array('Retry-After' => $retryAfter);
+        }
+
+        parent::__construct(429, $message, $previous, $headers, $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php
new file mode 100644
index 0000000..d3b86c6
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php
@@ -0,0 +1,35 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * UnauthorizedHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class UnauthorizedHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $challenge WWW-Authenticate challenge string
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0)
+    {
+        $headers = array('WWW-Authenticate' => $challenge);
+
+        parent::__construct(401, $message, $previous, $headers, $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php
new file mode 100644
index 0000000..d92c0f2
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Exception;
+
+/**
+ * UnsupportedMediaTypeHttpException.
+ *
+ * @author Ben Ramsey <ben@benramsey.com>
+ */
+class UnsupportedMediaTypeHttpException extends HttpException
+{
+    /**
+     * Constructor.
+     *
+     * @param string    $message   The internal exception message
+     * @param Exception $previous  The previous exception
+     * @param integer   $code      The internal exception code
+     */
+    public function __construct($message = null, \Exception $previous = null, $code = 0)
+    {
+        parent::__construct(415, $message, $previous, array(), $code);
+    }
+}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
index ec66dcd..649f4ff 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
@@ -515,7 +515,7 @@ protected function lock(Request $request, Response $entry)

             // wait for the lock to be released
             $wait = 0;
-            while (is_file($lock) && $wait < 5000000) {
+            while ($this->store->isLocked($request) && $wait < 5000000) {
                 usleep(50000);
                 $wait += 50000;
             }
@@ -580,7 +580,7 @@ protected function store(Request $request, Response $response)
      */
     private function restoreResponseBody(Request $request, Response $response)
     {
-        if ('HEAD' === $request->getMethod() || 304 === $response->getStatusCode()) {
+        if ($request->isMethod('HEAD') || 304 === $response->getStatusCode()) {
             $response->setContent(null);
             $response->headers->remove('X-Body-Eval');
             $response->headers->remove('X-Body-File');
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
index b60c647..6d45e5c 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php
@@ -71,15 +71,20 @@ public function cleanup()
      */
     public function lock(Request $request)
     {
-        if (false !== $lock = @fopen($path = $this->getPath($this->getCacheKey($request).'.lck'), 'x')) {
+        $path = $this->getPath($this->getCacheKey($request).'.lck');
+        if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true)) {
+            return false;
+        }
+
+        $lock = @fopen($path, 'x');
+        if (false !== $lock) {
             fclose($lock);

             $this->locks[] = $path;

             return true;
         }
-
-        return $path;
+        return !file_exists($path) ?: $path;
     }

     /**
@@ -92,6 +97,11 @@ public function unlock(Request $request)
         return @unlink($this->getPath($this->getCacheKey($request).'.lck'));
     }

+    public function isLocked(Request $request)
+    {
+        return is_file($this->getPath($this->getCacheKey($request).'.lck'));
+    }
+
     /**
      * Locates a cached Response for the Request provided.
      *
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php
index dd8c886..483b6d6 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php
@@ -70,6 +70,15 @@ public function lock(Request $request);
     public function unlock(Request $request);

     /**
+     * Returns whether or not a lock exists.
+     *
+     * @param Request $request A Request instance
+     *
+     * @return Boolean true if lock exists, false otherwise
+     */
+    public function isLocked(Request $request);
+
+    /**
      * Purges data for the given URL.
      *
      * @param string $url A URL
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
index d601e4b..cedd367 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
@@ -58,12 +58,12 @@
     protected $classes;
     protected $errorReportingLevel;

-    const VERSION         = '2.1.0-RC2';
+    const VERSION         = '2.2.0-DEV';
     const VERSION_ID      = '20100';
     const MAJOR_VERSION   = '2';
-    const MINOR_VERSION   = '1';
+    const MINOR_VERSION   = '2';
     const RELEASE_VERSION = '0';
-    const EXTRA_VERSION   = 'RC2';
+    const EXTRA_VERSION   = 'DEV';

     /**
      * Constructor.
@@ -250,7 +250,7 @@ public function isClassInActiveBundle($class)
     public function getBundle($name, $first = true)
     {
         if (!isset($this->bundleMap[$name])) {
-            throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your %s.php file?', $name, get_class($this)));
+            throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, get_class($this)));
         }

         if (true === $first) {
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
index 94052f8..4505ba2 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
@@ -34,7 +34,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
     public function __construct($dsn)
     {
         if (0 !== strpos($dsn, 'file:')) {
-            throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use FileStorage with an invalid dsn "%s". The expected format is "file:/path/to/the/storage/folder".', $this->dsn));
+            throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use FileStorage with an invalid dsn "%s". The expected format is "file:/path/to/the/storage/folder".', $dsn));
         }
         $this->folder = substr($dsn, 5);

diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php
index 0dcad22..59a9282 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php
@@ -95,7 +95,7 @@ public function write(Profile $profile)
         $record = array(
             '_id' => $profile->getToken(),
             'parent' => $profile->getParentToken(),
-            'data' => serialize($profile->getCollectors()),
+            'data' => base64_encode(serialize($profile->getCollectors())),
             'ip' => $profile->getIp(),
             'method' => $profile->getMethod(),
             'url' => $profile->getUrl(),
@@ -220,7 +220,7 @@ private function getProfile(array $data)
         $profile->setMethod($data['method']);
         $profile->setUrl($data['url']);
         $profile->setTime($data['time']);
-        $profile->setCollectors(unserialize($data['data']));
+        $profile->setCollectors(unserialize(base64_decode($data['data'])));

         return $profile;
     }
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php
index f2fc8a9..3e7cad6 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php
@@ -52,6 +52,14 @@ public function disable()
     }

     /**
+     * Enables the profiler.
+     */
+    public function enable()
+    {
+        $this->enabled = true;
+    }
+
+    /**
      * Loads the Profile for the given Response.
      *
      * @param Response $response A Response instance
@@ -168,7 +176,7 @@ public function collect(Request $request, Response $response, \Exception $except
         $profile = new Profile(uniqid());
         $profile->setTime(time());
         $profile->setUrl($request->getUri());
-        $profile->setIp($request->server->get('REMOTE_ADDR'));
+        $profile->setIp($request->getClientIp());
         $profile->setMethod($request->getMethod());

         $response->headers->set('X-Debug-Token', $profile->getToken());
diff --git 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
index f517c12..5a0166d 100644
--- 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
@@ -53,7 +53,9 @@ public function testCollect()
                 ||
                 (extension_loaded('apc') && ini_get('apc.enabled'))
                 ||
-                (extension_loaded('xcache') && ini_get('xcache.cacher')))) {
+                (extension_loaded('xcache') && ini_get('xcache.cacher'))
+                ||
+                (extension_loaded('wincache') && ini_get('wincache.ocenabled')))) {
             $this->assertTrue($c->hasAccelerator());
         } else {
             $this->assertFalse($c->hasAccelerator());
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/EventDataCollectorTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/EventDataCollectorTest.php
deleted file mode 100644
index 67702c7..0000000
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/EventDataCollectorTest.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\HttpKernel\Tests\DataCollector;
-
-use Symfony\Component\HttpKernel\DataCollector\EventDataCollector;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\EventDispatcher\EventDispatcher;
-use Symfony\Component\HttpKernel\Tests\Fixtures\TestEventDispatcher;
-
-class EventDataCollectorTest extends \PHPUnit_Framework_TestCase
-{
-    protected function setUp()
-    {
-        if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
-            $this->markTestSkipped('The "EventDispatcher" component is not available');
-        }
-
-        if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
-            $this->markTestSkipped('The "HttpFoundation" component is not available');
-        }
-    }
-
-    public function testCollect()
-    {
-        $c = new EventDataCollector();
-        $c->setEventDispatcher(new TestEventDispatcher());
-
-        $c->collect(new Request(), new Response());
-
-        $this->assertSame('events',$c->getName());
-        $this->assertSame(array('foo'),$c->getCalledListeners());
-        $this->assertSame(array('bar'),$c->getNotCalledListeners());
-    }
-
-}
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
index 538d077..d5075f2 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
@@ -43,6 +43,7 @@ public function testCollect(Request $request, Response $response)
         $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestQuery());
         $this->assertEquals('html',$c->getFormat());
         $this->assertEquals(array(),$c->getSessionAttributes());
+        $this->assertEquals('en',$c->getLocale());

         $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag',$c->getResponseHeaders());
         $this->assertEquals(200,$c->getStatusCode());
diff --git 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
deleted file mode 100644
index 40c54e5..0000000
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/ContainerAwareTraceableEventDispatcherTest.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\HttpKernel\Tests\Debug;
-
-use Symfony\Component\HttpKernel\Debug\ContainerAwareTraceableEventDispatcher;
-use Symfony\Component\HttpKernel\Debug\Stopwatch;
-
-class ContainerAwareTraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
-{
-    protected function setUp()
-    {
-        if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
-            $this->markTestSkipped('The "DependencyInjection" component is not available');
-        }
-
-        if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) {
-            $this->markTestSkipped('The "HttpKernel" component is not available');
-        }
-    }
-
-    /**
-     * @expectedException \RuntimeException
-     */
-    public function testThrowsAnExceptionWhenAListenerMethodIsNotCallable()
-    {
-        $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
-        $dispatcher = new ContainerAwareTraceableEventDispatcher($container, new Stopwatch());
-        $dispatcher->addListener('onFooEvent', new \stdClass());
-    }
-
-    public function testClosureDoesNotTriggerErrorNotice()
-    {
-        $container  = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
-        $dispatcher = new ContainerAwareTraceableEventDispatcher($container, new StopWatch());
-        $triggered  = false;
-
-        $dispatcher->addListener('onFooEvent', function() use (&$triggered) {
-            $triggered = true;
-        });
-
-        try {
-            $dispatcher->dispatch('onFooEvent');
-        } catch (\PHPUnit_Framework_Error_Notice $e) {
-            $this->fail($e->getMessage());
-        }
-
-        $this->assertTrue($triggered, 'Closure should have been executed upon dispatch');
-    }
-
-    public function testStaticCallable()
-    {
-        $container  = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
-        $dispatcher = new ContainerAwareTraceableEventDispatcher($container, new StopWatch());
-
-        $dispatcher->addListener('onFooEvent', array(__NAMESPACE__.'\StaticClassFixture', 'staticListener'));
-
-        $dispatcher->dispatch('onFooEvent');
-
-        $this->assertTrue(StaticClassFixture::$called);
-    }
-}
-
-class StaticClassFixture
-{
-    public static $called = false;
-
-    public static function staticListener($event)
-    {
-        self::$called = true;
-    }
-}
diff --git 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
index c13e559..4ccbe7d 100644
--- 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
@@ -45,11 +45,11 @@ public function testStatusCode()

         $response = $handler->createResponse(new \RuntimeException('Foo'));
         $this->assertEquals('500', $response->getStatusCode());
-        $this->assertContains('<title>Whoops, looks like something went wrong.</title>', $response->getContent());
+        $this->assertContains('Whoops, looks like something went wrong.', $response->getContent());

         $response = $handler->createResponse(new NotFoundHttpException('Foo'));
         $this->assertEquals('404', $response->getStatusCode());
-        $this->assertContains('<title>Sorry, the page you are looking for could not be found.</title>', $response->getContent());
+        $this->assertContains('Sorry, the page you are looking for could not be found.', $response->getContent());
     }

     public function testHeaders()
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
new file mode 100644
index 0000000..2177f2b
--- /dev/null
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
@@ -0,0 +1,201 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Tests\Debug;
+
+use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\EventDispatcher\Event;
+use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
+use Symfony\Component\HttpKernel\Debug\Stopwatch;
+use Symfony\Component\HttpKernel\HttpKernel;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
+
+class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
+{
+    protected function setUp()
+    {
+        if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
+            $this->markTestSkipped('The "EventDispatcher" component is not available');
+        }
+
+        if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
+            $this->markTestSkipped('The "HttpFoundation" component is not available');
+        }
+    }
+
+    public function testAddRemoveListener()
+    {
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
+
+        $tdispatcher->addListener('foo', $listener = function () { ; });
+        $listeners = $dispatcher->getListeners('foo');
+        $this->assertCount(1, $listeners);
+        $this->assertSame($listener, $listeners[0]);
+
+        $tdispatcher->removeListener('foo', $listener);
+        $this->assertCount(0, $dispatcher->getListeners('foo'));
+    }
+
+    public function testGetListeners()
+    {
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
+
+        $tdispatcher->addListener('foo', $listener = function () { ; });
+        $this->assertSame($dispatcher->getListeners('foo'), $tdispatcher->getListeners('foo'));
+    }
+
+    public function testHasListeners()
+    {
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
+
+        $this->assertFalse($dispatcher->hasListeners('foo'));
+        $this->assertFalse($tdispatcher->hasListeners('foo'));
+
+        $tdispatcher->addListener('foo', $listener = function () { ; });
+        $this->assertTrue($dispatcher->hasListeners('foo'));
+        $this->assertTrue($tdispatcher->hasListeners('foo'));
+    }
+
+    public function testAddRemoveSubscriber()
+    {
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
+
+        $subscriber = new EventSubscriber();
+
+        $tdispatcher->addSubscriber($subscriber);
+        $listeners = $dispatcher->getListeners('foo');
+        $this->assertCount(1, $listeners);
+        $this->assertSame(array($subscriber, 'call'), $listeners[0]);
+
+        $tdispatcher->removeSubscriber($subscriber);
+        $this->assertCount(0, $dispatcher->getListeners('foo'));
+    }
+
+    public function testGetCalledListeners()
+    {
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
+        $tdispatcher->addListener('foo', $listener = function () { ; });
+
+        $this->assertEquals(array(), $tdispatcher->getCalledListeners());
+        $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getNotCalledListeners());
+
+        $tdispatcher->dispatch('foo');
+
+        $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getCalledListeners());
+        $this->assertEquals(array(), $tdispatcher->getNotCalledListeners());
+    }
+
+    public function testLogger()
+    {
+        $logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
+
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger);
+        $tdispatcher->addListener('foo', $listener1 = function () { ; });
+        $tdispatcher->addListener('foo', $listener2 = function () { ; });
+
+        $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
+        $logger->expects($this->at(1))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
+
+        $tdispatcher->dispatch('foo');
+    }
+
+    public function testLoggerWithStoppedEvent()
+    {
+        $logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
+
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger);
+        $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); });
+        $tdispatcher->addListener('foo', $listener2 = function () { ; });
+
+        $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
+        $logger->expects($this->at(1))->method('debug')->with("Listener \"closure\" stopped propagation of the event \"foo\".");
+        $logger->expects($this->at(2))->method('debug')->with("Listener \"closure\" was not called for event \"foo\".");
+
+        $tdispatcher->dispatch('foo');
+    }
+
+    public function testDispatchCallListeners()
+    {
+        $called = array();
+
+        $dispatcher = new EventDispatcher();
+        $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
+        $tdispatcher->addListener('foo', $listener1 = function () use (&$called) { $called[] = 'foo1'; });
+        $tdispatcher->addListener('foo', $listener2 = function () use (&$called) { $called[] = 'foo2'; });
+
+        $tdispatcher->dispatch('foo');
+
+        $this->assertEquals(array('foo1', 'foo2'), $called);
+    }
+
+    public function testDispatchNested()
+    {
+        $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch());
+        $loop = 1;
+        $dispatcher->addListener('foo', $listener1 = function () use ($dispatcher, &$loop) {
+            ++$loop;
+            if (2 == $loop) {
+                $dispatcher->dispatch('foo');
+            }
+        });
+
+        $dispatcher->dispatch('foo');
+    }
+
+    public function testStopwatchSections()
+    {
+        $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch = new Stopwatch());
+        $kernel = $this->getHttpKernel($dispatcher, function () { return new Response(); });
+        $request = Request::create('/');
+        $response = $kernel->handle($request);
+        $kernel->terminate($request, $response);
+
+        $events = $stopwatch->getSectionEvents($response->headers->get('X-Debug-Token'));
+        $this->assertEquals(array(
+            '__section__',
+            'kernel.request',
+            'kernel.request.loading',
+            'kernel.controller',
+            'kernel.controller.loading',
+            'controller',
+            'kernel.response',
+            'kernel.response.loading',
+            'kernel.terminate',
+            'kernel.terminate.loading',
+        ), array_keys($events));
+    }
+
+    protected function getHttpKernel($dispatcher, $controller)
+    {
+        $resolver = $this->getMock('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface');
+        $resolver->expects($this->once())->method('getController')->will($this->returnValue($controller));
+        $resolver->expects($this->once())->method('getArguments')->will($this->returnValue(array()));
+
+        return new HttpKernel($dispatcher, $resolver);
+    }
+}
+
+class EventSubscriber implements EventSubscriberInterface
+{
+    static public function getSubscribedEvents()
+    {
+        return array('foo' => 'call');
+    }
+}
diff --git 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
index 65975aa..934b44b 100644
--- 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
@@ -14,6 +14,18 @@
 use Symfony\Component\HttpKernel\Exception\FlattenException;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
+use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
+use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
+use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
+use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
+use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
+use Symfony\Component\HttpKernel\Exception\GoneHttpException;
+use Symfony\Component\HttpKernel\Exception\LengthRequiredHttpException;
+use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException;
+use Symfony\Component\HttpKernel\Exception\PreconditionRequiredHttpException;
+use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
+use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;
+use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;

 class FlattenExceptionTest extends \PHPUnit_Framework_TestCase
 {
@@ -27,12 +39,66 @@ public function testStatusCode()

         $flattened = FlattenException::create(new NotFoundHttpException());
         $this->assertEquals('404', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new UnauthorizedHttpException('Basic realm="My Realm"'));
+        $this->assertEquals('401', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new BadRequestHttpException());
+        $this->assertEquals('400', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new NotAcceptableHttpException());
+        $this->assertEquals('406', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new ConflictHttpException());
+        $this->assertEquals('409', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST')));
+        $this->assertEquals('405', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new AccessDeniedHttpException());
+        $this->assertEquals('403', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new GoneHttpException());
+        $this->assertEquals('410', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new LengthRequiredHttpException());
+        $this->assertEquals('411', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new PreconditionFailedHttpException());
+        $this->assertEquals('412', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new PreconditionRequiredHttpException());
+        $this->assertEquals('428', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new ServiceUnavailableHttpException());
+        $this->assertEquals('503', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new TooManyRequestsHttpException());
+        $this->assertEquals('429', $flattened->getStatusCode());
+
+        $flattened = FlattenException::create(new UnsupportedMediaTypeHttpException());
+        $this->assertEquals('415', $flattened->getStatusCode());
     }

     public function testHeadersForHttpException()
     {
         $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST')));
         $this->assertEquals(array('Allow' => 'POST'), $flattened->getHeaders());
+
+        $flattened = FlattenException::create(new UnauthorizedHttpException('Basic realm="My Realm"'));
+        $this->assertEquals(array('WWW-Authenticate' => 'Basic realm="My Realm"'), $flattened->getHeaders());
+
+        $flattened = FlattenException::create(new ServiceUnavailableHttpException('Fri, 31 Dec 1999 23:59:59 GMT'));
+        $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders());
+
+        $flattened = FlattenException::create(new ServiceUnavailableHttpException(120));
+        $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders());
+
+        $flattened = FlattenException::create(new TooManyRequestsHttpException('Fri, 31 Dec 1999 23:59:59 GMT'));
+        $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders());
+
+        $flattened = FlattenException::create(new TooManyRequestsHttpException(120));
+        $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders());
     }

     /**
@@ -101,7 +167,7 @@ public function testToArray(\Exception $exception, $statusCode)
                     'args'        => array()
                 )),
             )
-        ),$flattened->toArray());
+        ), $flattened->toArray());
     }

     public function flattenDataProvider()
@@ -125,4 +191,45 @@ private function createException($foo)
     {
         return new \Exception();
     }
+
+    public function testSetTraceIncompleteClass()
+    {
+        $flattened = FlattenException::create(new \Exception('test', 123));
+        $flattened->setTrace(
+            array(
+                array(
+                    'file' => __FILE__,
+                    'line' => 123,
+                    'function' => 'test',
+                    'args' => array(
+                        unserialize('O:14:"BogusTestClass":0:{}')
+                    ),
+                ),
+            ),
+            'foo.php', 123
+        );
+
+        $this->assertEquals(array(
+            array(
+                'message'=> 'test',
+                'class'=>'Exception',
+                'trace'=>array(
+                    array(
+                        'namespace'   => '', 'short_class' => '', 'class' => '','type' => '','function' => '',
+                        'file'        => 'foo.php', 'line' => 123,
+                        'args'        => array(),
+                    ),
+                    array(
+                        'namespace'   => '', 'short_class' => '', 'class' => '','type' => '','function' => 'test',
+                        'file'        => __FILE__, 'line' => 123,
+                        'args'        => array(
+                            array(
+                                'incomplete-object', 'BogusTestClass'
+                            ),
+                        ),
+                    )
+                ),
+            )
+        ), $flattened->toArray());
+    }
 }
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php
index 747d350..46e5e6b 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php
@@ -194,6 +194,18 @@ public function testOverwritesNonVaryingResponseWithStore()
         $this->assertCount(2, $this->getStoreMetadata($key));
     }

+    public function testLocking()
+    {
+        $req = Request::create('/test', 'get', array(), array(), array(), array('HTTP_FOO' => 'Foo', 'HTTP_BAR' => 'Bar'));
+        $this->assertTrue($this->store->lock($req));
+
+        $path = $this->store->lock($req);
+        $this->assertTrue($this->store->isLocked($req));
+
+        $this->store->unlock($req);
+        $this->assertFalse($this->store->isLocked($req));
+    }
+
     protected function storeSimpleEntry($path = null, $headers = array())
     {
         if (null === $path) {
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php
index b79e097..4b8cf07 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php
@@ -29,7 +29,7 @@ public function __construct()
     }

     /**
-     * Add a memcached server to connection pool
+     * Add a server to connection pool
      *
      * @param string  $host
      * @param integer $port
diff --git 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
index bff52e7..b2d148d 100644
--- 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
@@ -13,6 +13,9 @@

 use Symfony\Component\HttpKernel\Profiler\MongoDbProfilerStorage;
 use Symfony\Component\HttpKernel\Profiler\Profile;
+use Symfony\Component\HttpKernel\DataCollector\DataCollector;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;

 class DummyMongoDbProfilerStorage extends MongoDbProfilerStorage
 {
@@ -22,6 +25,28 @@ public function getMongo()
     }
 }

+class MongoDbProfilerStorageTestDataCollector extends DataCollector
+{
+    public function setData($data)
+    {
+        $this->data = $data;
+    }
+
+    public function getData()
+    {
+        return $this->data;
+    }
+
+    public function collect(Request $request, Response $response, \Exception $exception = null)
+    {
+    }
+
+    public function getName()
+    {
+        return 'test_data_collector';
+    }
+}
+
 class MongoDbProfilerStorageTest extends AbstractProfilerStorageTest
 {
     protected static $storage;
@@ -62,6 +87,28 @@ public function testCleanup()
         self::$storage->purge();
     }

+    public function testUtf8()
+    {
+        $profile = new Profile('utf8_test_profile');
+
+        $data = 'HЁʃʃϿ, ϢorЃd!';
+        $nonUtf8Data = mb_convert_encoding($data, 'UCS-2');
+
+        $collector = new MongoDbProfilerStorageTestDataCollector();
+        $collector->setData($nonUtf8Data);
+
+        $profile->setCollectors(array($collector));
+
+        self::$storage->write($profile);
+
+        $readProfile = self::$storage->read('utf8_test_profile');
+        $collectors = $readProfile->getCollectors();
+
+        $this->assertCount(1, $collectors);
+        $this->assertArrayHasKey('test_data_collector', $collectors);
+        $this->assertEquals($nonUtf8Data, $collectors['test_data_collector']->getData(), 'Non-UTF8 data is properly encoded/decoded');
+    }
+
     /**
      * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface
      */
@@ -79,3 +126,4 @@ protected function setUp()
         }
     }
 }
+
diff --git a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json
index 12ea499..40f10b3 100644
--- a/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json
+++ b/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json
@@ -17,35 +17,35 @@
     ],
     "require": {
         "php": ">=5.3.3",
-        "symfony/event-dispatcher": "2.1.*",
-        "symfony/http-foundation": "2.1.*"
+        "symfony/event-dispatcher": "2.2.*",
+        "symfony/http-foundation": "2.2.*"
     },
     "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.*"
+        "symfony/browser-kit": "2.2.*",
+        "symfony/class-loader": "2.2.*",
+        "symfony/config": "2.2.*",
+        "symfony/console": "2.2.*",
+        "symfony/dependency-injection": "2.2.*",
+        "symfony/finder": "2.2.*",
+        "symfony/process": "2.2.*",
+        "symfony/routing": "2.2.*"
     },
     "suggest": {
-        "symfony/browser-kit": "self.version",
-        "symfony/class-loader": "self.version",
-        "symfony/config": "self.version",
-        "symfony/console": "self.version",
-        "symfony/dependency-injection": "self.version",
-        "symfony/finder": "self.version"
+        "symfony/browser-kit": "2.2.*",
+        "symfony/class-loader": "2.2.*",
+        "symfony/config": "2.2.*",
+        "symfony/console": "2.2.*",
+        "symfony/dependency-injection": "2.2.*",
+        "symfony/finder": "2.2.*"
     },
     "autoload": {
-        "psr-0": { "Symfony\\Component\\HttpKernel": "" }
+        "psr-0": { "Symfony\\Component\\HttpKernel\\": "" }
     },
     "target-dir": "Symfony/Component/HttpKernel",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/.gitattributes b/core/vendor/symfony/process/Symfony/Component/Process/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/process/Symfony/Component/Process/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Process.php b/core/vendor/symfony/process/Symfony/Component/Process/Process.php
index 4dfd16f..ba76255 100644
--- a/core/vendor/symfony/process/Symfony/Component/Process/Process.php
+++ b/core/vendor/symfony/process/Symfony/Component/Process/Process.php
@@ -11,6 +11,8 @@

 namespace Symfony\Component\Process;

+use Symfony\Component\Process\Exception\RuntimeException;
+
 /**
  * Process is a thin wrapper around proc_* functions to ease
  * start independent PHP processes.
@@ -44,6 +46,7 @@ class Process
     private $stdout;
     private $stderr;
     private $enhanceWindowsCompatibility;
+    private $enhanceSigchildCompatibility;
     private $pipes;
     private $process;
     private $status = self::STATUS_READY;
@@ -51,6 +54,8 @@ class Process
     private $fileHandles;
     private $readBytes;

+    private static $sigchild;
+
     /**
      * Exit codes translation table.
      *
@@ -134,6 +139,7 @@ public function __construct($commandline, $cwd = null, array $env = null, $stdin
         $this->stdin = $stdin;
         $this->setTimeout($timeout);
         $this->enhanceWindowsCompatibility = true;
+        $this->enhanceSigchildCompatibility = !defined('PHP_WINDOWS_VERSION_BUILD') && $this->isSigchildEnabled();
         $this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options);
     }

@@ -216,9 +222,14 @@ public function start($callback = null)
                 array('pipe', 'r'), // stdin
                 array('pipe', 'w'), // stdout
                 array('pipe', 'w'), // stderr
-                array('pipe', 'w')  // last exit code is output on the fourth pipe and caught to work around --enable-sigchild
             );
-            $this->commandline = '('.$this->commandline.') 3>/dev/null; echo $? >&3';
+
+            if ($this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
+                // last exit code is output on the fourth pipe and caught to work around --enable-sigchild
+                $descriptors = array_merge($descriptors, array(array('pipe', 'w')));
+
+                $this->commandline = '('.$this->commandline.') 3>/dev/null; code=$?; echo $code >&3; exit $code';
+            }
         }

         $commandline = $this->commandline;
@@ -418,10 +429,16 @@ public function getErrorOutput()
      *
      * @return integer The exit status code
      *
+     * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled
+     *
      * @api
      */
     public function getExitCode()
     {
+        if ($this->isSigchildEnabled() && !$this->enhanceSigchildCompatibility) {
+            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method');
+        }
+
         $this->updateStatus();

         return $this->exitcode;
@@ -435,14 +452,16 @@ public function getExitCode()
      *
      * @return string A string representation for the exit status code
      *
+     * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled
+     *
      * @see http://tldp.org/LDP/abs/html/exitcodes.html
      * @see http://en.wikipedia.org/wiki/Unix_signal
      */
     public function getExitCodeText()
     {
-        $this->updateStatus();
+        $exitcode = $this->getExitCode();

-        return isset(self::$exitCodes[$this->exitcode]) ? self::$exitCodes[$this->exitcode] : 'Unknown error';
+        return isset(self::$exitCodes[$exitcode]) ? self::$exitCodes[$exitcode] : 'Unknown error';
     }

     /**
@@ -450,13 +469,13 @@ public function getExitCodeText()
      *
      * @return Boolean true if the process ended successfully, false otherwise
      *
+     * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled
+     *
      * @api
      */
     public function isSuccessful()
     {
-        $this->updateStatus();
-
-        return 0 == $this->exitcode;
+        return 0 == $this->getExitCode();
     }

     /**
@@ -466,10 +485,16 @@ public function isSuccessful()
      *
      * @return Boolean
      *
+     * @throws RuntimeException In case --enable-sigchild is activated
+     *
      * @api
      */
     public function hasBeenSignaled()
     {
+        if ($this->isSigchildEnabled()) {
+            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved');
+        }
+
         $this->updateStatus();

         return $this->processInformation['signaled'];
@@ -482,10 +507,16 @@ public function hasBeenSignaled()
      *
      * @return integer
      *
+     * @throws RuntimeException In case --enable-sigchild is activated
+     *
      * @api
      */
     public function getTermSignal()
     {
+        if ($this->isSigchildEnabled()) {
+            throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved');
+        }
+
         $this->updateStatus();

         return $this->processInformation['termsig'];
@@ -508,7 +539,7 @@ public function hasBeenStopped()
     }

     /**
-     * Returns the number of the signal that caused the child process to stop its execution
+     * Returns the number of the signal that caused the child process to stop its execution.
      *
      * It is only meaningful if hasBeenStopped() returns true.
      *
@@ -544,7 +575,7 @@ public function isRunning()
      *
      * @param float $timeout The timeout in seconds
      *
-     * @return integer The exitcode of the process
+     * @return integer The exit-code of the process
      *
      * @throws \RuntimeException if the process got signaled
      */
@@ -579,26 +610,51 @@ public function stop($timeout=10)
         return $this->exitcode;
     }

+    /**
+     * Adds a line to the STDOUT stream.
+     *
+     * @param string $line The line to append
+     */
     public function addOutput($line)
     {
         $this->stdout .= $line;
     }

+    /**
+     * Adds a line to the STDERR stream.
+     *
+     * @param string $line The line to append
+     */
     public function addErrorOutput($line)
     {
         $this->stderr .= $line;
     }

+    /**
+     * Gets the command line to be executed.
+     *
+     * @return string The command to execute
+     */
     public function getCommandLine()
     {
         return $this->commandline;
     }

+    /**
+     * Sets the command line to be executed.
+     *
+     * @param string $commandline The command to execute
+     */
     public function setCommandLine($commandline)
     {
         $this->commandline = $commandline;
     }

+    /**
+     * Gets the process timeout.
+     *
+     * @return integer|null The timeout in seconds or null if it's disabled
+     */
     public function getTimeout()
     {
         return $this->timeout;
@@ -609,7 +665,9 @@ public function getTimeout()
      *
      * To disable the timeout, set this value to null.
      *
-     * @param integer|null
+     * @param integer|null $timeout The timeout in seconds
+     *
+     * @throws \InvalidArgumentException if the timeout is negative
      */
     public function setTimeout($timeout)
     {
@@ -628,57 +686,133 @@ public function setTimeout($timeout)
         $this->timeout = $timeout;
     }

+    /**
+     * Gets the working directory.
+     *
+     * @return string The current working directory
+     */
     public function getWorkingDirectory()
     {
         return $this->cwd;
     }

+    /**
+     * Sets the current working directory.
+     *
+     * @param string $cwd The new working directory
+     */
     public function setWorkingDirectory($cwd)
     {
         $this->cwd = $cwd;
     }

+    /**
+     * Gets the environment variables.
+     *
+     * @return array The current environment variables
+     */
     public function getEnv()
     {
         return $this->env;
     }

+    /**
+     * Sets the environment variables.
+     *
+     * @param array $env The new environment variables
+     */
     public function setEnv(array $env)
     {
         $this->env = $env;
     }

+    /**
+     * Gets the contents of STDIN.
+     *
+     * @return string The current contents
+     */
     public function getStdin()
     {
         return $this->stdin;
     }

+    /**
+     * Sets the contents of STDIN.
+     *
+     * @param string $stdin The new contents
+     */
     public function setStdin($stdin)
     {
         $this->stdin = $stdin;
     }

+    /**
+     * Gets the options for proc_open.
+     *
+     * @return array The current options
+     */
     public function getOptions()
     {
         return $this->options;
     }

+    /**
+     * Sets the options for proc_open.
+     *
+     * @param array $options The new options
+     */
     public function setOptions(array $options)
     {
         $this->options = $options;
     }

+    /**
+     * Gets whether or not Windows compatibility is enabled
+     *
+     * This is true by default.
+     *
+     * @return Boolean
+     */
     public function getEnhanceWindowsCompatibility()
     {
         return $this->enhanceWindowsCompatibility;
     }

+    /**
+     * Sets whether or not Windows compatibility is enabled
+     *
+     * @param Boolean $enhance
+     */
     public function setEnhanceWindowsCompatibility($enhance)
     {
         $this->enhanceWindowsCompatibility = (Boolean) $enhance;
     }

     /**
+     * Return whether sigchild compatibility mode is activated or not
+     *
+     * @return Boolean
+     */
+    public function getEnhanceSigchildCompatibility()
+    {
+        return $this->enhanceSigchildCompatibility;
+    }
+
+    /**
+     * Activate sigchild compatibility mode
+     *
+     * Sigchild compatibility mode is required to get the exit code and
+     * determine the success of a process when PHP has been compiled with
+     * the --enable-sigchild option
+     *
+     * @param Boolean $enhance
+     */
+    public function setEnhanceSigchildCompatibility($enhance)
+    {
+        $this->enhanceSigchildCompatibility = (Boolean) $enhance;
+    }
+
+    /**
      * Builds up the callback used by wait().
      *
      * The callbacks adds all occurred output to the specific buffer and calls
@@ -744,6 +878,23 @@ protected function updateOutput()
     }

     /**
+     * Return whether PHP has been compiled with the '--enable-sigchild' option or not
+     *
+     * @return Boolean
+     */
+    protected function isSigchildEnabled()
+    {
+        if (null !== self::$sigchild) {
+            return self::$sigchild;
+        }
+
+        ob_start();
+        phpinfo(INFO_GENERAL);
+
+        return self::$sigchild = false !== strpos(ob_get_clean(), '--enable-sigchild');
+    }
+
+    /**
      * Handles the windows file handles fallbacks
      *
      * @param mixed $callback A valid PHP callback
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php b/core/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php
new file mode 100644
index 0000000..a3df4e6
--- /dev/null
+++ b/core/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php
@@ -0,0 +1,300 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Tests;
+
+/**
+ * @author Robert Schönthal <seroscho@googlemail.com>
+ */
+abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
+{
+    protected abstract function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array());
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testNegativeTimeoutFromConstructor()
+    {
+        $this->getProcess('', null, null, null, -1);
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testNegativeTimeoutFromSetter()
+    {
+        $p = $this->getProcess('');
+        $p->setTimeout(-1);
+    }
+
+    public function testNullTimeout()
+    {
+        $p = $this->getProcess('');
+        $p->setTimeout(10);
+        $p->setTimeout(null);
+
+        $this->assertNull($p->getTimeout());
+    }
+
+    /**
+     * tests results from sub processes
+     *
+     * @dataProvider responsesCodeProvider
+     */
+    public function testProcessResponses($expected, $getter, $code)
+    {
+        $p = $this->getProcess(sprintf('php -r %s', escapeshellarg($code)));
+        $p->run();
+
+        $this->assertSame($expected, $p->$getter());
+    }
+
+    /**
+     * tests results from sub processes
+     *
+     * @dataProvider pipesCodeProvider
+     */
+    public function testProcessPipes($expected, $code)
+    {
+        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+            $this->markTestSkipped('Test hangs on Windows & PHP due to https://bugs.php.net/bug.php?id=60120 and https://bugs.php.net/bug.php?id=51800');
+        }
+
+        $p = $this->getProcess(sprintf('php -r %s', escapeshellarg($code)));
+        $p->setStdin($expected);
+        $p->run();
+
+        $this->assertSame($expected, $p->getOutput());
+        $this->assertSame($expected, $p->getErrorOutput());
+    }
+
+    public function chainedCommandsOutputProvider()
+    {
+        return array(
+            array('11', ';', '1'),
+            array('22', '&&', '2'),
+        );
+    }
+
+    /**
+     *
+     * @dataProvider chainedCommandsOutputProvider
+     */
+    public function testChainedCommandsOutput($expected, $operator, $input)
+    {
+        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+            $this->markTestSkipped('Does it work on windows ?');
+        }
+
+        $process = $this->getProcess(sprintf('echo -n %s %s echo -n %s', $input, $operator, $input));
+        $process->run();
+        $this->assertEquals($expected, $process->getOutput());
+    }
+
+    public function testCallbackIsExecutedForOutput()
+    {
+        $p = $this->getProcess(sprintf('php -r %s', escapeshellarg('echo \'foo\';')));
+
+        $called = false;
+        $p->run(function ($type, $buffer) use (&$called) {
+            $called = $buffer === 'foo';
+        });
+
+        $this->assertTrue($called, 'The callback should be executed with the output');
+    }
+
+    public function testExitCodeCommandFailed()
+    {
+        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+            $this->markTestSkipped('Windows does not support POSIX exit code');
+        }
+
+        // such command run in bash return an exitcode 127
+        $process = $this->getProcess('nonexistingcommandIhopeneversomeonewouldnameacommandlikethis');
+        $process->run();
+
+        $this->assertGreaterThan(0, $process->getExitCode());
+    }
+
+    public function testExitCodeText()
+    {
+        $process = $this->getProcess('');
+        $r = new \ReflectionObject($process);
+        $p = $r->getProperty('exitcode');
+        $p->setAccessible(true);
+
+        $p->setValue($process, 2);
+        $this->assertEquals('Misuse of shell builtins', $process->getExitCodeText());
+    }
+
+    public function testStartIsNonBlocking()
+    {
+        $process = $this->getProcess('php -r "sleep(4);"');
+        $start = microtime(true);
+        $process->start();
+        $end = microtime(true);
+        $this->assertLessThan(1 , $end-$start);
+    }
+
+    public function testUpdateStatus()
+    {
+        $process = $this->getProcess('php -h');
+        $process->run();
+        $this->assertTrue(strlen($process->getOutput()) > 0);
+    }
+
+    public function testGetExitCode()
+    {
+        $process = $this->getProcess('php -m');
+        $process->run();
+        $this->assertEquals(0, $process->getExitCode());
+    }
+
+    public function testIsRunning()
+    {
+        $process = $this->getProcess('php -r "sleep(1);"');
+        $this->assertFalse($process->isRunning());
+        $process->start();
+        $this->assertTrue($process->isRunning());
+        $process->wait();
+        $this->assertFalse($process->isRunning());
+    }
+
+    public function testStop()
+    {
+        $process = $this->getProcess('php -r "while (true) {}"');
+        $process->start();
+        $this->assertTrue($process->isRunning());
+        $process->stop();
+        $this->assertFalse($process->isRunning());
+    }
+
+    public function testIsSuccessful()
+    {
+        $process = $this->getProcess('php -m');
+        $process->run();
+        $this->assertTrue($process->isSuccessful());
+    }
+
+    public function testIsNotSuccessful()
+    {
+        $process = $this->getProcess('php -r "while (true) {}"');
+        $process->start();
+        $this->assertTrue($process->isRunning());
+        $process->stop();
+        $this->assertFalse($process->isSuccessful());
+    }
+
+    public function testProcessIsNotSignaled()
+    {
+        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+            $this->markTestSkipped('Windows does not support POSIX signals');
+        }
+
+        $process = $this->getProcess('php -m');
+        $process->run();
+        $this->assertFalse($process->hasBeenSignaled());
+    }
+
+    public function testProcessWithoutTermSignal()
+    {
+        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+            $this->markTestSkipped('Windows does not support POSIX signals');
+        }
+
+        $process = $this->getProcess('php -m');
+        $process->run();
+        $this->assertEquals(0, $process->getTermSignal());
+    }
+
+    public function testProcessIsSignaledIfStopped()
+    {
+        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+            $this->markTestSkipped('Windows does not support POSIX signals');
+        }
+
+        $process = $this->getProcess('php -r "while (true) {}"');
+        $process->start();
+        $process->stop();
+        $this->assertTrue($process->hasBeenSignaled());
+    }
+
+    public function testProcessWithTermSignal()
+    {
+        if (defined('PHP_WINDOWS_VERSION_BUILD')) {
+            $this->markTestSkipped('Windows does not support POSIX signals');
+        }
+
+
+        $process = $this->getProcess('php -r "while (true) {}"');
+        $process->start();
+        $process->stop();
+        $this->assertEquals(SIGTERM, $process->getTermSignal());
+    }
+
+    public function testPhpDeadlock()
+    {
+        $this->markTestSkipped('Can course php to hang');
+
+        // Sleep doesn't work as it will allow the process to handle signals and close
+        // file handles from the other end.
+        $process = $this->getProcess('php -r "while (true) {}"');
+        $process->start();
+
+        // PHP will deadlock when it tries to cleanup $process
+    }
+
+    public function responsesCodeProvider()
+    {
+        return array(
+            //expected output / getter / code to execute
+            //array(1,'getExitCode','exit(1);'),
+            //array(true,'isSuccessful','exit();'),
+            array('output', 'getOutput', 'echo \'output\';'),
+        );
+    }
+
+    public function pipesCodeProvider()
+    {
+        $variations = array(
+            'fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);',
+            'include \'' . __DIR__ . '/ProcessTestHelper.php\';',
+        );
+        $baseData = str_repeat('*', 1024);
+
+        $codes = array();
+        foreach (array(1, 16, 64, 1024, 4096) as $size) {
+            $data = str_repeat($baseData, $size) . '!';
+            foreach ($variations as $code) {
+                $codes[] = array($data, $code);
+            }
+        }
+
+        return $codes;
+    }
+
+    /**
+     * provides default method names for simple getter/setter
+     */
+    public function methodProvider()
+    {
+        $defaults = array(
+            array('CommandLine'),
+            array('Timeout'),
+            array('WorkingDirectory'),
+            array('Env'),
+            array('Stdin'),
+            array('Options')
+        );
+
+        return $defaults;
+    }
+}
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessInSigchildEnvironment.php b/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessInSigchildEnvironment.php
new file mode 100644
index 0000000..3977bcd
--- /dev/null
+++ b/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessInSigchildEnvironment.php
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Tests;
+
+use Symfony\Component\Process\Process;
+
+class ProcessInSigchildEnvironment extends Process
+{
+    protected function isSigchildEnabled()
+    {
+        return true;
+    }
+}
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessTest.php b/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessTest.php
deleted file mode 100644
index c54f5d8..0000000
--- a/core/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessTest.php
+++ /dev/null
@@ -1,202 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Process\Tests;
-
-use Symfony\Component\Process\Process;
-
-/**
- * @author Robert Schönthal <seroscho@googlemail.com>
- */
-class ProcessTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @expectedException \InvalidArgumentException
-     */
-    public function testNegativeTimeoutFromConstructor()
-    {
-        new Process('', null, null, null, -1);
-    }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     */
-    public function testNegativeTimeoutFromSetter()
-    {
-        $p = new Process('');
-        $p->setTimeout(-1);
-    }
-
-    public function testNullTimeout()
-    {
-        $p = new Process('');
-        $p->setTimeout(10);
-        $p->setTimeout(null);
-
-        $this->assertNull($p->getTimeout());
-    }
-
-    /**
-     * tests results from sub processes
-     *
-     * @dataProvider responsesCodeProvider
-     */
-    public function testProcessResponses($expected, $getter, $code)
-    {
-        $p = new Process(sprintf('php -r %s', escapeshellarg($code)));
-        $p->run();
-
-        $this->assertSame($expected, $p->$getter());
-    }
-
-    /**
-     * tests results from sub processes
-     *
-     * @dataProvider pipesCodeProvider
-     */
-    public function testProcessPipes($expected, $code)
-    {
-        if (strpos(PHP_OS, "WIN") === 0) {
-            $this->markTestSkipped('Test hangs on Windows & PHP due to https://bugs.php.net/bug.php?id=60120 and https://bugs.php.net/bug.php?id=51800');
-        }
-
-        $p = new Process(sprintf('php -r %s', escapeshellarg($code)));
-        $p->setStdin($expected);
-        $p->run();
-
-        $this->assertSame($expected, $p->getOutput());
-        $this->assertSame($expected, $p->getErrorOutput());
-        $this->assertSame(0, $p->getExitCode());
-    }
-
-    public function testCallbackIsExecutedForOutput()
-    {
-        $p = new Process(sprintf('php -r %s', escapeshellarg('echo \'foo\';')));
-
-        $called = false;
-        $p->run(function ($type, $buffer) use (&$called) {
-            $called = $buffer === 'foo';
-        });
-
-        $this->assertTrue($called, 'The callback should be executed with the output');
-    }
-
-    public function testExitCodeText()
-    {
-        $process = new Process('');
-        $r = new \ReflectionObject($process);
-        $p = $r->getProperty('exitcode');
-        $p->setAccessible(true);
-
-        $p->setValue($process, 2);
-        $this->assertEquals('Misuse of shell builtins', $process->getExitCodeText());
-    }
-
-    public function testStartIsNonBlocking()
-    {
-        $process = new Process('php -r "sleep(4);"');
-        $start = microtime(true);
-        $process->start();
-        $end = microtime(true);
-        $this->assertLessThan(1 , $end-$start);
-    }
-
-    public function testUpdateStatus()
-    {
-        $process = new Process('php -h');
-        $process->start();
-        usleep(300000); // wait for output
-        $this->assertEquals(0, $process->getExitCode());
-        $this->assertTrue(strlen($process->getOutput()) > 0);
-    }
-
-    public function testIsRunning()
-    {
-        $process = new Process('php -r "sleep(1);"');
-        $this->assertFalse($process->isRunning());
-        $process->start();
-        $this->assertTrue($process->isRunning());
-        $process->wait();
-        $this->assertFalse($process->isRunning());
-    }
-
-    public function testStop()
-    {
-        $process = new Process('php -r "while (true) {}"');
-        $process->start();
-        $this->assertTrue($process->isRunning());
-        $process->stop();
-        $this->assertFalse($process->isRunning());
-
-        // skip this check on windows since it does not support signals
-        if (!defined('PHP_WINDOWS_VERSION_MAJOR')) {
-            $this->assertTrue($process->hasBeenSignaled());
-        }
-    }
-
-    public function testPhpDeadlock()
-    {
-        $this->markTestSkipped('Can course php to hang');
-
-        // Sleep doesn't work as it will allow the process to handle signals and close
-        // file handles from the other end.
-        $process = new Process('php -r "while (true) {}"');
-        $process->start();
-
-        // PHP will deadlock when it tries to cleanup $process
-    }
-
-    public function responsesCodeProvider()
-    {
-        return array(
-            //expected output / getter / code to execute
-            //array(1,'getExitCode','exit(1);'),
-            //array(true,'isSuccessful','exit();'),
-            array('output', 'getOutput', 'echo \'output\';'),
-        );
-    }
-
-    public function pipesCodeProvider()
-    {
-        $variations = array(
-            'fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);',
-            'include \'' . __DIR__ . '/ProcessTestHelper.php\';',
-        );
-        $baseData = str_repeat('*', 1024);
-
-        $codes = array();
-        foreach (array(1, 16, 64, 1024, 4096) as $size) {
-            $data = str_repeat($baseData, $size) . '!';
-            foreach ($variations as $code) {
-                $codes[] = array($data, $code);
-            }
-        }
-
-        return $codes;
-    }
-
-    /**
-     * provides default method names for simple getter/setter
-     */
-    public function methodProvider()
-    {
-        $defaults = array(
-            array('CommandLine'),
-            array('Timeout'),
-            array('WorkingDirectory'),
-            array('Env'),
-            array('Stdin'),
-            array('Options')
-        );
-
-        return $defaults;
-    }
-}
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php b/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
new file mode 100644
index 0000000..4a321ad
--- /dev/null
+++ b/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
@@ -0,0 +1,99 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Tests;
+
+class SigchildDisabledProcessTest extends AbstractProcessTest
+{
+
+    protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
+    {
+        $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options);
+        $process->setEnhanceSigchildCompatibility(false);
+
+        return $process;
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testGetExitCode()
+    {
+        parent::testGetExitCode();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testExitCodeCommandFailed()
+    {
+        parent::testExitCodeCommandFailed();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessIsSignaledIfStopped()
+    {
+        parent::testProcessIsSignaledIfStopped();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessWithTermSignal()
+    {
+        parent::testProcessWithTermSignal();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessIsNotSignaled()
+    {
+        parent::testProcessIsNotSignaled();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessWithoutTermSignal()
+    {
+        parent::testProcessWithoutTermSignal();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testExitCodeText()
+    {
+        $process = $this->getProcess('qdfsmfkqsdfmqmsd');
+        $process->run();
+
+        $process->getExitCodeText();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testIsSuccessful()
+    {
+        parent::testIsSuccessful();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testIsNotSuccessful()
+    {
+        parent::testIsNotSuccessful();
+    }
+}
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php b/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php
new file mode 100644
index 0000000..4c04ff1
--- /dev/null
+++ b/core/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php
@@ -0,0 +1,65 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Tests;
+
+class SigchildEnabledProcessTest extends AbstractProcessTest
+{
+
+    protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
+    {
+        $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options);
+        $process->setEnhanceSigchildCompatibility(true);
+
+        return $process;
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessIsSignaledIfStopped()
+    {
+        parent::testProcessIsSignaledIfStopped();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessWithTermSignal()
+    {
+        parent::testProcessWithTermSignal();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessIsNotSignaled()
+    {
+        parent::testProcessIsNotSignaled();
+    }
+
+    /**
+     * @expectedException Symfony\Component\Process\Exception\RuntimeException
+     */
+    public function testProcessWithoutTermSignal()
+    {
+        parent::testProcessWithoutTermSignal();
+    }
+
+    public function testExitCodeText()
+    {
+        $process = $this->getProcess('qdfsmfkqsdfmqmsd');
+        $process->run();
+
+        $this->assertInternalType('string', $process->getExitCodeText());
+    }
+
+}
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php b/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php
new file mode 100644
index 0000000..8742a69
--- /dev/null
+++ b/core/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php
@@ -0,0 +1,87 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Process\Tests;
+
+use Symfony\Component\Process\Process;
+
+class SimpleProcessTest extends AbstractProcessTest
+{
+
+    protected function skipIfPHPSigchild()
+    {
+        ob_start();
+        phpinfo(INFO_GENERAL);
+
+        if (false !== strpos(ob_get_clean(), '--enable-sigchild')) {
+            $this->markTestSkipped('Your PHP has been compiled with --enable-sigchild, this test can not be executed');
+        }
+    }
+
+    protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array())
+    {
+        return new Process($commandline, $cwd, $env, $stdin, $timeout, $options);
+    }
+
+    public function testGetExitCode()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testGetExitCode();
+    }
+
+    public function testExitCodeCommandFailed()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testExitCodeCommandFailed();
+    }
+
+    public function testProcessIsSignaledIfStopped()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testProcessIsSignaledIfStopped();
+    }
+
+    public function testProcessWithTermSignal()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testProcessWithTermSignal();
+    }
+
+    public function testProcessIsNotSignaled()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testProcessIsNotSignaled();
+    }
+
+    public function testProcessWithoutTermSignal()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testProcessWithoutTermSignal();
+    }
+
+    public function testExitCodeText()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testExitCodeText();
+    }
+
+    public function testIsSuccessful()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testIsSuccessful();
+    }
+
+    public function testIsNotSuccessful()
+    {
+        $this->skipIfPHPSigchild();
+        parent::testIsNotSuccessful();
+    }
+}
diff --git a/core/vendor/symfony/process/Symfony/Component/Process/phpunit.xml.dist b/core/vendor/symfony/process/Symfony/Component/Process/phpunit.xml.dist
deleted file mode 100644
index c120a97..0000000
--- a/core/vendor/symfony/process/Symfony/Component/Process/phpunit.xml.dist
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<phpunit backupGlobals="false"
-         backupStaticAttributes="false"
-         colors="true"
-         convertErrorsToExceptions="true"
-         convertNoticesToExceptions="true"
-         convertWarningsToExceptions="true"
-         processIsolation="false"
-         stopOnFailure="false"
-         syntaxCheck="false"
-         bootstrap="Tests/bootstrap.php"
->
-    <testsuites>
-        <testsuite name="Symfony Process Component Test Suite">
-            <directory>./Tests/</directory>
-        </testsuite>
-    </testsuites>
-
-    <filter>
-        <whitelist>
-            <directory>./</directory>
-            <exclude>
-                <directory>./Tests</directory>
-            </exclude>
-        </whitelist>
-    </filter>
-</phpunit>
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/.gitattributes b/core/vendor/symfony/routing/Symfony/Component/Routing/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md b/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md
index edfdd4e..d02009d 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md
@@ -1,6 +1,25 @@
 CHANGELOG
 =========

+2.2.0
+-----
+
+ * Adjacent placeholders without separator work now, e.g. `/{x}{y}{z}.{_format}`.
+ * Characters that function as separator between placeholders are now whitelisted
+   to fix routes with normal text around a variable, e.g. `/prefix{var}suffix`.
+ * [BC BREAK] The default requirement of a variable has been changed slightly.
+   Previously it disallowed the previous and the next char around a variable. Now
+   it disallows the slash (`/`) and the next char. Using the previous char added
+   no value and was problematic because the route `/index.{_format}` would be
+   matched by `/index.ht/ml`.
+ * The default requirement now uses possesive quantifiers when possible which
+   improves matching performance by up to 20% because it prevents backtracking
+   when it's not needed.
+ * The ConfigurableRequirementsInterface can now also be used to disable the requirements
+   check on URL generation completely by calling `setStrictRequirements(null)`. It
+   improves performance in production environment as you should know that params always
+   pass the requirements (otherwise it would break your link anyway).
+
 2.1.0
 -----

@@ -22,5 +41,6 @@ CHANGELOG
    been used anyway without creating inconsistencies
  * [BC BREAK] RouteCollection::remove also removes a route from parent
    collections (not only from its children)
- * added strict_requirements option to disable exceptions (and generate empty
-   URLs instead) when generating a route with an invalid parameter value
+ * added ConfigurableRequirementsInterface that allows to disable exceptions
+   (and generate empty URLs instead) when generating a route with an invalid
+   parameter value
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php
index 9a795d6..5925838 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php
@@ -12,25 +12,44 @@
 namespace Symfony\Component\Routing\Generator;

 /**
- * ConfigurableRequirementsInterface must be implemented by URL generators in order
- * to be able to configure whether an exception should be generated when the
- * parameters do not match the requirements.
+ * ConfigurableRequirementsInterface must be implemented by URL generators that
+ * can be configured whether an exception should be generated when the parameters
+ * do not match the requirements. It is also possible to disable the requirements
+ * check for URL generation completely.
+ *
+ * The possible configurations and use-cases:
+ * - setStrictRequirements(true): Throw an exception for mismatching requirements. This
+ *   is mostly useful in development environment.
+ * - setStrictRequirements(false): Don't throw an exception but return null as URL for
+ *   mismatching requirements and log the problem. Useful when you cannot control all
+ *   params because they come from third party libs but don't want to have a 404 in
+ *   production environment. It should log the mismatch so one can review it.
+ * - setStrictRequirements(null): Return the URL with the given parameters without
+ *   checking the requirements at all. When generating an URL you should either trust
+ *   your params or you validated them beforehand because otherwise it would break your
+ *   link anyway. So in production environment you should know that params always pass
+ *   the requirements. Thus this option allows to disable the check on URL generation for
+ *   performance reasons (saving a preg_match for each requirement every time a URL is
+ *   generated).
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ * @author Tobias Schultze <http://tobion.de>
  */
 interface ConfigurableRequirementsInterface
 {
     /**
      * Enables or disables the exception on incorrect parameters.
+     * Passing null will deactivate the requirements check completely.
      *
-     * @param Boolean $enabled
+     * @param Boolean|null $enabled
      */
     public function setStrictRequirements($enabled);

     /**
-     * Gets the strict check of incorrect parameters.
+     * Returns whether to throw an exception on incorrect parameters.
+     * Null means the requirements check is deactivated completely.
      *
-     * @return Boolean
+     * @return Boolean|null
      */
     public function isStrictRequirements();
 }
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php
index 9b5cc05..49aceca 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php
@@ -11,8 +11,6 @@

 namespace Symfony\Component\Routing\Generator\Dumper;

-use Symfony\Component\Routing\Route;
-
 /**
  * PhpGeneratorDumper creates a PHP class able to generate URLs for a given set of routes.
  *
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php
index 18edd16..1c15fd8 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php
@@ -11,7 +11,6 @@

 namespace Symfony\Component\Routing\Generator;

-use Symfony\Component\Routing\Route;
 use Symfony\Component\Routing\RouteCollection;
 use Symfony\Component\Routing\RequestContext;
 use Symfony\Component\Routing\Exception\InvalidParameterException;
@@ -23,6 +22,7 @@
  * UrlGenerator generates a URL based on a set of routes.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ * @author Tobias Schultze <http://tobion.de>
  *
  * @api
  */
@@ -99,7 +99,7 @@ public function getContext()
      */
     public function setStrictRequirements($enabled)
     {
-        $this->strictRequirements = (Boolean) $enabled;
+        $this->strictRequirements = null === $enabled ? null : (Boolean) $enabled;
     }

     /**
@@ -132,13 +132,10 @@ public function generate($name, $parameters = array(), $absolute = false)
     protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $absolute)
     {
         $variables = array_flip($variables);
-
-        $originParameters = $parameters;
-        $parameters = array_replace($this->context->getParameters(), $parameters);
-        $tparams = array_replace($defaults, $parameters);
+        $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters);

         // all params must be given
-        if ($diff = array_diff_key($variables, $tparams)) {
+        if ($diff = array_diff_key($variables, $mergedParams)) {
             throw new MissingMandatoryParametersException(sprintf('The "%s" route has some missing mandatory parameters ("%s").', $name, implode('", "', array_keys($diff))));
         }

@@ -146,30 +143,26 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa
         $optional = true;
         foreach ($tokens as $token) {
             if ('variable' === $token[0]) {
-                if (false === $optional || !array_key_exists($token[3], $defaults) || (isset($parameters[$token[3]]) && (string) $parameters[$token[3]] != (string) $defaults[$token[3]])) {
-                    if (!$isEmpty = in_array($tparams[$token[3]], array(null, '', false), true)) {
-                        // check requirement
-                        if ($tparams[$token[3]] && !preg_match('#^'.$token[2].'$#', $tparams[$token[3]])) {
-                            $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given).', $token[3], $name, $token[2], $tparams[$token[3]]);
-                            if ($this->strictRequirements) {
-                                throw new InvalidParameterException($message);
-                            }
-
-                            if ($this->logger) {
-                                $this->logger->err($message);
-                            }
-
-                            return null;
+                if (!$optional || !array_key_exists($token[3], $defaults) || (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]]) {
+                    // check requirement
+                    if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#', $mergedParams[$token[3]])) {
+                        $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given).', $token[3], $name, $token[2], $mergedParams[$token[3]]);
+                        if ($this->strictRequirements) {
+                            throw new InvalidParameterException($message);
+                        }
+
+                        if ($this->logger) {
+                            $this->logger->err($message);
                         }
-                    }

-                    if (!$isEmpty || !$optional) {
-                        $url = $token[1].$tparams[$token[3]].$url;
+                        return null;
                     }

+                    $url = $token[1].$mergedParams[$token[3]].$url;
                     $optional = false;
                 }
-            } elseif ('text' === $token[0]) {
+            } else {
+                // static text
                 $url = $token[1].$url;
                 $optional = false;
             }
@@ -193,7 +186,7 @@ protected function doGenerate($variables, $defaults, $requirements, $tokens, $pa
         }

         // add a query string if needed
-        $extra = array_diff_key($originParameters, $variables, $defaults);
+        $extra = array_diff_key($parameters, $variables);
         if ($extra && $query = http_build_query($extra, '', '&')) {
             $url .= '?'.$query;
         }
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/XmlFileLoader.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/XmlFileLoader.php
index 5e0093d..695494b 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/XmlFileLoader.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/XmlFileLoader.php
@@ -61,10 +61,10 @@ public function load($file, $type = null)
     /**
      * Parses a node from a loaded XML file.
      *
-     * @param RouteCollection $collection the collection to associate with the node
-     * @param DOMElement      $node       the node to parse
-     * @param string          $path       the path of the XML file being processed
-     * @param string          $file
+     * @param RouteCollection  $collection the collection to associate with the node
+     * @param \DOMElement      $node       the node to parse
+     * @param string           $path       the path of the XML file being processed
+     * @param string           $file
      */
     protected function parseNode(RouteCollection $collection, \DOMElement $node, $path, $file)
     {
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php
index d51e339..d6d0539 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php
@@ -123,7 +123,7 @@ protected function parseRoute(RouteCollection $collection, $name, $config, $file
      *
      * @return array
      *
-     * @throws InvalidArgumentException if one of the provided config keys is not supported
+     * @throws \InvalidArgumentException if one of the provided config keys is not supported
      */
     private function normalizeRouteConfig(array $config)
     {
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php
new file mode 100644
index 0000000..c75e9a0
--- /dev/null
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php
@@ -0,0 +1,101 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Routing\Matcher\Dumper;
+
+/**
+ * Collection of routes.
+ *
+ * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ */
+class DumperCollection implements \IteratorAggregate
+{
+    private $parent;
+    private $children = array();
+
+    /**
+     * Returns the children routes and collections.
+     *
+     * @return array Array of DumperCollection|DumperRoute
+     */
+    public function all()
+    {
+        return $this->children;
+    }
+
+    /**
+     * Adds a route or collection
+     *
+     * @param DumperRoute|DumperCollection The route or collection
+     */
+    public function add($child)
+    {
+        if ($child instanceof DumperCollection) {
+            $child->setParent($this);
+        }
+        $this->children[] = $child;
+    }
+
+    /**
+     * Sets children
+     *
+     * @param array $children The children
+     */
+    public function setAll(array $children)
+    {
+        foreach ($children as $child) {
+            if ($child instanceof DumperCollection) {
+                $child->setParent($this);
+            }
+        }
+        $this->children = $children;
+    }
+
+    /**
+     * Returns an iterator over the children.
+     *
+     * @return \Iterator The iterator
+     */
+    public function getIterator()
+    {
+        return new \ArrayIterator($this->children);
+    }
+
+    /**
+     * Returns the root of the collection.
+     *
+     * @return DumperCollection The root collection
+     */
+    public function getRoot()
+    {
+        return (null !== $this->parent) ? $this->parent->getRoot() : $this;
+    }
+
+    /**
+     * Returns the parent collection.
+     *
+     * @return DumperCollection|null The parent collection or null if the collection has no parent
+     */
+    protected function getParent()
+    {
+        return $this->parent;
+    }
+
+    /**
+     * Sets the parent collection.
+     *
+     * @param DumperCollection $parent The parent collection
+     */
+    protected function setParent(DumperCollection $parent)
+    {
+        $this->parent = $parent;
+    }
+}
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php
new file mode 100644
index 0000000..b9f3bd3
--- /dev/null
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php
@@ -0,0 +1,103 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Routing\Matcher\Dumper;
+
+/**
+ * Prefix tree of routes preserving routes order.
+ *
+ * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ */
+class DumperPrefixCollection extends DumperCollection
+{
+    private $prefix = '';
+
+    /**
+     * Returns the prefix.
+     *
+     * @return string The prefix
+     */
+    public function getPrefix()
+    {
+        return $this->prefix;
+    }
+
+    /**
+     * Sets the prefix.
+     *
+     * @param string $prefix The prefix
+     */
+    public function setPrefix($prefix)
+    {
+        $this->prefix = $prefix;
+    }
+
+    /**
+     * Adds a route in the tree.
+     *
+     * @param DumperRoute $route The route
+     *
+     * @return DumperPrefixCollection The node the route was added to
+     */
+    public function addPrefixRoute(DumperRoute $route)
+    {
+        $prefix = $route->getRoute()->compile()->getStaticPrefix();
+
+        // Same prefix, add to current leave
+        if ($this->prefix === $prefix) {
+            $this->add($route);
+
+            return $this;
+        }
+
+        // Prefix starts with route's prefix
+        if ('' === $this->prefix || 0 === strpos($prefix, $this->prefix)) {
+            $collection = new DumperPrefixCollection();
+            $collection->setPrefix(substr($prefix, 0, strlen($this->prefix)+1));
+            $this->add($collection);
+
+            return $collection->addPrefixRoute($route);
+        }
+
+        // No match, fallback to parent (recursively)
+
+        if (null === $parent = $this->getParent()) {
+            throw new \LogicException("The collection root must not have a prefix");
+        }
+
+        return $parent->addPrefixRoute($route);
+    }
+
+    /**
+     * Merges nodes whose prefix ends with a slash
+     *
+     * Children of a node whose prefix ends with a slash are moved to the parent node
+     */
+    public function mergeSlashNodes()
+    {
+        $children = array();
+
+        foreach ($this as $child) {
+            if ($child instanceof self) {
+                $child->mergeSlashNodes();
+                if ('/' === substr($child->prefix, -1)) {
+                    $children = array_merge($children, $child->all());
+                } else {
+                    $children[] = $child;
+                }
+            } else {
+                $children[] = $child;
+            }
+        }
+
+        $this->setAll($children);
+    }
+}
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php
new file mode 100644
index 0000000..866b611
--- /dev/null
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php
@@ -0,0 +1,57 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Routing\Matcher\Dumper;
+
+use Symfony\Component\Routing\Route;
+
+/**
+ * Container for a Route.
+ *
+ * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ */
+class DumperRoute
+{
+    private $name;
+    private $route;
+
+    /**
+     * Constructor.
+     *
+     * @param string $name  The route name
+     * @param Route  $route The route
+     */
+    public function __construct($name, Route $route)
+    {
+        $this->name = $name;
+        $this->route = $route;
+    }
+
+    /**
+     * Returns the route name.
+     *
+     * @return string The route name
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    /**
+     * Returns the route.
+     *
+     * @return Route The route
+     */
+    public function getRoute()
+    {
+        return $this->route;
+    }
+}
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php
index 15fab9e..df678bc 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php
@@ -19,6 +19,7 @@
  *
  * @author Fabien Potencier <fabien@symfony.com>
  * @author Tobias Schultze <http://tobion.de>
+ * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
  */
 class PhpMatcherDumper extends MatcherDumper
 {
@@ -99,56 +100,48 @@ public function match(\$pathinfo)
     }

     /**
-     * Counts the number of routes as direct child of the RouteCollection.
+     * Generates PHP code recursively to match a RouteCollection with all child routes and child collections.
      *
-     * @param RouteCollection $routes A RouteCollection instance
+     * @param RouteCollection $routes               A RouteCollection instance
+     * @param Boolean         $supportsRedirections Whether redirections are supported by the base class
      *
-     * @return integer Number of Routes
+     * @return string PHP code
      */
-    private function countDirectChildRoutes(RouteCollection $routes)
+    private function compileRoutes(RouteCollection $routes, $supportsRedirections)
     {
-        $count = 0;
-        foreach ($routes as $route) {
-            if ($route instanceof Route) {
-                $count++;
-            }
-        }
+        $collection = $this->flattenRouteCollection($routes);
+        $tree = $this->buildPrefixTree($collection);

-        return $count;
+        return $this->compilePrefixRoutes($tree, $supportsRedirections);
     }

     /**
-     * Generates PHP code recursively to match a RouteCollection with all child routes and child collections.
+     * Generates PHP code recursively to match a tree of routes
      *
-     * @param RouteCollection $routes               A RouteCollection instance
-     * @param Boolean         $supportsRedirections Whether redirections are supported by the base class
-     * @param string|null     $parentPrefix         The prefix of the parent collection used to optimize the code
+     * @param DumperPrefixCollection $routes A DumperPrefixCollection instance
+     * @param Boolean                $supportsRedirections Whether redirections are supported by the base class
+     * @parma string                 $prefix Prefix of the parent collection
      *
      * @return string PHP code
      */
-    private function compileRoutes(RouteCollection $routes, $supportsRedirections, $parentPrefix = null)
+    private function compilePrefixRoutes(DumperPrefixCollection $collection, $supportsRedirections, $parentPrefix = '')
     {
         $code = '';
+        $prefix = $collection->getPrefix();
+        $optimizable = 1 < strlen($prefix) && 1 < count($collection->all());
+        $optimizedPrefix = $parentPrefix;

-        $prefix = $routes->getPrefix();
-        $countDirectChildRoutes = $this->countDirectChildRoutes($routes);
-        $countAllChildRoutes = count($routes->all());
-        // Can the matching be optimized by wrapping it with the prefix condition
-        // - no need to optimize if current prefix is the same as the parent prefix
-        // - if $countDirectChildRoutes === 0, the sub-collections can do their own optimizations (in case there are any)
-        // - it's not worth wrapping a single child route
-        // - prefixes with variables cannot be optimized because routes within the collection might have different requirements for the same variable
-        $optimizable = '' !== $prefix && $prefix !== $parentPrefix && $countDirectChildRoutes > 0 && $countAllChildRoutes > 1 && false === strpos($prefix, '{');
         if ($optimizable) {
+            $optimizedPrefix = $prefix;
+
             $code .= sprintf("    if (0 === strpos(\$pathinfo, %s)) {\n", var_export($prefix, true));
         }

-        foreach ($routes as $name => $route) {
-            if ($route instanceof Route) {
-                // a single route in a sub-collection is not wrapped so it should do its own optimization in ->compileRoute with $parentPrefix = null
-                $code .= $this->compileRoute($route, $name, $supportsRedirections, 1 === $countAllChildRoutes ? null : $prefix)."\n";
-            } elseif ($countAllChildRoutes - $countDirectChildRoutes > 0) { // we can stop iterating recursively if we already know there are no more routes
-                $code .= $this->compileRoutes($route, $supportsRedirections, $prefix);
+        foreach ($collection as $route) {
+            if ($route instanceof DumperCollection) {
+                $code .= $this->compilePrefixRoutes($route, $supportsRedirections, $optimizedPrefix);
+            } else {
+                $code .= $this->compileRoute($route->getRoute(), $route->getName(), $supportsRedirections, $optimizedPrefix)."\n";
             }
         }

@@ -161,7 +154,6 @@ private function compileRoutes(RouteCollection $routes, $supportsRedirections, $
         return $code;
     }

-
     /**
      * Compiles a single Route to PHP code used to match it against the path info.
      *
@@ -290,4 +282,54 @@ private function compileRoute(Route $route, $name, $supportsRedirections, $paren

         return $code;
     }
+
+    /**
+     * Flattens a tree of routes to a single collection
+     *
+     * @param  RouteCollection  $routes Collection of routes
+     * @param  DumperCollection $to A DumperCollection to add routes to
+     *
+     * @return DumperCollection
+     */
+    private function flattenRouteCollection(RouteCollection $routes, DumperCollection $to = null)
+    {
+        if (null === $to) {
+            $to = new DumperCollection();
+        }
+
+        foreach ($routes as $name => $route) {
+            if ($route instanceof RouteCollection) {
+                $this->flattenRouteCollection($route, $to);
+            } else {
+                $to->add(new DumperRoute($name, $route));
+            }
+        }
+
+        return $to;
+    }
+
+    /**
+     * Organizes the routes into a prefix tree.
+     *
+     * Routes order is preserved such that traversing the tree will traverse the
+     * routes in the origin order
+     *
+     * @param  DumperCollection $collection A collection of routes
+     *
+     * @return DumperPrefixCollection
+     */
+    private function buildPrefixTree(DumperCollection $collection)
+    {
+        $tree = new DumperPrefixCollection();
+        $current = $tree;
+
+        foreach ($collection as $route) {
+            $current = $current->addPrefixRoute($route);
+        }
+
+        $tree->mergeSlashNodes();
+
+        return $tree;
+    }
+
 }
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php
index c417d94..8e757bf 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php
@@ -174,13 +174,12 @@ protected function handleRouteRequirements($pathinfo, $name, Route $route)
      */
     protected function mergeDefaults($params, $defaults)
     {
-        $parameters = $defaults;
         foreach ($params as $key => $value) {
             if (!is_int($key)) {
-                $parameters[$key] = $value;
+                $defaults[$key] = $value;
             }
         }

-        return $parameters;
+        return $defaults;
     }
 }
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Route.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Route.php
index 318426a..775be74 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Route.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Route.php
@@ -95,13 +95,9 @@ public function getPattern()
      */
     public function setPattern($pattern)
     {
-        $this->pattern = trim($pattern);
-
-        // a route must start with a slash
-        if ('' === $this->pattern || '/' !== $this->pattern[0]) {
-            $this->pattern = '/'.$this->pattern;
-        }
-
+        // A pattern must start with a slash and must not have multiple slashes at the beginning because the
+        // generated path for this route would be confused with a network path, e.g. '//domain.com/path'.
+        $this->pattern = '/' . ltrim(trim($pattern), '/');
         $this->compiled = null;

         return $this;
@@ -179,7 +175,7 @@ public function setOption($name, $value)
      *
      * @param string $name An option name
      *
-     * @return mixed The option value
+     * @return mixed The option value or null when not given
      */
     public function getOption($name)
     {
@@ -236,7 +232,7 @@ public function addDefaults(array $defaults)
      *
      * @param string $name A variable name
      *
-     * @return mixed The default value
+     * @return mixed The default value or null when not given
      */
     public function getDefault($name)
     {
@@ -323,7 +319,7 @@ public function addRequirements(array $requirements)
      *
      * @param string $key The key
      *
-     * @return string The regex
+     * @return string|null The regex or null when not given
      */
     public function getRequirement($key)
     {
@@ -352,6 +348,8 @@ public function setRequirement($key, $regex)
      * Compiles the route.
      *
      * @return CompiledRoute A CompiledRoute instance
+     *
+     * @see RouteCompiler which is responsible for the compilation process
      */
     public function compile()
     {
@@ -371,21 +369,21 @@ public function compile()
     private function sanitizeRequirement($key, $regex)
     {
         if (!is_string($regex)) {
-            throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" must be a string', $key));
-        }
-
-        if ('' === $regex) {
-            throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty', $key));
+            throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" must be a string.', $key));
         }

-        if ('^' === $regex[0]) {
-            $regex = substr($regex, 1);
+        if ('' !== $regex && '^' === $regex[0]) {
+            $regex = (string) substr($regex, 1); // returns false for a single character
         }

         if ('$' === substr($regex, -1)) {
             $regex = substr($regex, 0, -1);
         }

+        if ('' === $regex) {
+            throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" cannot be empty.', $key));
+        }
+
         return $regex;
     }
 }
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php b/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php
index 7a0e4c9..17be00e 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php
@@ -223,25 +223,25 @@ public function addCollection(RouteCollection $collection, $prefix = '', $defaul
      */
     public function addPrefix($prefix, $defaults = array(), $requirements = array(), $options = array())
     {
-        // a prefix must not end with a slash
-        $prefix = rtrim($prefix, '/');
+        $prefix = trim(trim($prefix), '/');

         if ('' === $prefix && empty($defaults) && empty($requirements) && empty($options)) {
             return;
         }

-        // a prefix must start with a slash
-        if ('' !== $prefix && '/' !== $prefix[0]) {
-            $prefix = '/'.$prefix;
+        // a prefix must start with a single slash and must not end with a slash
+        if ('' !== $prefix) {
+            $this->prefix = '/' . $prefix . $this->prefix;
         }

-        $this->prefix = $prefix.$this->prefix;
-
         foreach ($this->routes as $route) {
             if ($route instanceof RouteCollection) {
-                $route->addPrefix($prefix, $defaults, $requirements, $options);
+                // we add the slashes so the prefix is not lost by trimming in the sub-collection
+                $route->addPrefix('/' . $prefix . '/', $defaults, $requirements, $options);
             } else {
-                $route->setPattern($prefix.$route->getPattern());
+                if ('' !== $prefix) {
+                    $route->setPattern('/' . $prefix . $route->getPattern());
+                }
                 $route->addDefaults($defaults);
                 $route->addRequirements($requirements);
                 $route->addOptions($options);
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCompiler.php b/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCompiler.php
index 5aaae19..03d3e38 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCompiler.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/RouteCompiler.php
@@ -15,55 +15,85 @@
  * RouteCompiler compiles Route instances to CompiledRoute instances.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ * @author Tobias Schultze <http://tobion.de>
  */
 class RouteCompiler implements RouteCompilerInterface
 {
     const REGEX_DELIMITER = '#';

     /**
+     * This string defines the characters that are automatically considered separators in front of
+     * optional placeholders (with default and no static text following). Such a single separator
+     * can be left out together with the optional placeholder from matching and generating URLs.
+     */
+    const SEPARATORS = '/,;.:-_~+*=@|';
+
+    /**
      * {@inheritDoc}
      *
-     * @throws \LogicException If a variable is referenced more than once
+     * @throws \LogicException  If a variable is referenced more than once
+     * @throws \DomainException If a variable name is numeric because PHP raises an error for such
+     *                          subpatterns in PCRE and thus would break matching, e.g. "(?<123>.+)".
      */
     public function compile(Route $route)
     {
         $pattern = $route->getPattern();
-        $len = strlen($pattern);
         $tokens = array();
         $variables = array();
+        $matches = array();
         $pos = 0;
-        preg_match_all('#.\{(\w+)\}#', $pattern, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
-        foreach ($matches as $match) {
-            if ($text = substr($pattern, $pos, $match[0][1] - $pos)) {
-                $tokens[] = array('text', $text);
-            }

+        // Match all variables enclosed in "{}" and iterate over them. But we only want to match the innermost variable
+        // in case of nested "{}", e.g. {foo{bar}}. This in ensured because \w does not match "{" or "}" itself.
+        preg_match_all('#\{\w+\}#', $pattern, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
+        foreach ($matches as $match) {
+            $varName = substr($match[0][0], 1, -1);
+            // get all static text preceding the current variable
+            $precedingText = substr($pattern, $pos, $match[0][1] - $pos);
             $pos = $match[0][1] + strlen($match[0][0]);
-            $var = $match[1][0];
+            $precedingChar = strlen($precedingText) > 0 ? substr($precedingText, -1) : '';
+            $isSeparator = '' !== $precedingChar && false !== strpos(static::SEPARATORS, $precedingChar);

-            if ($req = $route->getRequirement($var)) {
-                $regexp = $req;
-            } else {
-                // Use the character preceding the variable as a separator
-                $separators = array($match[0][0][0]);
-
-                if ($pos !== $len) {
-                    // Use the character following the variable as the separator when available
-                    $separators[] = $pattern[$pos];
-                }
-                $regexp = sprintf('[^%s]+', preg_quote(implode('', array_unique($separators)), self::REGEX_DELIMITER));
+            if (is_numeric($varName)) {
+                throw new \DomainException(sprintf('Variable name "%s" cannot be numeric in route pattern "%s". Please use a different name.', $varName, $pattern));
+            }
+            if (in_array($varName, $variables)) {
+                throw new \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $pattern, $varName));
             }

-            $tokens[] = array('variable', $match[0][0][0], $regexp, $var);
+            if ($isSeparator && strlen($precedingText) > 1) {
+                $tokens[] = array('text', substr($precedingText, 0, -1));
+            } elseif (!$isSeparator && strlen($precedingText) > 0) {
+                $tokens[] = array('text', $precedingText);
+            }

-            if (in_array($var, $variables)) {
-                throw new \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $route->getPattern(), $var));
+            $regexp = $route->getRequirement($varName);
+            if (null === $regexp) {
+                $followingPattern = (string) substr($pattern, $pos);
+                // Find the next static character after the variable that functions as a separator. By default, this separator and '/'
+                // are disallowed for the variable. This default requirement makes sure that optional variables can be matched at all
+                // and that the generating-matching-combination of URLs unambiguous, i.e. the params used for generating the URL are
+                // the same that will be matched. Example: new Route('/{page}.{_format}', array('_format' => 'html'))
+                // If {page} would also match the separating dot, {_format} would never match as {page} will eagerly consume everything.
+                // Also even if {_format} was not optional the requirement prevents that {page} matches something that was originally
+                // part of {_format} when generating the URL, e.g. _format = 'mobile.html'.
+                $nextSeparator = $this->findNextSeparator($followingPattern);
+                $regexp = sprintf('[^/%s]+', '/' !== $nextSeparator && '' !== $nextSeparator ? preg_quote($nextSeparator, self::REGEX_DELIMITER) : '');
+                if (('' !== $nextSeparator && !preg_match('#^\{\w+\}#', $followingPattern)) || '' === $followingPattern) {
+                    // When we have a separator, which is disallowed for the variable, we can optimize the regex with a possessive
+                    // quantifier. This prevents useless backtracking of PCRE and improves performance by 20% for matching those patterns.
+                    // Given the above example, there is no point in backtracking into {page} (that forbids the dot) when a dot must follow
+                    // after it. This optimization cannot be applied when the next char is no real separator or when the next variable is
+                    // directly adjacent, e.g. '/{x}{y}'.
+                    $regexp .= '+';
+                }
             }

-            $variables[] = $var;
+            $tokens[] = array('variable', $isSeparator ? $precedingChar : '', $regexp, $varName);
+            $variables[] = $varName;
         }

-        if ($pos < $len) {
+        if ($pos < strlen($pattern)) {
             $tokens[] = array('text', substr($pattern, $pos));
         }

@@ -93,6 +123,25 @@ public function compile(Route $route)
     }

     /**
+     * Returns the next static character in the Route pattern that will serve as a separator.
+     *
+     * @param string $pattern The route pattern
+     *
+     * @return string The next static character that functions as separator (or empty string when none available)
+     */
+    private function findNextSeparator($pattern)
+    {
+        if ('' == $pattern) {
+            // return empty string if pattern is empty or false (false which can be returned by substr)
+            return '';
+        }
+        // first remove all placeholders from the pattern so we can find the next real static character
+        $pattern = preg_replace('#\{\w+\}#', '', $pattern);
+
+        return isset($pattern[0]) && false !== strpos(static::SEPARATORS, $pattern[0]) ? $pattern[0] : '';
+    }
+
+    /**
      * Computes the regexp used to match a specific token. It can be static text or a subpattern.
      *
      * @param array   $tokens        The route tokens
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Router.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Router.php
index f617a60..90984e9 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Router.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Router.php
@@ -15,6 +15,8 @@
 use Symfony\Component\Config\ConfigCache;
 use Symfony\Component\HttpKernel\Log\LoggerInterface;
 use Symfony\Component\Routing\Generator\ConfigurableRequirementsInterface;
+use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
+use Symfony\Component\Routing\Matcher\UrlMatcherInterface;

 /**
  * The Router class is an example of the integration of all pieces of the
@@ -83,17 +85,15 @@ public function setOptions(array $options)

         // check option names and live merge, if errors are encountered Exception will be thrown
         $invalid = array();
-        $isInvalid = false;
         foreach ($options as $key => $value) {
             if (array_key_exists($key, $this->options)) {
                 $this->options[$key] = $value;
             } else {
-                $isInvalid = true;
                 $invalid[] = $key;
             }
         }

-        if ($isInvalid) {
+        if ($invalid) {
             throw new \InvalidArgumentException(sprintf('The Router does not support the following options: "%s".', implode('\', \'', $invalid)));
         }
     }
@@ -152,8 +152,12 @@ public function setContext(RequestContext $context)
     {
         $this->context = $context;

-        $this->getMatcher()->setContext($context);
-        $this->getGenerator()->setContext($context);
+        if (null !== $this->matcher) {
+            $this->getMatcher()->setContext($context);
+        }
+        if (null !== $this->generator) {
+            $this->getGenerator()->setContext($context);
+        }
     }

     /**
diff --git 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
index ea17bca..7efda77 100644
--- 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
@@ -7,21 +7,21 @@ RewriteCond %{REQUEST_URI} ^/foo/(baz|symfony)$
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foo,E=_ROUTING_bar:%1,E=_ROUTING_DEFAULTS_def:test]

 # foobar
-RewriteCond %{REQUEST_URI} ^/foo(?:/([^/]+))?$
+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/([^/]+)$
+RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$
 RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC]
 RewriteRule .* - [S=1,E=_ROUTING__allow_GET:1,E=_ROUTING__allow_HEAD:1]
-RewriteCond %{REQUEST_URI} ^/bar/([^/]+)$
+RewriteCond %{REQUEST_URI} ^/bar/([^/]++)$
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:bar,E=_ROUTING_foo:%1]

 # baragain
-RewriteCond %{REQUEST_URI} ^/baragain/([^/]+)$
+RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$
 RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)$ [NC]
 RewriteRule .* - [S=1,E=_ROUTING__allow_GET:1,E=_ROUTING__allow_POST:1,E=_ROUTING__allow_HEAD:1]
-RewriteCond %{REQUEST_URI} ^/baragain/([^/]+)$
+RewriteCond %{REQUEST_URI} ^/baragain/([^/]++)$
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baragain,E=_ROUTING_foo:%1]

 # baz
@@ -39,25 +39,25 @@ RewriteCond %{REQUEST_URI} ^/test/baz3/$
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz3]

 # baz4
-RewriteCond %{REQUEST_URI} ^/test/([^/]+)$
+RewriteCond %{REQUEST_URI} ^/test/([^/]++)$
 RewriteRule .* $0/ [QSA,L,R=301]
-RewriteCond %{REQUEST_URI} ^/test/([^/]+)/$
+RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz4,E=_ROUTING_foo:%1]

 # baz5
-RewriteCond %{REQUEST_URI} ^/test/([^/]+)/$
+RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$
 RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [NC]
 RewriteRule .* - [S=2,E=_ROUTING__allow_GET:1,E=_ROUTING__allow_HEAD:1]
-RewriteCond %{REQUEST_URI} ^/test/([^/]+)$
+RewriteCond %{REQUEST_URI} ^/test/([^/]++)$
 RewriteRule .* $0/ [QSA,L,R=301]
-RewriteCond %{REQUEST_URI} ^/test/([^/]+)/$
+RewriteCond %{REQUEST_URI} ^/test/([^/]++)/$
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz5,E=_ROUTING_foo:%1]

 # baz5unsafe
-RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]+)/$
+RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$
 RewriteCond %{REQUEST_METHOD} !^(POST)$ [NC]
 RewriteRule .* - [S=1,E=_ROUTING__allow_POST:1]
-RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]+)/$
+RewriteCond %{REQUEST_URI} ^/testunsafe/([^/]++)/$
 RewriteRule .* app.php [QSA,L,E=_ROUTING__route:baz5unsafe,E=_ROUTING_foo:%1]

 # baz6
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php
index 2558b2d..9fafa7b 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php
@@ -30,79 +30,88 @@ public function match($pathinfo)
             return array_merge($this->mergeDefaults($matches, array (  'def' => 'test',)), array('_route' => 'foo'));
         }

-        // bar
-        if (0 === strpos($pathinfo, '/bar') && preg_match('#^/bar/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
-            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
-                $allow = array_merge($allow, array('GET', 'HEAD'));
-                goto not_bar;
+        if (0 === strpos($pathinfo, '/bar')) {
+            // bar
+            if (preg_match('#^/bar/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
+                if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
+                    $allow = array_merge($allow, array('GET', 'HEAD'));
+                    goto not_bar;
+                }
+
+                $matches['_route'] = 'bar';
+
+                return $matches;
             }
+            not_bar:

-            $matches['_route'] = 'bar';
+            // barhead
+            if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
+                if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
+                    $allow = array_merge($allow, array('GET', 'HEAD'));
+                    goto not_barhead;
+                }

-            return $matches;
-        }
-        not_bar:
+                $matches['_route'] = 'barhead';

-        // barhead
-        if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
-            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
-                $allow = array_merge($allow, array('GET', 'HEAD'));
-                goto not_barhead;
+                return $matches;
             }
+            not_barhead:

-            $matches['_route'] = 'barhead';
-
-            return $matches;
         }
-        not_barhead:

-        // baz
-        if ($pathinfo === '/test/baz') {
-            return array('_route' => 'baz');
-        }
+        if (0 === strpos($pathinfo, '/test')) {
+            if (0 === strpos($pathinfo, '/test/baz')) {
+                // baz
+                if ($pathinfo === '/test/baz') {
+                    return array('_route' => 'baz');
+                }

-        // baz2
-        if ($pathinfo === '/test/baz.html') {
-            return array('_route' => 'baz2');
-        }
+                // baz2
+                if ($pathinfo === '/test/baz.html') {
+                    return array('_route' => 'baz2');
+                }

-        // baz3
-        if ($pathinfo === '/test/baz3/') {
-            return array('_route' => 'baz3');
-        }
+                // baz3
+                if ($pathinfo === '/test/baz3/') {
+                    return array('_route' => 'baz3');
+                }

-        // baz4
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?<foo>[^/]+)/$#s', $pathinfo, $matches)) {
-            $matches['_route'] = 'baz4';
+            }

-            return $matches;
-        }
+            // baz4
+            if (preg_match('#^/test/(?<foo>[^/]++)/$#s', $pathinfo, $matches)) {
+                $matches['_route'] = 'baz4';

-        // baz5
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?<foo>[^/]+)/$#s', $pathinfo, $matches)) {
-            if ($this->context->getMethod() != 'POST') {
-                $allow[] = 'POST';
-                goto not_baz5;
+                return $matches;
             }

-            $matches['_route'] = 'baz5';
+            // baz5
+            if (preg_match('#^/test/(?<foo>[^/]++)/$#s', $pathinfo, $matches)) {
+                if ($this->context->getMethod() != 'POST') {
+                    $allow[] = 'POST';
+                    goto not_baz5;
+                }

-            return $matches;
-        }
-        not_baz5:
+                $matches['_route'] = 'baz5';

-        // baz.baz6
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?<foo>[^/]+)/$#s', $pathinfo, $matches)) {
-            if ($this->context->getMethod() != 'PUT') {
-                $allow[] = 'PUT';
-                goto not_bazbaz6;
+                return $matches;
             }
+            not_baz5:
+
+            // baz.baz6
+            if (preg_match('#^/test/(?<foo>[^/]++)/$#s', $pathinfo, $matches)) {
+                if ($this->context->getMethod() != 'PUT') {
+                    $allow[] = 'PUT';
+                    goto not_bazbaz6;
+                }

-            $matches['_route'] = 'baz.baz6';
+                $matches['_route'] = 'baz.baz6';
+
+                return $matches;
+            }
+            not_bazbaz6:

-            return $matches;
         }
-        not_bazbaz6:

         // foofoo
         if ($pathinfo === '/foofoo') {
@@ -124,14 +133,14 @@ public function match($pathinfo)
         if (0 === strpos($pathinfo, '/a')) {
             if (0 === strpos($pathinfo, '/a/b\'b')) {
                 // foo1
-                if (preg_match('#^/a/b\'b/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'foo1';

                     return $matches;
                 }

                 // bar1
-                if (preg_match('#^/a/b\'b/(?<bar>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<bar>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'bar1';

                     return $matches;
@@ -148,14 +157,14 @@ public function match($pathinfo)

             if (0 === strpos($pathinfo, '/a/b\'b')) {
                 // foo2
-                if (preg_match('#^/a/b\'b/(?<foo1>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<foo1>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'foo2';

                     return $matches;
                 }

                 // bar2
-                if (preg_match('#^/a/b\'b/(?<bar1>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<bar1>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'bar2';

                     return $matches;
@@ -167,7 +176,7 @@ public function match($pathinfo)

         if (0 === strpos($pathinfo, '/multi')) {
             // helloWorld
-            if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?<who>[^/]+))?$#s', $pathinfo, $matches)) {
+            if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?<who>[^/]++))?$#s', $pathinfo, $matches)) {
                 return array_merge($this->mergeDefaults($matches, array (  'who' => 'World!',)), array('_route' => 'helloWorld'));
             }

@@ -184,32 +193,35 @@ public function match($pathinfo)
         }

         // foo3
-        if (preg_match('#^/(?<_locale>[^/]+)/b/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
+        if (preg_match('#^/(?<_locale>[^/]++)/b/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
             $matches['_route'] = 'foo3';

             return $matches;
         }

         // bar3
-        if (preg_match('#^/(?<_locale>[^/]+)/b/(?<bar>[^/]+)$#s', $pathinfo, $matches)) {
+        if (preg_match('#^/(?<_locale>[^/]++)/b/(?<bar>[^/]++)$#s', $pathinfo, $matches)) {
             $matches['_route'] = 'bar3';

             return $matches;
         }

-        // ababa
-        if ($pathinfo === '/ababa') {
-            return array('_route' => 'ababa');
-        }
+        if (0 === strpos($pathinfo, '/a')) {
+            if (0 === strpos($pathinfo, '/aba')) {
+                // ababa
+                if ($pathinfo === '/ababa') {
+                    return array('_route' => 'ababa');
+                }

-        // foo4
-        if (0 === strpos($pathinfo, '/aba') && preg_match('#^/aba/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
-            $matches['_route'] = 'foo4';
+                // foo4
+                if (preg_match('#^/aba/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
+                    $matches['_route'] = 'foo4';

-            return $matches;
-        }
+                    return $matches;
+                }
+
+            }

-        if (0 === strpos($pathinfo, '/a')) {
             // a
             if ($pathinfo === '/a/a...') {
                 return array('_route' => 'a');
@@ -217,14 +229,14 @@ public function match($pathinfo)

             if (0 === strpos($pathinfo, '/a/b')) {
                 // b
-                if (preg_match('#^/a/b/(?<var>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b/(?<var>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'b';

                     return $matches;
                 }

                 // c
-                if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?<var>[^/]+)$#s', $pathinfo, $matches)) {
+                if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?<var>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'c';

                     return $matches;
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php
index ad1476e..7dcc8cc 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php
@@ -30,87 +30,96 @@ public function match($pathinfo)
             return array_merge($this->mergeDefaults($matches, array (  'def' => 'test',)), array('_route' => 'foo'));
         }

-        // bar
-        if (0 === strpos($pathinfo, '/bar') && preg_match('#^/bar/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
-            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
-                $allow = array_merge($allow, array('GET', 'HEAD'));
-                goto not_bar;
+        if (0 === strpos($pathinfo, '/bar')) {
+            // bar
+            if (preg_match('#^/bar/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
+                if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
+                    $allow = array_merge($allow, array('GET', 'HEAD'));
+                    goto not_bar;
+                }
+
+                $matches['_route'] = 'bar';
+
+                return $matches;
             }
+            not_bar:

-            $matches['_route'] = 'bar';
+            // barhead
+            if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
+                if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
+                    $allow = array_merge($allow, array('GET', 'HEAD'));
+                    goto not_barhead;
+                }

-            return $matches;
-        }
-        not_bar:
+                $matches['_route'] = 'barhead';

-        // barhead
-        if (0 === strpos($pathinfo, '/barhead') && preg_match('#^/barhead/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
-            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
-                $allow = array_merge($allow, array('GET', 'HEAD'));
-                goto not_barhead;
+                return $matches;
             }
+            not_barhead:

-            $matches['_route'] = 'barhead';
-
-            return $matches;
         }
-        not_barhead:

-        // baz
-        if ($pathinfo === '/test/baz') {
-            return array('_route' => 'baz');
-        }
+        if (0 === strpos($pathinfo, '/test')) {
+            if (0 === strpos($pathinfo, '/test/baz')) {
+                // baz
+                if ($pathinfo === '/test/baz') {
+                    return array('_route' => 'baz');
+                }

-        // baz2
-        if ($pathinfo === '/test/baz.html') {
-            return array('_route' => 'baz2');
-        }
+                // baz2
+                if ($pathinfo === '/test/baz.html') {
+                    return array('_route' => 'baz2');
+                }

-        // baz3
-        if (rtrim($pathinfo, '/') === '/test/baz3') {
-            if (substr($pathinfo, -1) !== '/') {
-                return $this->redirect($pathinfo.'/', 'baz3');
-            }
+                // baz3
+                if (rtrim($pathinfo, '/') === '/test/baz3') {
+                    if (substr($pathinfo, -1) !== '/') {
+                        return $this->redirect($pathinfo.'/', 'baz3');
+                    }

-            return array('_route' => 'baz3');
-        }
+                    return array('_route' => 'baz3');
+                }

-        // baz4
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?<foo>[^/]+)/?$#s', $pathinfo, $matches)) {
-            if (substr($pathinfo, -1) !== '/') {
-                return $this->redirect($pathinfo.'/', 'baz4');
             }

-            $matches['_route'] = 'baz4';
+            // baz4
+            if (preg_match('#^/test/(?<foo>[^/]++)/?$#s', $pathinfo, $matches)) {
+                if (substr($pathinfo, -1) !== '/') {
+                    return $this->redirect($pathinfo.'/', 'baz4');
+                }

-            return $matches;
-        }
+                $matches['_route'] = 'baz4';

-        // baz5
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?<foo>[^/]+)/$#s', $pathinfo, $matches)) {
-            if ($this->context->getMethod() != 'POST') {
-                $allow[] = 'POST';
-                goto not_baz5;
+                return $matches;
             }

-            $matches['_route'] = 'baz5';
+            // baz5
+            if (preg_match('#^/test/(?<foo>[^/]++)/$#s', $pathinfo, $matches)) {
+                if ($this->context->getMethod() != 'POST') {
+                    $allow[] = 'POST';
+                    goto not_baz5;
+                }

-            return $matches;
-        }
-        not_baz5:
+                $matches['_route'] = 'baz5';

-        // baz.baz6
-        if (0 === strpos($pathinfo, '/test') && preg_match('#^/test/(?<foo>[^/]+)/$#s', $pathinfo, $matches)) {
-            if ($this->context->getMethod() != 'PUT') {
-                $allow[] = 'PUT';
-                goto not_bazbaz6;
+                return $matches;
             }
+            not_baz5:

-            $matches['_route'] = 'baz.baz6';
+            // baz.baz6
+            if (preg_match('#^/test/(?<foo>[^/]++)/$#s', $pathinfo, $matches)) {
+                if ($this->context->getMethod() != 'PUT') {
+                    $allow[] = 'PUT';
+                    goto not_bazbaz6;
+                }
+
+                $matches['_route'] = 'baz.baz6';
+
+                return $matches;
+            }
+            not_bazbaz6:

-            return $matches;
         }
-        not_bazbaz6:

         // foofoo
         if ($pathinfo === '/foofoo') {
@@ -132,14 +141,14 @@ public function match($pathinfo)
         if (0 === strpos($pathinfo, '/a')) {
             if (0 === strpos($pathinfo, '/a/b\'b')) {
                 // foo1
-                if (preg_match('#^/a/b\'b/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'foo1';

                     return $matches;
                 }

                 // bar1
-                if (preg_match('#^/a/b\'b/(?<bar>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<bar>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'bar1';

                     return $matches;
@@ -156,14 +165,14 @@ public function match($pathinfo)

             if (0 === strpos($pathinfo, '/a/b\'b')) {
                 // foo2
-                if (preg_match('#^/a/b\'b/(?<foo1>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<foo1>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'foo2';

                     return $matches;
                 }

                 // bar2
-                if (preg_match('#^/a/b\'b/(?<bar1>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b\'b/(?<bar1>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'bar2';

                     return $matches;
@@ -175,7 +184,7 @@ public function match($pathinfo)

         if (0 === strpos($pathinfo, '/multi')) {
             // helloWorld
-            if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?<who>[^/]+))?$#s', $pathinfo, $matches)) {
+            if (0 === strpos($pathinfo, '/multi/hello') && preg_match('#^/multi/hello(?:/(?<who>[^/]++))?$#s', $pathinfo, $matches)) {
                 return array_merge($this->mergeDefaults($matches, array (  'who' => 'World!',)), array('_route' => 'helloWorld'));
             }

@@ -196,32 +205,35 @@ public function match($pathinfo)
         }

         // foo3
-        if (preg_match('#^/(?<_locale>[^/]+)/b/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
+        if (preg_match('#^/(?<_locale>[^/]++)/b/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
             $matches['_route'] = 'foo3';

             return $matches;
         }

         // bar3
-        if (preg_match('#^/(?<_locale>[^/]+)/b/(?<bar>[^/]+)$#s', $pathinfo, $matches)) {
+        if (preg_match('#^/(?<_locale>[^/]++)/b/(?<bar>[^/]++)$#s', $pathinfo, $matches)) {
             $matches['_route'] = 'bar3';

             return $matches;
         }

-        // ababa
-        if ($pathinfo === '/ababa') {
-            return array('_route' => 'ababa');
-        }
+        if (0 === strpos($pathinfo, '/a')) {
+            if (0 === strpos($pathinfo, '/aba')) {
+                // ababa
+                if ($pathinfo === '/ababa') {
+                    return array('_route' => 'ababa');
+                }

-        // foo4
-        if (0 === strpos($pathinfo, '/aba') && preg_match('#^/aba/(?<foo>[^/]+)$#s', $pathinfo, $matches)) {
-            $matches['_route'] = 'foo4';
+                // foo4
+                if (preg_match('#^/aba/(?<foo>[^/]++)$#s', $pathinfo, $matches)) {
+                    $matches['_route'] = 'foo4';

-            return $matches;
-        }
+                    return $matches;
+                }
+
+            }

-        if (0 === strpos($pathinfo, '/a')) {
             // a
             if ($pathinfo === '/a/a...') {
                 return array('_route' => 'a');
@@ -229,14 +241,14 @@ public function match($pathinfo)

             if (0 === strpos($pathinfo, '/a/b')) {
                 // b
-                if (preg_match('#^/a/b/(?<var>[^/]+)$#s', $pathinfo, $matches)) {
+                if (preg_match('#^/a/b/(?<var>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'b';

                     return $matches;
                 }

                 // c
-                if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?<var>[^/]+)$#s', $pathinfo, $matches)) {
+                if (0 === strpos($pathinfo, '/a/b/c') && preg_match('#^/a/b/c/(?<var>[^/]++)$#s', $pathinfo, $matches)) {
                     $matches['_route'] = 'c';

                     return $matches;
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php
index 13ffeb9..a0b1320 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php
@@ -32,7 +32,7 @@ public function match($pathinfo)
             }

             // dynamic
-            if (preg_match('#^/rootprefix/(?<var>[^/]+)$#s', $pathinfo, $matches)) {
+            if (preg_match('#^/rootprefix/(?<var>[^/]++)$#s', $pathinfo, $matches)) {
                 $matches['_route'] = 'dynamic';

                 return $matches;
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
index 69c06a4..210239a 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
@@ -74,12 +74,15 @@ public function testRelativeUrlWithNullParameter()
         $this->assertEquals('/app.php/testing', $url);
     }

+    /**
+     * @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
+     */
     public function testRelativeUrlWithNullParameterButNotOptional()
     {
         $routes = $this->getRoutes('test', new Route('/testing/{foo}/bar', array('foo' => null)));
-        $url = $this->getGenerator($routes)->generate('test', array(), false);
-
-        $this->assertEquals('/app.php/testing//bar', $url);
+        // This must raise an exception because the default requirement for "foo" is "[^/]+" which is not met with these params.
+        // Generating path "/testing//bar" would be wrong as matching this route would fail.
+        $this->getGenerator($routes)->generate('test', array(), false);
     }

     public function testRelativeUrlWithOptionalZeroParameter()
@@ -90,6 +93,13 @@ public function testRelativeUrlWithOptionalZeroParameter()
         $this->assertEquals('/app.php/testing/0', $url);
     }

+    public function testNotPassedOptionalParameterInBetween()
+    {
+        $routes = $this->getRoutes('test', new Route('/{slug}/{page}', array('slug' => 'index', 'page' => 0)));
+        $this->assertSame('/app.php/index/1', $this->getGenerator($routes)->generate('test', array('page' => 1)));
+        $this->assertSame('/app.php/', $this->getGenerator($routes)->generate('test'));
+    }
+
     public function testRelativeUrlWithExtraParameters()
     {
         $routes = $this->getRoutes('test', new Route('/testing'));
@@ -138,6 +148,18 @@ public function testUrlWithGlobalParameter()
         $this->assertEquals('/app.php/testing/bar', $url);
     }

+    public function testGlobalParameterHasHigherPriorityThanDefault()
+    {
+        $routes = $this->getRoutes('test', new Route('/{_locale}', array('_locale' => 'en')));
+        $generator = $this->getGenerator($routes);
+        $context = new RequestContext('/app.php');
+        $context->setParameter('_locale', 'de');
+        $generator->setContext($context);
+        $url = $generator->generate('test', array());
+
+        $this->assertSame('/app.php/de', $url);
+    }
+
     /**
      * @expectedException Symfony\Component\Routing\Exception\RouteNotFoundException
      */
@@ -165,6 +187,15 @@ public function testGenerateForRouteWithInvalidOptionalParameter()
         $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), true);
     }

+    /**
+     * @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
+     */
+    public function testGenerateForRouteWithInvalidParameter()
+    {
+        $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => '1|2')));
+        $this->getGenerator($routes)->generate('test', array('foo' => '0'), true);
+    }
+
     public function testGenerateForRouteWithInvalidOptionalParameterNonStrict()
     {
         $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+')));
@@ -175,7 +206,7 @@ public function testGenerateForRouteWithInvalidOptionalParameterNonStrict()

     public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLogger()
     {
-        if (!class_exists('Symfony\Component\HttpKernel\Log\LoggerInterface')) {
+        if (!interface_exists('Symfony\Component\HttpKernel\Log\LoggerInterface')) {
             $this->markTestSkipped('The "HttpKernel" component is not available');
         }

@@ -188,6 +219,14 @@ public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLog
         $this->assertNull($generator->generate('test', array('foo' => 'bar'), true));
     }

+    public function testGenerateForRouteWithInvalidParameterButDisabledRequirementsCheck()
+    {
+        $routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+')));
+        $generator = $this->getGenerator($routes);
+        $generator->setStrictRequirements(null);
+        $this->assertSame('/app.php/testing/bar', $generator->generate('test', array('foo' => 'bar')));
+    }
+
     /**
      * @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
      */
@@ -196,6 +235,15 @@ public function testGenerateForRouteWithInvalidMandatoryParameter()
         $routes = $this->getRoutes('test', new Route('/testing/{foo}', array(), array('foo' => 'd+')));
         $this->getGenerator($routes)->generate('test', array('foo' => 'bar'), true);
     }
+
+    /**
+     * @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
+     */
+    public function testRequiredParamAndEmptyPassed()
+    {
+        $routes = $this->getRoutes('test', new Route('/{slug}', array(), array('slug' => '.+')));
+        $this->getGenerator($routes)->generate('test', array('slug' => ''));
+    }

     public function testSchemeRequirementDoesNothingIfSameCurrentScheme()
     {
@@ -214,6 +262,14 @@ public function testSchemeRequirementForcesAbsoluteUrl()
         $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http')));
         $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test'));
     }
+
+    public function testPathWithTwoStartingSlashes()
+    {
+        $routes = $this->getRoutes('test', new Route('//path-and-not-domain'));
+
+        // this must not generate '//path-and-not-domain' because that would be a network path
+        $this->assertSame('/path-and-not-domain', $this->getGenerator($routes, array('BaseUrl' => ''))->generate('test'));
+    }

     public function testNoTrailingSlashForMultipleOptionalParameters()
     {
@@ -229,6 +285,15 @@ public function testWithAnIntegerAsADefaultValue()
         $this->assertEquals('/app.php/foo', $this->getGenerator($routes)->generate('test', array('default' => 'foo')));
     }

+    public function testQueryParamSameAsDefault()
+    {
+        $routes = $this->getRoutes('test', new Route('/test', array('default' => 'value')));
+
+        $this->assertSame('/app.php/test?default=foo', $this->getGenerator($routes)->generate('test', array('default' => 'foo')));
+        $this->assertSame('/app.php/test?default=value', $this->getGenerator($routes)->generate('test', array('default' => 'value')));
+        $this->assertSame('/app.php/test', $this->getGenerator($routes)->generate('test'));
+    }
+
     public function testUrlEncoding()
     {
         // This tests the encoding of reserved characters that are used for delimiting of URI components (defined in RFC 3986)
@@ -255,6 +320,63 @@ public function testEncodingOfRelativePathSegments()
         $this->assertSame('/app.php/a./.a/a../..a/...', $this->getGenerator($routes)->generate('test'));
     }

+    public function testAdjacentVariables()
+    {
+        $routes = $this->getRoutes('test', new Route('/{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '\d+')));
+        $generator = $this->getGenerator($routes);
+        $this->assertSame('/app.php/foo123', $generator->generate('test', array('x' => 'foo', 'y' => '123')));
+        $this->assertSame('/app.php/foo123bar.xml', $generator->generate('test', array('x' => 'foo', 'y' => '123', 'z' => 'bar', '_format' => 'xml')));
+
+        // The default requirement for 'x' should not allow the separator '.' in this case because it would otherwise match everything
+        // and following optional variables like _format could never match.
+        $this->setExpectedException('Symfony\Component\Routing\Exception\InvalidParameterException');
+        $generator->generate('test', array('x' => 'do.t', 'y' => '123', 'z' => 'bar', '_format' => 'xml'));
+    }
+
+    public function testOptionalVariableWithNoRealSeparator()
+    {
+        $routes = $this->getRoutes('test', new Route('/get{what}', array('what' => 'All')));
+        $generator = $this->getGenerator($routes);
+
+        $this->assertSame('/app.php/get', $generator->generate('test'));
+        $this->assertSame('/app.php/getSites', $generator->generate('test', array('what' => 'Sites')));
+    }
+
+    public function testRequiredVariableWithNoRealSeparator()
+    {
+        $routes = $this->getRoutes('test', new Route('/get{what}Suffix'));
+        $generator = $this->getGenerator($routes);
+
+        $this->assertSame('/app.php/getSitesSuffix', $generator->generate('test', array('what' => 'Sites')));
+    }
+
+    public function testDefaultRequirementOfVariable()
+    {
+        $routes = $this->getRoutes('test', new Route('/{page}.{_format}'));
+        $generator = $this->getGenerator($routes);
+
+        $this->assertSame('/app.php/index.mobile.html', $generator->generate('test', array('page' => 'index', '_format' => 'mobile.html')));
+    }
+
+    /**
+     * @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
+     */
+    public function testDefaultRequirementOfVariableDisallowsSlash()
+    {
+        $routes = $this->getRoutes('test', new Route('/{page}.{_format}'));
+        $this->getGenerator($routes)->generate('test', array('page' => 'index', '_format' => 'sl/ash'));
+    }
+
+    /**
+     * @expectedException Symfony\Component\Routing\Exception\InvalidParameterException
+     */
+    public function testDefaultRequirementOfVariableDisallowsNextSeparator()
+    {
+
+        $routes = $this->getRoutes('test', new Route('/{page}.{_format}'));
+        $this->getGenerator($routes)->generate('test', array('page' => 'do.t', '_format' => 'html'));
+    }
+
     protected function getGenerator(RouteCollection $routes, array $parameters = array(), $logger = null)
     {
         $context = new RequestContext('/app.php');
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php
new file mode 100644
index 0000000..917d4b1
--- /dev/null
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php
@@ -0,0 +1,115 @@
+<?php
+
+namespace Symfony\Component\Routing\Tests\Matcher\Dumper;
+
+use Symfony\Component\Routing\Route;
+use Symfony\Component\Routing\Matcher\Dumper\DumperPrefixCollection;
+use Symfony\Component\Routing\Matcher\Dumper\DumperRoute;
+use Symfony\Component\Routing\Matcher\Dumper\DumperCollection;
+
+class DumperPrefixCollectionTest extends \PHPUnit_Framework_TestCase
+{
+    public function testAddPrefixRoute()
+    {
+        $coll = new DumperPrefixCollection;
+        $coll->setPrefix('');
+
+        $route = new DumperRoute('bar', new Route('/foo/bar'));
+        $coll = $coll->addPrefixRoute($route);
+
+        $route = new DumperRoute('bar2', new Route('/foo/bar'));
+        $coll = $coll->addPrefixRoute($route);
+
+        $route = new DumperRoute('qux', new Route('/foo/qux'));
+        $coll = $coll->addPrefixRoute($route);
+
+        $route = new DumperRoute('bar3', new Route('/foo/bar'));
+        $coll = $coll->addPrefixRoute($route);
+
+        $route = new DumperRoute('bar4', new Route(''));
+        $result = $coll->addPrefixRoute($route);
+
+        $expect = <<<'EOF'
+            |-coll /
+            | |-coll /f
+            | | |-coll /fo
+            | | | |-coll /foo
+            | | | | |-coll /foo/
+            | | | | | |-coll /foo/b
+            | | | | | | |-coll /foo/ba
+            | | | | | | | |-coll /foo/bar
+            | | | | | | | | |-route bar /foo/bar
+            | | | | | | | | |-route bar2 /foo/bar
+            | | | | | |-coll /foo/q
+            | | | | | | |-coll /foo/qu
+            | | | | | | | |-coll /foo/qux
+            | | | | | | | | |-route qux /foo/qux
+            | | | | | |-coll /foo/b
+            | | | | | | |-coll /foo/ba
+            | | | | | | | |-coll /foo/bar
+            | | | | | | | | |-route bar3 /foo/bar
+            | |-route bar4 /
+
+EOF;
+
+        $this->assertSame($expect, $this->collectionToString($result->getRoot(), '            '));
+    }
+
+    public function testMergeSlashNodes()
+    {
+        $coll = new DumperPrefixCollection;
+        $coll->setPrefix('');
+
+        $route = new DumperRoute('bar', new Route('/foo/bar'));
+        $coll = $coll->addPrefixRoute($route);
+
+        $route = new DumperRoute('bar2', new Route('/foo/bar'));
+        $coll = $coll->addPrefixRoute($route);
+
+        $route = new DumperRoute('qux', new Route('/foo/qux'));
+        $coll = $coll->addPrefixRoute($route);
+
+        $route = new DumperRoute('bar3', new Route('/foo/bar'));
+        $result = $coll->addPrefixRoute($route);
+
+        $result->getRoot()->mergeSlashNodes();
+
+        $expect = <<<'EOF'
+            |-coll /f
+            | |-coll /fo
+            | | |-coll /foo
+            | | | |-coll /foo/b
+            | | | | |-coll /foo/ba
+            | | | | | |-coll /foo/bar
+            | | | | | | |-route bar /foo/bar
+            | | | | | | |-route bar2 /foo/bar
+            | | | |-coll /foo/q
+            | | | | |-coll /foo/qu
+            | | | | | |-coll /foo/qux
+            | | | | | | |-route qux /foo/qux
+            | | | |-coll /foo/b
+            | | | | |-coll /foo/ba
+            | | | | | |-coll /foo/bar
+            | | | | | | |-route bar3 /foo/bar
+
+EOF;
+
+        $this->assertSame($expect, $this->collectionToString($result->getRoot(), '            '));
+    }
+
+    private function collectionToString(DumperCollection $collection, $prefix)
+    {
+        $string = '';
+        foreach ($collection as $route) {
+            if ($route instanceof DumperCollection) {
+                $string .= sprintf("%s|-coll %s\n", $prefix, $route->getPrefix());
+                $string .= $this->collectionToString($route, $prefix.'| ');
+            } else {
+                $string .= sprintf("%s|-route %s %s\n", $prefix, $route->getName(), $route->getRoute()->getPattern());
+            }
+        }
+
+        return $string;
+    }
+}
+
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php
index 31069b2..c5e21fb 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php
@@ -214,6 +214,15 @@ public function testMatchRegression()
         }
     }

+    public function testDefaultRequirementForOptionalVariables()
+    {
+        $coll = new RouteCollection();
+        $coll->add('test', new Route('/{page}.{_format}', array('page' => 'index', '_format' => 'html')));
+
+        $matcher = new UrlMatcher($coll, new RequestContext());
+        $this->assertEquals(array('page' => 'my-page', '_format' => 'xml', '_route' => 'test'), $matcher->match('/my-page.xml'));
+    }
+
     public function testMatchingIsEager()
     {
         $coll = new RouteCollection();
@@ -223,6 +232,83 @@ public function testMatchingIsEager()
         $this->assertEquals(array('foo' => 'text1-text2-text3', 'bar' => 'text4', '_route' => 'test'), $matcher->match('/text1-text2-text3-text4-'));
     }

+    public function testAdjacentVariables()
+    {
+        $coll = new RouteCollection();
+        $coll->add('test', new Route('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => 'y|Y')));
+
+        $matcher = new UrlMatcher($coll, new RequestContext());
+        // 'w' eagerly matches as much as possible and the other variables match the remaining chars.
+        // This also shows that the variables w-z must all exclude the separating char (the dot '.' in this case) by default requirement.
+        // Otherwise they would also consume '.xml' and _format would never match as it's an optional variable.
+        $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'Y', 'z' => 'Z','_format' => 'xml', '_route' => 'test'), $matcher->match('/wwwwwxYZ.xml'));
+        // As 'y' has custom requirement and can only be of value 'y|Y', it will leave  'ZZZ' to variable z.
+        // So with carefully chosen requirements adjacent variables, can be useful.
+        $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'ZZZ','_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxyZZZ'));
+        // z and _format are optional.
+        $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'default-z','_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxy'));
+
+        $this->setExpectedException('Symfony\Component\Routing\Exception\ResourceNotFoundException');
+        $matcher->match('/wxy.html');
+    }
+
+    public function testOptionalVariableWithNoRealSeparator()
+    {
+        $coll = new RouteCollection();
+        $coll->add('test', new Route('/get{what}', array('what' => 'All')));
+        $matcher = new UrlMatcher($coll, new RequestContext());
+
+        $this->assertEquals(array('what' => 'All', '_route' => 'test'), $matcher->match('/get'));
+        $this->assertEquals(array('what' => 'Sites', '_route' => 'test'), $matcher->match('/getSites'));
+
+        // Usually the character in front of an optional parameter can be left out, e.g. with pattern '/get/{what}' just '/get' would match.
+        // But here the 't' in 'get' is not a separating character, so it makes no sense to match without it.
+        $this->setExpectedException('Symfony\Component\Routing\Exception\ResourceNotFoundException');
+        $matcher->match('/ge');
+    }
+
+    public function testRequiredVariableWithNoRealSeparator()
+    {
+        $coll = new RouteCollection();
+        $coll->add('test', new Route('/get{what}Suffix'));
+        $matcher = new UrlMatcher($coll, new RequestContext());
+
+        $this->assertEquals(array('what' => 'Sites', '_route' => 'test'), $matcher->match('/getSitesSuffix'));
+    }
+
+    public function testDefaultRequirementOfVariable()
+    {
+        $coll = new RouteCollection();
+        $coll->add('test', new Route('/{page}.{_format}'));
+        $matcher = new UrlMatcher($coll, new RequestContext());
+
+        $this->assertEquals(array('page' => 'index', '_format' => 'mobile.html', '_route' => 'test'), $matcher->match('/index.mobile.html'));
+    }
+
+    /**
+     * @expectedException Symfony\Component\Routing\Exception\ResourceNotFoundException
+     */
+    public function testDefaultRequirementOfVariableDisallowsSlash()
+    {
+        $coll = new RouteCollection();
+        $coll->add('test', new Route('/{page}.{_format}'));
+        $matcher = new UrlMatcher($coll, new RequestContext());
+
+        $matcher->match('/index.sl/ash');
+    }
+
+    /**
+     * @expectedException Symfony\Component\Routing\Exception\ResourceNotFoundException
+     */
+    public function testDefaultRequirementOfVariableDisallowsNextSeparator()
+    {
+        $coll = new RouteCollection();
+        $coll->add('test', new Route('/{page}.{_format}', array(), array('_format' => 'html|xml')));
+        $matcher = new UrlMatcher($coll, new RequestContext());
+
+        $matcher->match('/do.t.html');
+    }
+
     /**
      * @expectedException Symfony\Component\Routing\Exception\ResourceNotFoundException
      */
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php
index 792e65d..14584e9 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php
@@ -140,14 +140,19 @@ public function testAddPrefix()
     {
         $collection = new RouteCollection();
         $collection->add('foo', $foo = new Route('/foo'));
-        $collection->add('bar', $bar = new Route('/bar'));
+        $collection2 = new RouteCollection();
+        $collection2->add('bar', $bar = new Route('/bar'));
+        $collection->addCollection($collection2);
+        $this->assertSame('', $collection->getPrefix(), '->getPrefix() is initialized with ""');
+        $collection->addPrefix(' / ');
+        $this->assertSame('', $collection->getPrefix(), '->addPrefix() trims the prefix and a single slash has no effect');
         $collection->addPrefix('/{admin}', array('admin' => 'admin'), array('admin' => '\d+'), array('foo' => 'bar'));
         $this->assertEquals('/{admin}/foo', $collection->get('foo')->getPattern(), '->addPrefix() adds a prefix to all routes');
         $this->assertEquals('/{admin}/bar', $collection->get('bar')->getPattern(), '->addPrefix() adds a prefix to all routes');
-        $this->assertEquals(array('admin' => 'admin'), $collection->get('foo')->getDefaults(), '->addPrefix() adds a prefix to all routes');
-        $this->assertEquals(array('admin' => 'admin'), $collection->get('bar')->getDefaults(), '->addPrefix() adds a prefix to all routes');
-        $this->assertEquals(array('admin' => '\d+'), $collection->get('foo')->getRequirements(), '->addPrefix() adds a prefix to all routes');
-        $this->assertEquals(array('admin' => '\d+'), $collection->get('bar')->getRequirements(), '->addPrefix() adds a prefix to all routes');
+        $this->assertEquals(array('admin' => 'admin'), $collection->get('foo')->getDefaults(), '->addPrefix() adds defaults to all routes');
+        $this->assertEquals(array('admin' => 'admin'), $collection->get('bar')->getDefaults(), '->addPrefix() adds defaults to all routes');
+        $this->assertEquals(array('admin' => '\d+'), $collection->get('foo')->getRequirements(), '->addPrefix() adds requirements to all routes');
+        $this->assertEquals(array('admin' => '\d+'), $collection->get('bar')->getRequirements(), '->addPrefix() adds requirements to all routes');
         $this->assertEquals(
             array('foo' => 'bar', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler'),
             $collection->get('foo')->getOptions(), '->addPrefix() adds an option to all routes'
@@ -158,6 +163,10 @@ public function testAddPrefix()
         );
         $collection->addPrefix('0');
         $this->assertEquals('/0/{admin}', $collection->getPrefix(), '->addPrefix() ensures a prefix must start with a slash and must not end with a slash');
+        $collection->addPrefix('/ /');
+        $this->assertSame('/ /0/{admin}', $collection->getPrefix(), '->addPrefix() can handle spaces if desired');
+        $this->assertSame('/ /0/{admin}/foo', $collection->get('foo')->getPattern(), 'the route pattern is in synch with the collection prefix');
+        $this->assertSame('/ /0/{admin}/bar', $collection->get('bar')->getPattern(), 'the route pattern in a sub-collection is in synch with the collection prefix');
     }

     public function testAddPrefixOverridesDefaultsAndRequirements()
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCompilerTest.php
index 5288ca6..1c87ca3 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCompilerTest.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCompilerTest.php
@@ -43,51 +43,58 @@ public function provideCompileData()
             array(
                 'Route with a variable',
                 array('/foo/{bar}'),
-                '/foo', '#^/foo/(?<bar>[^/]+)$#s', array('bar'), array(
-                    array('variable', '/', '[^/]+', 'bar'),
+                '/foo', '#^/foo/(?<bar>[^/]++)$#s', array('bar'), array(
+                    array('variable', '/', '[^/]++', 'bar'),
                     array('text', '/foo'),
                 )),

             array(
                 'Route with a variable that has a default value',
                 array('/foo/{bar}', array('bar' => 'bar')),
-                '/foo', '#^/foo(?:/(?<bar>[^/]+))?$#s', array('bar'), array(
-                    array('variable', '/', '[^/]+', 'bar'),
+                '/foo', '#^/foo(?:/(?<bar>[^/]++))?$#s', array('bar'), array(
+                    array('variable', '/', '[^/]++', 'bar'),
                     array('text', '/foo'),
                 )),

             array(
                 'Route with several variables',
                 array('/foo/{bar}/{foobar}'),
-                '/foo', '#^/foo/(?<bar>[^/]+)/(?<foobar>[^/]+)$#s', array('bar', 'foobar'), array(
-                    array('variable', '/', '[^/]+', 'foobar'),
-                    array('variable', '/', '[^/]+', 'bar'),
+                '/foo', '#^/foo/(?<bar>[^/]++)/(?<foobar>[^/]++)$#s', array('bar', 'foobar'), array(
+                    array('variable', '/', '[^/]++', 'foobar'),
+                    array('variable', '/', '[^/]++', 'bar'),
                     array('text', '/foo'),
                 )),

             array(
                 'Route with several variables that have default values',
                 array('/foo/{bar}/{foobar}', array('bar' => 'bar', 'foobar' => '')),
-                '/foo', '#^/foo(?:/(?<bar>[^/]+)(?:/(?<foobar>[^/]+))?)?$#s', array('bar', 'foobar'), array(
-                    array('variable', '/', '[^/]+', 'foobar'),
-                    array('variable', '/', '[^/]+', 'bar'),
+                '/foo', '#^/foo(?:/(?<bar>[^/]++)(?:/(?<foobar>[^/]++))?)?$#s', array('bar', 'foobar'), array(
+                    array('variable', '/', '[^/]++', 'foobar'),
+                    array('variable', '/', '[^/]++', 'bar'),
                     array('text', '/foo'),
                 )),

             array(
                 'Route with several variables but some of them have no default values',
                 array('/foo/{bar}/{foobar}', array('bar' => 'bar')),
-                '/foo', '#^/foo/(?<bar>[^/]+)/(?<foobar>[^/]+)$#s', array('bar', 'foobar'), array(
-                    array('variable', '/', '[^/]+', 'foobar'),
-                    array('variable', '/', '[^/]+', 'bar'),
+                '/foo', '#^/foo/(?<bar>[^/]++)/(?<foobar>[^/]++)$#s', array('bar', 'foobar'), array(
+                    array('variable', '/', '[^/]++', 'foobar'),
+                    array('variable', '/', '[^/]++', 'bar'),
                     array('text', '/foo'),
                 )),

             array(
                 'Route with an optional variable as the first segment',
                 array('/{bar}', array('bar' => 'bar')),
-                '', '#^/(?<bar>[^/]+)?$#s', array('bar'), array(
-                    array('variable', '/', '[^/]+', 'bar'),
+                '', '#^/(?<bar>[^/]++)?$#s', array('bar'), array(
+                    array('variable', '/', '[^/]++', 'bar'),
+                )),
+
+            array(
+                'Route with a requirement of 0',
+                array('/{bar}', array('bar' => null), array('bar' => '0')),
+                '', '#^/(?<bar>0)?$#s', array('bar'), array(
+                    array('variable', '/', '0', 'bar'),
                 )),

             array(
@@ -100,25 +107,45 @@ public function provideCompileData()
             array(
                 'Route with only optional variables',
                 array('/{foo}/{bar}', array('foo' => 'foo', 'bar' => 'bar')),
-                '', '#^/(?<foo>[^/]+)?(?:/(?<bar>[^/]+))?$#s', array('foo', 'bar'), array(
-                    array('variable', '/', '[^/]+', 'bar'),
-                    array('variable', '/', '[^/]+', 'foo'),
+                '', '#^/(?<foo>[^/]++)?(?:/(?<bar>[^/]++))?$#s', array('foo', 'bar'), array(
+                    array('variable', '/', '[^/]++', 'bar'),
+                    array('variable', '/', '[^/]++', 'foo'),
                 )),

             array(
                 'Route with a variable in last position',
                 array('/foo-{bar}'),
-                '/foo', '#^/foo\-(?<bar>[^\-]+)$#s', array('bar'), array(
-                array('variable', '-', '[^\-]+', 'bar'),
+                '/foo', '#^/foo\-(?<bar>[^/]++)$#s', array('bar'), array(
+                array('variable', '-', '[^/]++', 'bar'),
                 array('text', '/foo'),
             )),

             array(
+                'Route with nested placeholders',
+                array('/{static{var}static}'),
+                '/{static', '#^/\{static(?<var>[^/]+)static\}$#s', array('var'), array(
+                array('text', 'static}'),
+                array('variable', '', '[^/]+', 'var'),
+                array('text', '/{static'),
+            )),
+
+            array(
+                'Route without separator between variables',
+                array('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '(y|Y)')),
+                '', '#^/(?<w>[^/\.]+)(?<x>[^/\.]+)(?<y>(y|Y))(?:(?<z>[^/\.]++)(?:\.(?<_format>[^/]++))?)?$#s', array('w', 'x', 'y', 'z', '_format'), array(
+                array('variable', '.', '[^/]++', '_format'),
+                array('variable', '', '[^/\.]++', 'z'),
+                array('variable', '', '(y|Y)', 'y'),
+                array('variable', '', '[^/\.]+', 'x'),
+                array('variable', '/', '[^/\.]+', 'w'),
+            )),
+
+            array(
                 'Route with a format',
                 array('/foo/{bar}.{_format}'),
-                '/foo', '#^/foo/(?<bar>[^/\.]+)\.(?<_format>[^\.]+)$#s', array('bar', '_format'), array(
-                array('variable', '.', '[^\.]+', '_format'),
-                array('variable', '/', '[^/\.]+', 'bar'),
+                '/foo', '#^/foo/(?<bar>[^/\.]++)\.(?<_format>[^/]++)$#s', array('bar', '_format'), array(
+                array('variable', '.', '[^/]++', '_format'),
+                array('variable', '/', '[^/\.]++', 'bar'),
                 array('text', '/foo'),
             )),
         );
@@ -133,4 +160,23 @@ public function testRouteWithSameVariableTwice()

         $compiled = $route->compile();
     }
+
+    /**
+     * @dataProvider getNumericVariableNames
+     * @expectedException \DomainException
+     */
+    public function testRouteWithNumericVariableName($name)
+    {
+        $route = new Route('/{'. $name . '}');
+        $route->compile();
+    }
+
+    public function getNumericVariableNames()
+    {
+        return array(
+           array('09'),
+           array('123'),
+           array('1e2')
+        );
+    }
 }
diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php
index 8e46682..af5df60 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php
@@ -34,6 +34,8 @@ public function testPattern()
         $route->setPattern('bar');
         $this->assertEquals('/bar', $route->getPattern(), '->setPattern() adds a / at the beginning of the pattern if needed');
         $this->assertEquals($route, $route->setPattern(''), '->setPattern() implements a fluent interface');
+        $route->setPattern('//path');
+        $this->assertEquals('/path', $route->getPattern(), '->setPattern() does not allow two slahes "//" at the beginning of the pattern as it would be confused with a network path when generating the path from the route');
     }

     public function testOptions()
@@ -112,7 +114,10 @@ public function getInvalidRequirements()
     {
         return array(
            array(''),
-           array(array())
+           array(array()),
+           array('^$'),
+           array('^'),
+           array('$')
         );
     }

diff --git a/core/vendor/symfony/routing/Symfony/Component/Routing/composer.json b/core/vendor/symfony/routing/Symfony/Component/Routing/composer.json
index 09706a6..d3f653b 100644
--- a/core/vendor/symfony/routing/Symfony/Component/Routing/composer.json
+++ b/core/vendor/symfony/routing/Symfony/Component/Routing/composer.json
@@ -19,24 +19,24 @@
         "php": ">=5.3.3"
     },
     "require-dev": {
-        "symfony/config": "2.1.*",
-        "symfony/yaml": "2.1.*",
-        "symfony/http-kernel": "2.1.*",
+        "symfony/config": "2.2.*",
+        "symfony/yaml": "2.2.*",
+        "symfony/http-kernel": "2.2.*",
         "doctrine/common": ">=2.2,<2.4-dev"
     },
     "suggest": {
-        "symfony/config": "self.version",
-        "symfony/yaml": "self.version",
+        "symfony/config": "2.2.*",
+        "symfony/yaml": "2.2.*",
         "doctrine/common": ">=2.2,<2.4-dev"
     },
     "autoload": {
-        "psr-0": { "Symfony\\Component\\Routing": "" }
+        "psr-0": { "Symfony\\Component\\Routing\\": "" }
     },
     "target-dir": "Symfony/Component/Routing",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes b/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
index 4dfe177..8b29bbe 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
@@ -11,6 +11,7 @@

 namespace Symfony\Component\Serializer\Normalizer;

+use Symfony\Component\Serializer\Exception\InvalidArgumentException;
 use Symfony\Component\Serializer\Exception\RuntimeException;

 /**
@@ -42,12 +43,14 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
      * Set normalization callbacks
      *
      * @param array $callbacks help normalize the result
+     *
+     * @throws InvalidArgumentException if a non-callable callback is set
      */
     public function setCallbacks(array $callbacks)
     {
         foreach ($callbacks as $attribute => $callback) {
             if (!is_callable($callback)) {
-                throw new \InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute));
+                throw new InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute));
             }
         }
         $this->callbacks = $callbacks;
@@ -176,7 +179,8 @@ private function supports($class)
     /**
      * Checks if a method's name is get.* and can be called without parameters.
      *
-     * @param ReflectionMethod $method the method to check
+     * @param \ReflectionMethod $method the method to check
+     *
      * @return Boolean whether the method is a getter.
      */
     private function isGetMethod(\ReflectionMethod $method)
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/composer.json b/core/vendor/symfony/serializer/Symfony/Component/Serializer/composer.json
index 1c8feb3..cff1e49 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/composer.json
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/composer.json
@@ -19,13 +19,13 @@
         "php": ">=5.3.3"
     },
     "autoload": {
-        "psr-0": { "Symfony\\Component\\Serializer": "" }
+        "psr-0": { "Symfony\\Component\\Serializer\\": "" }
     },
     "target-dir": "Symfony/Component/Serializer",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/.gitattributes b/core/vendor/symfony/yaml/Symfony/Component/Yaml/.gitattributes
new file mode 100644
index 0000000..e742c9b
--- /dev/null
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/.gitattributes
@@ -0,0 +1,2 @@
+Tests/ export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Escaper.php b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Escaper.php
index fe9f33f..f77545d 100644
--- 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.
-    private static $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");
-    private static $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",
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php
index 53952ce..9b3e6de 100644
--- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php
@@ -18,6 +18,6 @@
  *
  * @api
  */
-class DumpException extends \RuntimeException implements ExceptionInterface
+class DumpException extends RuntimeException
 {
 }
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php
index 975fe6d..a27a005 100644
--- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php
@@ -18,7 +18,7 @@
  *
  * @api
  */
-class ParseException extends \RuntimeException implements ExceptionInterface
+class ParseException extends RuntimeException
 {
     private $parsedFile;
     private $parsedLine;
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/RuntimeException.php b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/RuntimeException.php
new file mode 100644
index 0000000..3573bf1
--- /dev/null
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/RuntimeException.php
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Yaml\Exception;
+
+/**
+ * Exception class thrown when an error occurs during parsing.
+ *
+ * @author Romain Neutron <imprec@gmail.com>
+ *
+ * @api
+ */
+class RuntimeException extends \RuntimeException implements ExceptionInterface
+{
+}
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php
index f28d89b..d09227b 100644
--- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php
@@ -608,11 +608,11 @@ private function isNextLineUnIndentedCollection()
     }

     /**
-     * Returns true if the string is unindented collection item
+     * Returns true if the string is un-indented collection item
      *
-     * @return Boolean Returns true if the string is unindented collection item, false otherwise
+     * @return Boolean Returns true if the string is un-indented collection item, false otherwise
      */
-    private function isStringUnIndentedCollectionItem($string)
+    private function isStringUnIndentedCollectionItem()
     {
         return (0 === strpos($this->currentLine, '- '));
     }
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml
index 7f17ed5..09bf86e 100644
--- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/Fixtures/escapedCharacters.yml
@@ -137,3 +137,11 @@ yaml: |
     \x41 \u0041 \U00000041"
 php: |
     "Fun with \x5C\n\x22 \x07 \x08 \x1B \x0C\n\x0A \x0D \x09 \x0B \x00\n\x20 \xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9\nA A A"
+---
+test: Double quotes with a line feed
+yaml: |
+   { double: "some value\n \"some quoted string\" and 'some single quotes one'" }
+php: |
+    array(
+        'double' => "some value\n \"some quoted string\" and 'some single quotes one'"
+    )
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php
index ac3a576..708f2a1 100644
--- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php
@@ -130,7 +130,7 @@ public function unescapeCharacter($value)
      *
      * @return string The string with the new encoding
      *
-     * @throws \RuntimeException if no suitable encoding function is found (iconv or mbstring)
+     * @throws RuntimeException if no suitable encoding function is found (iconv or mbstring)
      */
     private function convertEncoding($value, $to, $from)
     {
@@ -140,6 +140,6 @@ private function convertEncoding($value, $to, $from)
             return iconv($from, $to, $value);
         }

-        throw new \RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).');
+        throw new RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).');
     }
 }
diff --git a/core/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json b/core/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json
index 88460ce..e04dabf 100644
--- a/core/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json
+++ b/core/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json
@@ -19,13 +19,13 @@
         "php": ">=5.3.3"
     },
     "autoload": {
-        "psr-0": { "Symfony\\Component\\Yaml": "" }
+        "psr-0": { "Symfony\\Component\\Yaml\\": "" }
     },
     "target-dir": "Symfony/Component/Yaml",
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "2.1-dev"
+            "dev-master": "2.2-dev"
         }
     }
 }
diff --git a/core/vendor/twig/twig/.gitignore b/core/vendor/twig/twig/.gitignore
new file mode 100644
index 0000000..840b78e
--- /dev/null
+++ b/core/vendor/twig/twig/.gitignore
@@ -0,0 +1,2 @@
+/ext/twig/autom4te.cache/
+
diff --git a/core/vendor/twig/twig/CHANGELOG b/core/vendor/twig/twig/CHANGELOG
index fd38774..c48d4fe 100644
--- a/core/vendor/twig/twig/CHANGELOG
+++ b/core/vendor/twig/twig/CHANGELOG
@@ -1,3 +1,55 @@
+* 1.11.0 (2012-11-07)
+
+ * fixed macro compilation when a variable name is a PHP reserved keyword
+ * changed the date filter behavior to always apply the default timezone, except if false is passed as the timezone
+ * fixed bitwise operator precedences
+ * added the template_from_string function
+ * fixed default timezone usage for the date function
+ * optimized the way Twig exceptions are managed (to make them faster)
+ * added Twig_ExistsLoaderInterface (implementing this interface in your loader make the chain loader much faster)
+
+* 1.10.3 (2012-10-19)
+
+ * fixed wrong template location in some error messages
+ * reverted a BC break introduced in 1.10.2
+ * added a split filter
+
+* 1.10.2 (2012-10-15)
+
+ * fixed macro calls on PHP 5.4
+
+* 1.10.1 (2012-10-15)
+
+ * made a speed optimization to macro calls when imported via the "import" tag
+ * fixed C extension compilation on Windows
+ * fixed a segfault in the C extension when using DateTime objects
+
+* 1.10.0 (2012-09-28)
+
+ * extracted functional tests framework to make it reusable for third-party extensions
+ * added namespaced templates support in Twig_Loader_Filesystem
+ * added Twig_Loader_Filesystem::prependPath()
+ * fixed an error when a token parser pass a closure as a test to the subparse() method
+
+* 1.9.2 (2012-08-25)
+
+ * fixed the in operator for objects that contain circular references
+ * fixed the C extension when accessing a public property of an object implementing the \ArrayAccess interface
+
+* 1.9.1 (2012-07-22)
+
+ * optimized macro calls when auto-escaping is on
+ * fixed wrong parent class for Twig_Function_Node
+ * made Twig_Loader_Chain more explicit about problems
+
+* 1.9.0 (2012-07-13)
+
+ * made the parsing independent of the template loaders
+ * fixed exception trace when an error occurs when rendering a child template
+ * added escaping strategies for CSS, URL, and HTML attributes
+ * fixed nested embed tag calls
+ * added the date_modify filter
+
 * 1.8.3 (2012-06-17)

  * fixed paths in the filesystem loader when passing a path that ends with a slash or a backslash
diff --git a/core/vendor/twig/twig/composer.json b/core/vendor/twig/twig/composer.json
index 9ca80fc..3bbc5ca 100644
--- a/core/vendor/twig/twig/composer.json
+++ b/core/vendor/twig/twig/composer.json
@@ -25,7 +25,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-master": "1.8-dev"
+            "dev-master": "1.11-dev"
         }
     }
 }
diff --git a/core/vendor/twig/twig/doc/advanced.rst b/core/vendor/twig/twig/doc/advanced.rst
index 0b33bea..4be84ed 100644
--- a/core/vendor/twig/twig/doc/advanced.rst
+++ b/core/vendor/twig/twig/doc/advanced.rst
@@ -61,7 +61,8 @@ Now, let's use a ``lipsum`` *filter*:

 Again, it works, but it looks weird. A filter transforms the passed value to
 something else but here we use the value to indicate the number of words to
-generate.
+generate (so, ``40`` is an argument of the filter, not the value we want to
+transform).

 Next, let's use a ``lipsum`` *function*:

@@ -243,8 +244,10 @@ case, set the ``is_safe`` option::

     $filter = new Twig_Filter_Function('nl2br', array('is_safe' => array('html')));

-Some filters may have to work on already escaped or safe values. In such a
-case, set the ``pre_escape`` option::
+Some filters may need to work on input that is already escaped or safe, for
+example when adding (safe) html tags to originally unsafe output. In such a
+case, set the ``pre_escape`` option to escape the input data before it is run
+through your filter::

     $filter = new Twig_Filter_Function('somefilter', array('pre_escape' => 'html', 'is_safe' => array('html')));

@@ -829,5 +832,59 @@ The ``getTests()`` methods allows to add new test functions::
         // ...
     }

+Testing an Extension
+--------------------
+
+.. versionadded:: 1.10
+    Support for functional tests was added in Twig 1.10.
+
+Functional Tests
+~~~~~~~~~~~~~~~~
+
+You can create functional tests for extensions simply by creating the
+following file structure in your test directory::
+
+    Fixtures/
+        filters/
+            foo.test
+            bar.test
+        functions/
+            foo.test
+            bar.test
+        tags/
+            foo.test
+            bar.test
+    IntegrationTest.php
+
+The ``IntegrationTest.php`` file should look like this::
+
+    class Project_Tests_IntegrationTest extends Twig_Test_IntegrationTestCase
+    {
+        public function getExtensions()
+        {
+            return array(
+                new Project_Twig_Extension1(),
+                new Project_Twig_Extension2(),
+            );
+        }
+
+        public function getFixturesDir()
+        {
+            return dirname(__FILE__).'/Fixtures/';
+        }
+    }
+
+Fixtures examples can be found within the Twig repository
+`tests/Twig/Fixtures`_ directory.
+
+Node Tests
+~~~~~~~~~~
+
+Testing the node visitors can be complex, so extend your test cases from
+``Twig_Test_NodeTestCase``. Examples can be found in the Twig repository
+`tests/Twig/Node`_ directory.
+
 .. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
-.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
+.. _`rot13`:                   http://www.php.net/manual/en/function.str-rot13.php
+.. _`tests/Twig/Fixtures`:     https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Fixtures
+.. _`tests/Twig/Node`:         https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Node
diff --git a/core/vendor/twig/twig/doc/api.rst b/core/vendor/twig/twig/doc/api.rst
index a462066..fbcc8bc 100644
--- a/core/vendor/twig/twig/doc/api.rst
+++ b/core/vendor/twig/twig/doc/api.rst
@@ -96,10 +96,11 @@ The following options are available:

 * ``autoescape``: If set to ``true``, auto-escaping will be enabled by default
   for all templates (default to ``true``). As of Twig 1.8, you can set the
-  escaping strategy to use (``html``, ``js``, ``false`` to disable, or a PHP
-  callback that takes the template "filename" and must return the escaping
-  strategy to use -- the callback cannot be a function name to avoid collision
-  with built-in escaping strategies).
+  escaping strategy to use (``html``, ``js``, ``false`` to disable).
+  As of Twig 1.9, you can set the escaping strategy to use (``css``, ``url``,
+  ``html_attr``, or a PHP callback that takes the template "filename" and must
+  return the escaping strategy to use -- the callback cannot be a function name
+  to avoid collision with built-in escaping strategies).

 * ``optimizations``: A flag that indicates which optimizations to apply
   (default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
@@ -125,30 +126,76 @@ Built-in Loaders

 Here is a list of the built-in loaders Twig provides:

-* ``Twig_Loader_Filesystem``: Loads templates from the file system. This
-  loader can find templates in folders on the file system and is the preferred
-  way to load them::
+``Twig_Loader_Filesystem``
+..........................

-        $loader = new Twig_Loader_Filesystem($templateDir);
+.. versionadded:: 1.10
+    The ``prependPath()`` and support for namespaces were added in Twig 1.10.

-  It can also look for templates in an array of directories::
+``Twig_Loader_Filesystem`` loads templates from the file system. This loader
+can find templates in folders on the file system and is the preferred way to
+load them::

-        $loader = new Twig_Loader_Filesystem(array($templateDir1, $templateDir2));
+    $loader = new Twig_Loader_Filesystem($templateDir);

-  With such a configuration, Twig will first look for templates in
-  ``$templateDir1`` and if they do not exist, it will fallback to look for
-  them in the ``$templateDir2``.
+It can also look for templates in an array of directories::

-* ``Twig_Loader_String``: Loads templates from a string. It's a dummy loader
-  as you pass it the source code directly::
+    $loader = new Twig_Loader_Filesystem(array($templateDir1, $templateDir2));

-        $loader = new Twig_Loader_String();
+With such a configuration, Twig will first look for templates in
+``$templateDir1`` and if they do not exist, it will fallback to look for them
+in the ``$templateDir2``.

-* ``Twig_Loader_Array``: Loads a template from a PHP array. It's passed an
-  array of strings bound to template names. This loader is useful for unit
-  testing::
+You can add or prepend paths via the ``addPath()`` and ``prependPath()``
+methods::

-        $loader = new Twig_Loader_Array($templates);
+    $loader->addPath($templateDir3);
+    $loader->prependPath($templateDir4);
+
+The filesystem loader also supports namespaced templates. This allows to group
+your templates under different namespaces which have their own template paths.
+
+When using the ``setPaths()``, ``addPath()``, and ``prependPath()`` methods,
+specify the namespace as the second argument (when not specified, these
+methods act on the "main" namespace)::
+
+    $loader->addPath($templateDir, 'admin');
+
+Namespaced templates can be accessed via the special
+``@namespace_name/template_path`` notation::
+
+    $twig->render('@admin/index.html', array());
+
+``Twig_Loader_String``
+......................
+
+``Twig_Loader_String`` loads templates from strings. It's a dummy loader as
+the template reference is the template source code::
+
+    $loader = new Twig_Loader_String();
+    $twig = new Twig_Environment($loader);
+
+    echo $twig->render('Hello {{ name }}!', array('name' => 'Fabien'));
+
+This loader should only be used for unit testing as it has severe limitations:
+several tags, like ``extends`` or ``include`` do not make sense to use as the
+reference to the template is the template source code itself.
+
+``Twig_Loader_Array``
+.....................
+
+``Twig_Loader_Array`` loads a template from a PHP array. It's passed an array
+of strings bound to template names::
+
+    $loader = new Twig_Loader_Array(array(
+        'index.html' => 'Hello {{ name }}!',
+    ));
+    $twig = new Twig_Environment($loader);
+
+    echo $twig->render('index.html', array('name' => 'Fabien'));
+
+This loader is very useful for unit testing. It can also be used for small
+projects where storing all templates in a single PHP file might make sense.

 .. tip::

@@ -158,6 +205,35 @@ Here is a list of the built-in loaders Twig provides:
     don't want to see your cache grows out of control, you need to take care
     of clearing the old cache file by yourself.

+``Twig_Loader_Chain``
+.....................
+
+``Twig_Loader_Chain`` delegates the loading of templates to other loaders::
+
+    $loader1 = new Twig_Loader_Array(array(
+        'base.html' => '{% block content %}{% endblock %}',
+    ));
+    $loader2 = new Twig_Loader_Array(array(
+        'index.html' => '{% extends "base.twig" %}{% block content %}Hello {{ name }}{% endblock %}',
+        'base.html'  => 'Will never be loaded',
+    ));
+
+    $loader = new Twig_Loader_Chain(array($loader1, $loader2));
+
+    $twig = new Twig_Environment($loader);
+
+When looking for a template, Twig will try each loader in turn and it will
+return as soon as the template is found. When rendering the ``index.html``
+template from the above example, Twig will load it with ``$loader2`` but the
+``base.html`` template will be loaded from ``$loader1``.
+
+``Twig_Loader_Chain`` accepts any loader that implements
+``Twig_LoaderInterface``.
+
+.. note::
+
+    You can also add loaders via the ``addLoader()`` method.
+
 Create your own Loader
 ~~~~~~~~~~~~~~~~~~~~~~

@@ -215,6 +291,11 @@ As an example, here is how the built-in ``Twig_Loader_String`` reads::
 The ``isFresh()`` method must return ``true`` if the current cached template
 is still fresh, given the last modification time, or ``false`` otherwise.

+.. tip::
+
+    As of Twig 1.11.0, you can also implement ``Twig_ExistsLoaderInterface``
+    to make your loader faster when used with the chain loader.
+
 Using Extensions
 ----------------

@@ -269,6 +350,13 @@ The ``core`` extension defines all the core features of Twig:
   * ``from``
   * ``set``
   * ``spaceless``
+  * ``autoescape``
+  * ``do``
+  * ``embed``
+  * ``flush``
+  * ``raw``
+  * ``sandbox``
+  * ``use``

 * Filters:

@@ -291,6 +379,14 @@ The ``core`` extension defines all the core features of Twig:
   * ``keys``
   * ``escape``
   * ``e``
+  * ``abs``
+  * ``convert_encoding``
+  * ``date_modify``
+  * ``nl2br``
+  * ``number_format``
+  * ``raw``
+  * ``slice``
+  * ``trim``

 * Functions:

@@ -299,6 +395,10 @@ The ``core`` extension defines all the core features of Twig:
   * ``cycle``
   * ``parent``
   * ``block``
+  * ``attribute``
+  * ``date``
+  * ``dump``
+  * ``random``

 * Tests:

@@ -310,6 +410,7 @@ The ``core`` extension defines all the core features of Twig:
   * ``divisibleby``
   * ``constant``
   * ``empty``
+  * ``iterable``

 Escaper Extension
 ~~~~~~~~~~~~~~~~~
@@ -395,10 +496,10 @@ The escaping rules are implemented as follows:

   .. code-block:: jinja

-        {% autoescape true js %}
-        {{ var|escape('html') }} {# will be escaped for html and javascript #}
-        {{ var }} {# will be escaped for javascript #}
-        {{ var|escape('js') }} {# won't be double-escaped #}
+        {% autoescape 'js' %}
+            {{ var|escape('html') }} {# will be escaped for html and javascript #}
+            {{ var }} {# will be escaped for javascript #}
+            {{ var|escape('js') }} {# won't be double-escaped #}
         {% endautoescape %}

 .. note::
diff --git a/core/vendor/twig/twig/doc/filters/date.rst b/core/vendor/twig/twig/doc/filters/date.rst
index 9833f03..39ad732 100644
--- a/core/vendor/twig/twig/doc/filters/date.rst
+++ b/core/vendor/twig/twig/doc/filters/date.rst
@@ -10,6 +10,9 @@
 .. versionadded:: 1.6.1
     The default timezone support has been added in Twig 1.6.1.

+.. versionadded:: 1.11.0
+    The introduction of the false value for the timezone was introduced in Twig 1.11.0
+
 The ``date`` filter formats a date to a given format:

 .. code-block:: jinja
@@ -17,24 +20,27 @@ The ``date`` filter formats a date to a given format:
     {{ post.published_at|date("m/d/Y") }}

 The ``date`` filter accepts strings (it must be in a format supported by the
-`date`_ function), `DateTime`_ instances, or `DateInterval`_ instances. For
+`strtotime`_ function), `DateTime`_ instances, or `DateInterval`_ instances. For
 instance, to display the current date, filter the word "now":

 .. code-block:: jinja

     {{ "now"|date("m/d/Y") }}

-To escape words and characters in the date format use ``\\`` in front of each character:
+To escape words and characters in the date format use ``\\`` in front of each
+character:

 .. code-block:: jinja

     {{ post.published_at|date("F jS \\a\\t g:ia") }}

-You can also specify a timezone:
+If the value passed to the ``date`` filter is ``null``, it will return the
+current date by default. If an empty string is desired instead of the current
+date, use a ternary operator:

 .. code-block:: jinja

-    {{ post.published_at|date("m/d/Y", "Europe/Paris") }}
+    {{ post.published_at is empty ? "" : post.published_at|date("m/d/Y") }}

 If no format is provided, Twig will use the default one: ``F j, Y H:i``. This
 default can be easily changed by calling the ``setDateFormat()`` method on the
@@ -46,6 +52,24 @@ dates and the second one is the default format for date intervals:
     $twig = new Twig_Environment($loader);
     $twig->getExtension('core')->setDateFormat('d/m/Y', '%d days');

+Timezone
+--------
+
+By default, the date is displayed by applying the default timezone (the one
+specified in php.ini or declared in Twig -- see below), but you can override
+it by explicitly specifying a timezone:
+
+.. code-block:: jinja
+
+    {{ post.published_at|date("m/d/Y", "Europe/Paris") }}
+
+If the date is already a DateTime object, and if you want to keep its current
+timezone, pass ``false`` as the timezone value:
+
+.. code-block:: jinja
+
+    {{ post.published_at|date("m/d/Y", false) }}
+
 The default timezone can also be set globally by calling ``setTimezone()``:

 .. code-block:: php
@@ -53,13 +77,6 @@ The default timezone can also be set globally by calling ``setTimezone()``:
     $twig = new Twig_Environment($loader);
     $twig->getExtension('core')->setTimezone('Europe/Paris');

-.. _`date`:         http://www.php.net/date
+.. _`strtotime`:    http://www.php.net/strtotime
 .. _`DateTime`:     http://www.php.net/DateTime
 .. _`DateInterval`: http://www.php.net/DateInterval
-
-If the value passed to the ``date`` filter is null, it will return the current date by default.
-If an empty string is desired instead of the current date, use a ternary operator:
-
-.. code-block:: jinja
-
-    {{ post.published_at is empty ? "" : post.published_at|date("m/d/Y") }}
diff --git a/core/vendor/twig/twig/doc/filters/date_modify.rst b/core/vendor/twig/twig/doc/filters/date_modify.rst
new file mode 100644
index 0000000..ae12c52
--- /dev/null
+++ b/core/vendor/twig/twig/doc/filters/date_modify.rst
@@ -0,0 +1,18 @@
+``date_modify``
+===============
+
+.. versionadded:: 1.9.0
+    The date_modify filter has been added in Twig 1.9.0.
+
+The ``date_modify`` filter modifies a date with a given modifier string:
+
+.. code-block:: jinja
+
+    {{ post.published_at|date_modify("+1 day")|date("m/d/Y") }}
+
+The ``date_modify`` filter accepts strings (it must be in a format supported
+by the `strtotime`_ function) or `DateTime`_ instances. You can easily combine
+it with the :doc:`date<date>` filter for formatting.
+
+.. _`strtotime`: http://www.php.net/strtotime
+.. _`DateTime`:  http://www.php.net/DateTime
diff --git a/core/vendor/twig/twig/doc/filters/escape.rst b/core/vendor/twig/twig/doc/filters/escape.rst
index 5142977..ddb2bbb 100644
--- a/core/vendor/twig/twig/doc/filters/escape.rst
+++ b/core/vendor/twig/twig/doc/filters/escape.rst
@@ -1,9 +1,15 @@
 ``escape``
 ==========

-The ``escape`` filter converts the characters ``&``, ``<``, ``>``, ``'``, and
-``"`` in strings to HTML-safe sequences. Use this if you need to display text
-that might contain such characters in HTML:
+.. versionadded:: 1.9.0
+    The ``css``, ``url``, and ``html_attr`` strategies were added in Twig
+    1.9.0.
+
+The ``escape`` filter escapes a string for safe insertion into the final
+output. It supports different escaping strategies depending on the template
+context.
+
+By default, it uses the HTML escaping strategy:

 .. code-block:: jinja

@@ -31,9 +37,51 @@ And here is how to escape variables included in JavaScript code:
     {{ user.username|escape('js') }}
     {{ user.username|e('js') }}

+The ``escape`` filter supports the following escaping strategies:
+
+* ``html``: escapes a string for the **HTML body** context.
+
+* ``js``: escapes a string for the **JavaScript context**.
+
+* ``css``: escapes a string for the **CSS context**. CSS escaping can be
+  applied to any string being inserted into CSS and escapes everything except
+  alphanumerics.
+
+* ``url``: escapes a string for the **URI or parameter contexts**. This should
+  not be used to escape an entire URI; only a subcomponent being inserted.
+
+* ``html_attr``: escapes a string for the **HTML attribute** context.
+
 .. note::

     Internally, ``escape`` uses the PHP native `htmlspecialchars`_ function
     for the HTML escaping strategy.

+.. caution::
+
+    When using automatic escaping, Twig tries to not double-escape a variable
+    when the automatic escaping strategy is the same as the one applied by the
+    escape filter; but that does not work when using a variable as the
+    escaping strategy:
+
+    .. code-block:: jinja
+
+        {% set strategy = 'html' %}
+
+        {% autoescape 'html' %}
+            {{ var|escape('html') }}   {# won't be double-escaped #}
+            {{ var|escape(strategy) }} {# will be double-escaped #}
+        {% endautoescape %}
+
+    When using a variable as the escaping strategy, you should disable
+    automatic escaping::
+
+    .. code-block:: jinja
+
+        {% set strategy = 'html' %}
+
+        {% autoescape 'html' %}
+            {{ var|escape(strategy)|raw }} {# won't be double-escaped #}
+        {% endautoescape %}
+
 .. _`htmlspecialchars`: http://php.net/htmlspecialchars
diff --git a/core/vendor/twig/twig/doc/filters/index.rst b/core/vendor/twig/twig/doc/filters/index.rst
index bd8f495..e29e3ae 100644
--- a/core/vendor/twig/twig/doc/filters/index.rst
+++ b/core/vendor/twig/twig/doc/filters/index.rst
@@ -5,6 +5,7 @@ Filters
     :maxdepth: 1

     date
+    date_modify
     format
     replace
     number_format
@@ -18,7 +19,9 @@ Filters
     lower
     striptags
     join
+    split
     reverse
+    abs
     length
     sort
     default
diff --git a/core/vendor/twig/twig/doc/filters/number_format.rst b/core/vendor/twig/twig/doc/filters/number_format.rst
index ccc8f2f..b591b1e 100644
--- a/core/vendor/twig/twig/doc/filters/number_format.rst
+++ b/core/vendor/twig/twig/doc/filters/number_format.rst
@@ -16,7 +16,7 @@ separator using the additional arguments:

 .. code-block:: jinja

-    {{ 9800.333|number_format(2, ',', '.') }}
+    {{ 9800.333|number_format(2, '.', ',') }}

 If no formatting options are provided then Twig will use the default formatting
 options of:
@@ -30,7 +30,7 @@ These defaults can be easily changed through the core extension:
 .. code-block:: php

     $twig = new Twig_Environment($loader);
-    $twig->getExtension('core')->setNumberFormat(3, ',', '.');
+    $twig->getExtension('core')->setNumberFormat(3, '.', ',');

 The defaults set for ``number_format`` can be over-ridden upon each call using the
 additional parameters.
diff --git a/core/vendor/twig/twig/doc/filters/split.rst b/core/vendor/twig/twig/doc/filters/split.rst
new file mode 100644
index 0000000..9b9e4e6
--- /dev/null
+++ b/core/vendor/twig/twig/doc/filters/split.rst
@@ -0,0 +1,47 @@
+``split``
+=========
+
+.. versionadded:: 1.10.3
+    The split filter was added in Twig 1.10.3.
+
+The ``split`` filter splits a string by the given delimiter and returns a list
+of strings:
+
+.. code-block:: jinja
+
+    {{ "one,two,three"|split(',') }}
+    {# returns ['one', 'two', 'three'] #}
+
+You can also pass a ``limit`` argument:
+
+ * If ``limit`` is positive, the returned array will contain a maximum of
+   limit elements with the last element containing the rest of string;
+
+ * If ``limit`` is negative, all components except the last -limit are
+   returned;
+
+ * If ``limit`` is zero, then this is treated as 1.
+
+.. code-block:: jinja
+
+    {{ "one,two,three,four,five"|split(',', 3) }}
+    {# returns [one, two, "three,four,five"] #}
+
+If the ``delimiter`` is an empty string, then value will be split by equal
+chunks. Length is set by the ``limit`` argument (one character by default).
+
+.. code-block:: jinja
+
+    {{ "123"|split('') }}
+    {# returns [1, 2, 3] #}
+
+    {{ "aabbcc"|split('', 2) }}
+    {# returns [aa, bb, cc] #}
+
+.. note::
+
+    Internally, Twig uses the PHP `explode`_ or `str_split`_ (if delimiter is
+    empty) functions for string splitting.
+
+.. _`explode`:   http://php.net/explode
+.. _`str_split`: http://php.net/str_split
diff --git a/core/vendor/twig/twig/doc/functions/index.rst b/core/vendor/twig/twig/doc/functions/index.rst
index 3315528..4d9a003 100644
--- a/core/vendor/twig/twig/doc/functions/index.rst
+++ b/core/vendor/twig/twig/doc/functions/index.rst
@@ -13,3 +13,4 @@ Functions
     parent
     dump
     date
+    template_from_string
diff --git a/core/vendor/twig/twig/doc/functions/template_from_string.rst b/core/vendor/twig/twig/doc/functions/template_from_string.rst
new file mode 100644
index 0000000..6936167
--- /dev/null
+++ b/core/vendor/twig/twig/doc/functions/template_from_string.rst
@@ -0,0 +1,27 @@
+``template_from_string``
+========================
+
+.. versionadded:: 1.11
+    The template_from_string function was added in Twig 1.11.
+
+The ``template_from_string`` function loads a template from a string:
+
+.. code-block:: jinja
+
+    {% include template_from_string("Hello {{ name }}") }}
+    {% include template_from_string(page.template) }}
+
+.. note::
+
+    The ``template_from_string`` function is not available by default. You
+    must add the ``Twig_Extension_StringLoader`` extension explicitly when
+    creating your Twig environment::
+
+        $twig = new Twig_Environment(...);
+        $twig->addExtension(new Twig_Extension_StringLoader());
+
+.. note::
+
+    Even if you will probably always use the ``template_from_string`` function
+    with the ``include`` tag, you can use it with any tag or function that
+    takes a template as an argument (like the ``embed`` or ``extends`` tags).
diff --git a/core/vendor/twig/twig/doc/intro.rst b/core/vendor/twig/twig/doc/intro.rst
index f9dc226..69ffe64 100644
--- a/core/vendor/twig/twig/doc/intro.rst
+++ b/core/vendor/twig/twig/doc/intro.rst
@@ -127,6 +127,11 @@ The first step to use Twig is to register its autoloader::
 Replace the ``/path/to/lib/`` path with the path you used for Twig
 installation.

+If you have installed Twig via Composer you can take advantage of Composer's
+autoload mechanism by replacing the previous snippet for::
+
+    require_once '/path/to/vendor/autoload.php'
+
 .. note::

     Twig follows the PEAR convention names for its classes, which means you
diff --git a/core/vendor/twig/twig/doc/recipes.rst b/core/vendor/twig/twig/doc/recipes.rst
index 59a6dfb..6ece40d 100644
--- a/core/vendor/twig/twig/doc/recipes.rst
+++ b/core/vendor/twig/twig/doc/recipes.rst
@@ -328,35 +328,147 @@ you have some dynamic JavaScript files thanks to the ``autoescape`` tag:

 .. code-block:: jinja

-    {% autoescape js %}
+    {% autoescape 'js' %}
         ... some JS ...
     {% endautoescape %}

 But if you have many HTML and JS files, and if your template names follow some
 conventions, you can instead determine the default escaping strategy to use
 based on the template name. Let's say that your template names always ends
-with ``.html`` for HTML files and ``.js`` for JavaScript ones, here is how you
-can configure Twig::
+with ``.html`` for HTML files, ``.js`` for JavaScript ones, and ``.css`` for
+stylesheets, here is how you can configure Twig::

-    function twig_escaping_guesser($filename)
+    class TwigEscapingGuesser
     {
-        // get the format
-        $format = substr($filename, strrpos($filename, '.') + 1);
-
-        switch ($format) {
-            'js':
-                return 'js';
-            default:
-                return 'html';
+        function guess($filename)
+        {
+            // get the format
+            $format = substr($filename, strrpos($filename, '.') + 1);
+
+            switch ($format) {
+                case 'js':
+                    return 'js';
+                case 'css':
+                    return 'css';
+                case 'html':
+                default:
+                    return 'html';
+            }
         }
     }

     $loader = new Twig_Loader_Filesystem('/path/to/templates');
     $twig = new Twig_Environment($loader, array(
-        'autoescape' => 'twig_escaping_guesser',
+        'autoescape' => array(new TwigEscapingGuesser(), 'guess'),
     ));

 This dynamic strategy does not incur any overhead at runtime as auto-escaping
 is done at compilation time.

+Using a Database to store Templates
+-----------------------------------
+
+If you are developing a CMS, templates are usually stored in a database. This
+recipe gives you a simple PDO template loader you can use as a starting point
+for your own.
+
+First, let's create a temporary in-memory SQLite3 database to work with::
+
+    $dbh = new PDO('sqlite::memory:');
+    $dbh->exec('CREATE TABLE templates (name STRING, source STRING, last_modified INTEGER)');
+    $base = '{% block content %}{% endblock %}';
+    $index = '
+    {% extends "base.twig" %}
+    {% block content %}Hello {{ name }}{% endblock %}
+    ';
+    $now = time();
+    $dbh->exec("INSERT INTO templates (name, source, last_modified) VALUES ('base.twig', '$base', $now)");
+    $dbh->exec("INSERT INTO templates (name, source, last_modified) VALUES ('index.twig', '$index', $now)");
+
+We have created a simple ``templates`` table that hosts two templates:
+``base.twig`` and ``index.twig``.
+
+Now, let's define a loader able to use this database::
+
+    class DatabaseTwigLoader implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
+    {
+        protected $dbh;
+
+        public function __construct(PDO $dbh)
+        {
+            $this->dbh = $dbh;
+        }
+
+        public function getSource($name)
+        {
+            if (false === $source = $this->getValue('source', $name)) {
+                throw new Twig_Error_Loader(sprintf('Template "%s" does not exist.', $name));
+            }
+
+            return $source;
+        }
+
+        // Twig_ExistsLoaderInterface as of Twig 1.11
+        public function exists($name)
+        {
+            return $name === $this->getValue('name', $name);
+        }
+
+        public function getCacheKey($name)
+        {
+            return $name;
+        }
+
+        public function isFresh($name, $time)
+        {
+            if (false === $lastModified = $this->getValue('last_modified', $name)) {
+                return false;
+            }
+
+            return $lastModified <= $time;
+        }
+
+        protected function getValue($column, $name)
+        {
+            $sth = $this->dbh->prepare('SELECT '.$column.' FROM templates WHERE name = :name');
+            $sth->execute(array(':name' => (string) $name));
+
+            return $sth->fetchColumn();
+        }
+    }
+
+Finally, here is an example on how you can use it::
+
+    $loader = new DatabaseTwigLoader($dbh);
+    $twig = new Twig_Environment($loader);
+
+    echo $twig->render('index.twig', array('name' => 'Fabien'));
+
+Using different Template Sources
+--------------------------------
+
+This recipe is the continuation of the previous one. Even if you store the
+contributed templates in a database, you might want to keep the original/base
+templates on the filesystem. When templates can be loaded from different
+sources, you need to use the ``Twig_Loader_Chain`` loader.
+
+As you can see in the previous recipe, we reference the template in the exact
+same way as we would have done it with a regular filesystem loader. This is
+the key to be able to mix and match templates coming from the database, the
+filesystem, or any other loader for that matter: the template name should be a
+logical name, and not the path from the filesystem::
+
+    $loader1 = new DatabaseTwigLoader($dbh);
+    $loader2 = new Twig_Loader_Array(array(
+        'base.twig' => '{% block content %}{% endblock %}',
+    ));
+    $loader = new Twig_Loader_Chain(array($loader1, $loader2));
+
+    $twig = new Twig_Environment($loader);
+
+    echo $twig->render('index.twig', array('name' => 'Fabien'));
+
+Now that the ``base.twig`` templates is defined in an array loader, you can
+remove it from the database, and everything else will still work as before.
+
 .. _callback: http://www.php.net/manual/en/function.is-callable.php
diff --git a/core/vendor/twig/twig/doc/tags/extends.rst b/core/vendor/twig/twig/doc/tags/extends.rst
index 8d64436..f995a5d 100644
--- a/core/vendor/twig/twig/doc/tags/extends.rst
+++ b/core/vendor/twig/twig/doc/tags/extends.rst
@@ -33,8 +33,10 @@ skeleton document:
     </html>

 In this example, the :doc:`block<block>` tags define four blocks that child
-templates can fill in. All the ``block`` tag does is to tell the template
-engine that a child template may override those portions of the template.
+templates can fill in.
+
+All the ``block`` tag does is to tell the template engine that a child
+template may override those portions of the template.

 Child Template
 --------------
@@ -184,4 +186,83 @@ In this example, the template will extend the "minimum.html" layout template
 if the ``standalone`` variable evaluates to ``true``, and "base.html"
 otherwise.

+How blocks work?
+----------------
+
+A block provides a way to change how a certain part of a template is rendered
+but it does not interfere in any way with the logic around it.
+
+Let's take the following example to illustrate how a block work and more
+importantly, how it does not work:
+
+.. code-block:: jinja
+
+    {# base.twig #}
+
+    {% for post in posts %}
+        {% block post %}
+            <h1>{{ post.title }}</h1>
+            <p>{{ post.body }}</p>
+        {% endblock %}
+    {% endfor %}
+
+If you render this template, the result would be exactly the same with or
+without the ``block`` tag. The ``block`` inside the ``for`` loop is just a way
+to make it overridable by a child template:
+
+.. code-block:: jinja
+
+    {# child.twig #}
+
+    {% extends "base.twig" %}
+
+    {% block post %}
+        <article>
+            <header>{{ post.title }}</header>
+            <section>{{ post.text }}</section>
+        </article>
+    {% endblock %}
+
+Now, when rendering the child template, the loop is going to use the block
+defined in the child template instead of the one defined in the base one; the
+executed template is then equivalent to the following one:
+
+.. code-block:: jinja
+
+    {% for post in posts %}
+        <article>
+            <header>{{ post.title }}</header>
+            <section>{{ post.text }}</section>
+        </article>
+    {% endfor %}
+
+Let's take another example: a block included within an ``if`` statement:
+
+.. code-block:: jinja
+
+    {% if posts is empty %}
+        {% block head %}
+            {{ parent() }}
+
+            <meta name="robots" content="noindex, follow">
+        {% endblock head %}
+    {% endif %}
+
+Contrary to what you might think, this template does not define a block
+conditionally; it just makes overridable by a child template the output of
+what will be rendered when the condition is ``true``.
+
+If you want the output to be displayed conditionally, use the following
+instead:
+
+.. code-block:: jinja
+
+    {% block head %}
+        {{ parent() }}
+
+        {% if posts is empty %}
+            <meta name="robots" content="noindex, follow">
+        {% endif %}
+    {% endblock head %}
+
 .. seealso:: :doc:`block<../functions/block>`, :doc:`block<../tags/block>`, :doc:`parent<../functions/parent>`, :doc:`use<../tags/use>`
diff --git a/core/vendor/twig/twig/doc/tags/import.rst b/core/vendor/twig/twig/doc/tags/import.rst
index 8d47b36..f6bf718 100644
--- a/core/vendor/twig/twig/doc/tags/import.rst
+++ b/core/vendor/twig/twig/doc/tags/import.rst
@@ -49,31 +49,9 @@ namespace:
     </dl>
     <p>{{ textarea('comment') }}</p>

-Importing is not needed if the macros and the template are defined in the same
-file; use the special ``_self`` variable instead:
+.. tip::

-.. code-block:: jinja
-
-    {# index.html template #}
-
-    {% macro textarea(name, value, rows) %}
-        <textarea name="{{ name }}" rows="{{ rows|default(10) }}" cols="{{ cols|default(40) }}">{{ value|e }}</textarea>
-    {% endmacro %}
-
-    <p>{{ _self.textarea('comment') }}</p>
-
-But you can still create an alias by importing from the ``_self`` variable:
-
-.. code-block:: jinja
-
-    {# index.html template #}
-
-    {% macro textarea(name, value, rows) %}
-        <textarea name="{{ name }}" rows="{{ rows|default(10) }}" cols="{{ cols|default(40) }}">{{ value|e }}</textarea>
-    {% endmacro %}
-
-    {% import _self as forms %}
-
-    <p>{{ forms.textarea('comment') }}</p>
+    To import macros from the current file, use the special ``_self`` variable
+    for the source.

 .. seealso:: :doc:`macro<../tags/macro>`, :doc:`from<../tags/from>`
diff --git a/core/vendor/twig/twig/doc/tags/macro.rst b/core/vendor/twig/twig/doc/tags/macro.rst
index 3d920e3..155f7fe 100644
--- a/core/vendor/twig/twig/doc/tags/macro.rst
+++ b/core/vendor/twig/twig/doc/tags/macro.rst
@@ -48,41 +48,33 @@ The macro can then be called at will:
     <p>{{ forms.input('password', null, 'password') }}</p>

 If macros are defined and used in the same template, you can use the
-special ``_self`` variable, without importing them:
+special ``_self`` variable to import them:

 .. code-block:: jinja

-    <p>{{ _self.input('username') }}</p>
+    {% import _self as forms %}

-When you want to use a macro in another one from the same file, use the ``_self``
-variable:
+    <p>{{ forms.input('username') }}</p>

-.. code-block:: jinja
+.. warning::

-    {% macro input(name, value, type, size) %}
-      <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
-    {% endmacro %}
+    When you define a macro in the template where you are going to use it, you
+    might be tempted to call the macro directly via ``_self.input()`` instead
+    of importing it; even if seems to work, this is just a side-effect of the
+    current implementation and it won't work anymore in Twig 2.x.

-    {% macro wrapped_input(name, value, type, size) %}
-        <div class="field">
-            {{ _self.input(name, value, type, size) }}
-        </div>
-    {% endmacro %}
-
-When the macro is defined in another file, you need to import it:
+When you want to use a macro in another macro from the same file, you need to
+import it locally:

 .. code-block:: jinja

-    {# forms.html #}
-
     {% macro input(name, value, type, size) %}
-      <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
+        <input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
     {% endmacro %}

-    {# shortcuts.html #}
-
     {% macro wrapped_input(name, value, type, size) %}
-        {% import "forms.html" as forms %}
+        {% import _self as forms %}
+
         <div class="field">
             {{ forms.input(name, value, type, size) }}
         </div>
diff --git a/core/vendor/twig/twig/doc/tags/sandbox.rst b/core/vendor/twig/twig/doc/tags/sandbox.rst
index 0275537..e186726 100644
--- a/core/vendor/twig/twig/doc/tags/sandbox.rst
+++ b/core/vendor/twig/twig/doc/tags/sandbox.rst
@@ -19,7 +19,7 @@ template, when sandboxing is not enabled globally for the Twig environment:

     The ``sandbox`` tag can only be used to sandbox an include tag and it
     cannot be used to sandbox a section of a template. The following example
-    won't work for example:
+    won't work:

     .. code-block:: jinja

diff --git a/core/vendor/twig/twig/doc/templates.rst b/core/vendor/twig/twig/doc/templates.rst
index 278e56d..104dcad 100644
--- a/core/vendor/twig/twig/doc/templates.rst
+++ b/core/vendor/twig/twig/doc/templates.rst
@@ -48,14 +48,15 @@ Many IDEs support syntax highlighting and auto-completion for Twig:

 * *Textmate* via the `Twig bundle`_
 * *Vim* via the `Jinja syntax plugin`_
-* *Netbeans* via the `Twig syntax plugin`_
+* *Netbeans* via the `Twig syntax plugin`_ (until 7.1, native as of 7.2)
 * *PhpStorm* (native as of 2.1)
 * *Eclipse* via the `Twig plugin`_
 * *Sublime Text* via the `Twig bundle`_
 * *GtkSourceView* via the `Twig language definition`_ (used by gedit and other projects)
 * *Coda* and *SubEthaEdit* via the `Twig syntax mode`_
 * *Coda 2* via the `other Twig syntax mode`_
-* *Komodo* and *Komodo Edit* via the Django highlight/syntax check mode
+* *Komodo* and *Komodo Edit* via the Twig highlight/syntax check mode
+* *Notepad++* via the `Notepad++ Twig Highlighter`_

 Variables
 ---------
@@ -74,6 +75,15 @@ properties of a PHP object, or items of a PHP array), or the so-called
     {{ foo.bar }}
     {{ foo['bar'] }}

+When the attribute contains special characters (like ``-`` that would be
+interpreted as the minus operator), use the ``attribute`` function instead to
+access the variable attribute:
+
+.. code-block:: jinja
+
+    {# equivalent to the non-working foo.data-foo #}
+    {{ attribute(foo, 'data-foo') }}
+
 .. note::

     It's important to know that the curly braces are *not* part of the
@@ -317,7 +327,7 @@ A child template might look like this:
     {% block content %}
         <h1>Index</h1>
         <p class="important">
-            Welcome on my awesome homepage.
+            Welcome to my awesome homepage.
         </p>
     {% endblock %}

@@ -371,16 +381,24 @@ Twig supports both, automatic escaping is enabled by default.
 Working with Manual Escaping
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-If manual escaping is enabled it's **your** responsibility to escape variables
-if needed. What to escape? If you have a variable that *may* include any of
-the following chars (``>``, ``<``, ``&``, or ``"``) you **have to** escape it
-unless the variable contains well-formed and trusted HTML. Escaping works by
-piping the variable through the :doc:`escape<filters/escape>` or ``e`` filter:
+If manual escaping is enabled, it is **your** responsibility to escape
+variables if needed. What to escape? Any variable you don't trust.
+
+Escaping works by piping the variable through the
+:doc:`escape<filters/escape>` or ``e`` filter:

 .. code-block:: jinja

     {{ user.username|e }}
+
+By default, the ``escape`` filter uses the ``html`` strategy, but depending on
+the escaping context, you might want to explicitly use any other available
+strategies:
+
     {{ user.username|e('js') }}
+    {{ user.username|e('css') }}
+    {{ user.username|e('url') }}
+    {{ user.username|e('html_attr') }}

 Working with Automatic Escaping
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -391,8 +409,18 @@ tag:

 .. code-block:: jinja

-    {% autoescape true %}
-        Everything will be automatically escaped in this block
+    {% autoescape %}
+        Everything will be automatically escaped in this block (using the HTML strategy)
+    {% endautoescape %}
+
+By default, auto-escaping uses the ``html`` escaping strategy. If you output
+variables in other contexts, you need to explicitly escape them with the
+appropriate escaping strategy:
+
+.. code-block:: jinja
+
+    {% autoescape 'js' %}
+        Everything will be automatically escaped in this block (using the JS strategy)
     {% endautoescape %}

 Escaping
@@ -514,6 +542,11 @@ Arrays and hashes can be nested:

     {% set foo = [1, {"foo": "bar"}] %}

+.. tip::
+
+    Using double-quoted or single-quoted strings has no impact on performance
+    but string interpolation is only supported in double-quoted strings.
+
 Math
 ~~~~

@@ -523,7 +556,7 @@ but exists for completeness' sake. The following operators are supported:
 * ``+``: Adds two objects together (the operands are casted to numbers). ``{{
   1 + 1 }}`` is ``2``.

-* ``-``: Substracts the second number from the first one. ``{{ 3 - 2 }}`` is
+* ``-``: Subtracts the second number from the first one. ``{{ 3 - 2 }}`` is
   ``1``.

 * ``/``: Divides two numbers. The returned value will be a floating point
@@ -650,8 +683,8 @@ String Interpolation
     String interpolation was added in Twig 1.5.

 String interpolation (`#{expression}`) allows any valid expression to appear
-within a string. The result of evaluating that expression is inserted into the
-string:
+within a *double-quoted string*. The result of evaluating that expression is
+inserted into the string:

 .. code-block:: jinja

@@ -717,11 +750,12 @@ If you are looking for new tags, filters, or functions, have a look at the Twig
 If you want to create your own, read the :ref:`Creating an
 Extension<creating_extensions>` chapter.

-.. _`Twig bundle`:              https://github.com/Anomareh/PHP-Twig.tmbundle
-.. _`Jinja syntax plugin`:      http://jinja.pocoo.org/2/documentation/integration
-.. _`Twig syntax plugin`:       http://plugins.netbeans.org/plugin/37069/php-twig
-.. _`Twig plugin`:              https://github.com/pulse00/Twig-Eclipse-Plugin
-.. _`Twig language definition`: https://github.com/gabrielcorpse/gedit-twig-template-language
-.. _`extension repository`:     http://github.com/fabpot/Twig-extensions
-.. _`Twig syntax mode`:         https://github.com/bobthecow/Twig-HTML.mode
-.. _`other Twig syntax mode`:   https://github.com/muxx/Twig-HTML.mode
+.. _`Twig bundle`:                https://github.com/Anomareh/PHP-Twig.tmbundle
+.. _`Jinja syntax plugin`:        http://jinja.pocoo.org/2/documentation/integration
+.. _`Twig syntax plugin`:         http://plugins.netbeans.org/plugin/37069/php-twig
+.. _`Twig plugin`:                https://github.com/pulse00/Twig-Eclipse-Plugin
+.. _`Twig language definition`:   https://github.com/gabrielcorpse/gedit-twig-template-language
+.. _`extension repository`:       http://github.com/fabpot/Twig-extensions
+.. _`Twig syntax mode`:           https://github.com/bobthecow/Twig-HTML.mode
+.. _`other Twig syntax mode`:     https://github.com/muxx/Twig-HTML.mode
+.. _`Notepad++ Twig Highlighter`: https://github.com/Banane9/notepadplusplus-twig
diff --git a/core/vendor/twig/twig/doc/tests/empty.rst b/core/vendor/twig/twig/doc/tests/empty.rst
index 0d1eb32..e5b5599 100644
--- a/core/vendor/twig/twig/doc/tests/empty.rst
+++ b/core/vendor/twig/twig/doc/tests/empty.rst
@@ -5,7 +5,7 @@

 .. code-block:: jinja

-    {# evaluates to true if the foo variable is null, false, or the empty string #}
+    {# evaluates to true if the foo variable is null, false, an empty array, or the empty string #}
     {% if foo is empty %}
         ...
     {% endif %}
diff --git a/core/vendor/twig/twig/ext/twig/php_twig.h b/core/vendor/twig/twig/ext/twig/php_twig.h
index 13a0fc0..756bd92 100644
--- a/core/vendor/twig/twig/ext/twig/php_twig.h
+++ b/core/vendor/twig/twig/ext/twig/php_twig.h
@@ -15,35 +15,17 @@
 #ifndef PHP_TWIG_H
 #define PHP_TWIG_H

-#define PHP_TWIG_VERSION "1.8.3"
+#define PHP_TWIG_VERSION "1.11.0"

 #include "php.h"

 extern zend_module_entry twig_module_entry;
 #define phpext_twig_ptr &twig_module_entry

-#ifdef PHP_WIN32
-#define PHP_TWIG_API __declspec(dllexport)
-#else
-#define PHP_TWIG_API
-#endif
-
 #ifdef ZTS
 #include "TSRM.h"
 #endif

 PHP_FUNCTION(twig_template_get_attributes);

-PHP_MINIT_FUNCTION(twig);
-PHP_MSHUTDOWN_FUNCTION(twig);
-PHP_RINIT_FUNCTION(twig);
-PHP_RSHUTDOWN_FUNCTION(twig);
-PHP_MINFO_FUNCTION(twig);
-
-#ifdef ZTS
-#define TWIG_G(v) TSRMG(twig_globals_id, zend_twig_globals *, v)
-#else
-#define TWIG_G(v) (twig_globals.v)
-#endif
-
 #endif
diff --git a/core/vendor/twig/twig/ext/twig/twig.c b/core/vendor/twig/twig/ext/twig/twig.c
index 880b964..ef8cecb 100644
--- a/core/vendor/twig/twig/ext/twig/twig.c
+++ b/core/vendor/twig/twig/ext/twig/twig.c
@@ -17,8 +17,6 @@
 #endif

 #include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
 #include "php_twig.h"
 #include "ext/standard/php_string.h"
 #include "ext/standard/php_smart_str.h"
@@ -31,6 +29,20 @@
 #define Z_ADDREF_P(pz)                (pz)->refcount++
 #endif

+#define FREE_DTOR(z) 	\
+	zval_dtor(z); 		\
+	efree(z);
+
+#if PHP_VERSION_ID >= 50300
+	#define APPLY_TSRMLS_DC TSRMLS_DC
+	#define APPLY_TSRMLS_CC TSRMLS_CC
+	#define APPLY_TSRMLS_FETCH()
+#else
+	#define APPLY_TSRMLS_DC
+	#define APPLY_TSRMLS_CC
+	#define APPLY_TSRMLS_FETCH() TSRMLS_FETCH()
+#endif
+
 ZEND_BEGIN_ARG_INFO_EX(twig_template_get_attribute_args, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 6)
 	ZEND_ARG_INFO(0, template)
 	ZEND_ARG_INFO(0, object)
@@ -47,19 +59,15 @@ zend_function_entry twig_functions[] = {


 zend_module_entry twig_module_entry = {
-#if ZEND_MODULE_API_NO >= 20010901
 	STANDARD_MODULE_HEADER,
-#endif
 	"twig",
 	twig_functions,
-	PHP_MINIT(twig),
-	PHP_MSHUTDOWN(twig),
-	PHP_RINIT(twig),
-	PHP_RSHUTDOWN(twig),
-	PHP_MINFO(twig),
-#if ZEND_MODULE_API_NO >= 20010901
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
 	PHP_TWIG_VERSION,
-#endif
 	STANDARD_MODULE_PROPERTIES
 };

@@ -68,50 +76,6 @@ zend_module_entry twig_module_entry = {
 ZEND_GET_MODULE(twig)
 #endif

-PHP_INI_BEGIN()
-PHP_INI_END()
-
-PHP_MINIT_FUNCTION(twig)
-{
-	REGISTER_INI_ENTRIES();
-
-	return SUCCESS;
-}
-
-
-PHP_MSHUTDOWN_FUNCTION(twig)
-{
-	UNREGISTER_INI_ENTRIES();
-
-	return SUCCESS;
-}
-
-
-
-PHP_RINIT_FUNCTION(twig)
-{
-	return SUCCESS;
-}
-
-
-
-PHP_RSHUTDOWN_FUNCTION(twig)
-{
-	return SUCCESS;
-}
-
-
-PHP_MINFO_FUNCTION(twig)
-{
-	php_info_print_table_start();
-	php_info_print_table_header(2, "Twig support", "enabled");
-	php_info_print_table_row(2, "Version", PHP_TWIG_VERSION);
-	php_info_print_table_end();
-
-	DISPLAY_INI_ENTRIES();
-
-}
-
 int TWIG_ARRAY_KEY_EXISTS(zval *array, char* key, int key_len)
 {
 	if (Z_TYPE_P(array) != IS_ARRAY) {
@@ -236,16 +200,14 @@ zval *TWIG_CALL_USER_FUNC_ARRAY(zval *object, char *function, zval *arguments TS
 	fci.no_separation = 0;

 	if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) {
-		zval_dtor(zfunction);
-		efree(zfunction);
+		FREE_DTOR(zfunction)
 		zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", zend_get_class_entry(object TSRMLS_CC)->name, function TSRMLS_CC);
 	}

 	if (args) {
 		efree(fci.params);
 	}
-	zval_dtor(zfunction);
-	efree(zfunction);
+	FREE_DTOR(zfunction);
 	return retval_ptr;
 }

@@ -315,8 +277,7 @@ zval *TWIG_GET_ARRAY_ELEMENT(zval *class, char *prop_name, int prop_name_length
 		ALLOC_INIT_ZVAL(tmp_name_zval);
 		ZVAL_STRING(tmp_name_zval, prop_name, 1);
 		tmp_ret_zval = TWIG_GET_ARRAYOBJECT_ELEMENT(class, tmp_name_zval TSRMLS_CC);
-		zval_dtor(tmp_name_zval);
-		efree(tmp_name_zval);
+		FREE_DTOR(tmp_name_zval);
 		return tmp_ret_zval;
 	}

@@ -328,22 +289,8 @@ zval *TWIG_GET_ARRAY_ELEMENT(zval *class, char *prop_name, int prop_name_length

 zval *TWIG_PROPERTY(zval *object, zval *propname TSRMLS_DC)
 {
-	char *prot_name;
-	int prot_name_length;
 	zval *tmp = NULL;

-	tmp = TWIG_GET_ARRAY_ELEMENT(object, Z_STRVAL_P(propname), Z_STRLEN_P(propname) TSRMLS_CC);
-	if (tmp) {
-		return tmp;
-	}
-
-	zend_mangle_property_name(&prot_name, &prot_name_length, "*", 1, Z_STRVAL_P(propname), Z_STRLEN_P(propname), 0);
-	tmp = TWIG_GET_ARRAY_ELEMENT(object, prot_name, prot_name_length TSRMLS_CC);
-	efree(prot_name);
-	if (tmp) {
-		return tmp;
-	}
-
 	if (Z_OBJ_HT_P(object)->read_property) {
 #if PHP_VERSION_ID >= 50400
 		tmp = Z_OBJ_HT_P(object)->read_property(object, propname, BP_VAR_IS, NULL TSRMLS_CC);
@@ -371,6 +318,19 @@ int TWIG_HAS_PROPERTY(zval *object, zval *propname TSRMLS_DC)
 	return 0;
 }

+int TWIG_HAS_DYNAMIC_PROPERTY(zval *object, char *prop, int prop_len TSRMLS_DC)
+{
+	if (Z_OBJ_HT_P(object)->get_properties) {
+		return zend_hash_quick_exists(
+				Z_OBJ_HT_P(object)->get_properties(object TSRMLS_CC), // the properties hash
+				prop,                                                 // property name
+				prop_len + 1,                                         // property length
+				zend_get_hash_value(prop, prop_len + 1)               // hash value
+			);
+	}
+	return 0;
+}
+
 zval *TWIG_PROPERTY_CHAR(zval *object, char *propname TSRMLS_DC)
 {
 	zval *tmp_name_zval, *tmp;
@@ -378,8 +338,7 @@ zval *TWIG_PROPERTY_CHAR(zval *object, char *propname TSRMLS_DC)
 	ALLOC_INIT_ZVAL(tmp_name_zval);
 	ZVAL_STRING(tmp_name_zval, propname, 1);
 	tmp = TWIG_PROPERTY(object, tmp_name_zval TSRMLS_CC);
-	zval_dtor(tmp_name_zval);
-	efree(tmp_name_zval);
+	FREE_DTOR(tmp_name_zval);
 	return tmp;
 }

@@ -417,13 +376,12 @@ zval *TWIG_CALL_S(zval *object, char *method, char *arg0 TSRMLS_DC)
 	fci.no_separation = 0;

 	if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) {
-		zval_dtor(argument);
+		FREE_DTOR(zfunction);
+		zval_ptr_dtor(&argument);
 		return 0;
 	}
-	zval_dtor(zfunction);
-	efree(zfunction);
-	zval_dtor(argument);
-	efree(argument);
+	FREE_DTOR(zfunction);
+	zval_ptr_dtor(&argument);
 	return retval_ptr;
 }

@@ -469,16 +427,14 @@ int TWIG_CALL_Z(zval *object, char *method, zval *arg1 TSRMLS_DC)
 	fci.no_separation = 0;

 	if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) {
-		zval_dtor(zfunction);
-		efree(zfunction);
+		FREE_DTOR(zfunction);
 		if (retval_ptr) {
 			zval_ptr_dtor(&retval_ptr);
 		}
 		return 0;
 	}

-	zval_dtor(zfunction);
-	efree(zfunction);
+	FREE_DTOR(zfunction);

 	success = (retval_ptr && (Z_TYPE_P(retval_ptr) == IS_BOOL) && Z_LVAL_P(retval_ptr));
 	if (retval_ptr) {
@@ -516,11 +472,11 @@ int TWIG_CALL_ZZ(zval *object, char *method, zval *arg1, zval *arg2 TSRMLS_DC)
 	fci.no_separation = 0;

 	if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) {
-		zval_dtor(zfunction);
+		FREE_DTOR(zfunction);
 		return 0;
 	}

-	zval_dtor(zfunction);
+	FREE_DTOR(zfunction);

 	success = (retval_ptr && (Z_TYPE_P(retval_ptr) == IS_BOOL) && Z_LVAL_P(retval_ptr));
 	if (retval_ptr) {
@@ -551,7 +507,7 @@ void TWIG_NEW(zval *object, char *class, zval *arg0, zval *arg1 TSRMLS_DC)
 	TWIG_CALL_ZZ(object, "__construct", arg0, arg1 TSRMLS_CC);
 }

-static int twig_add_array_key_to_string(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
+static int twig_add_array_key_to_string(void *pDest APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
 {
 	smart_str *buf;
 	char *joiner;
@@ -584,7 +540,7 @@ char *TWIG_IMPLODE_ARRAY_KEYS(char *joiner, zval *array TSRMLS_DC)
 	smart_str collector = { 0, 0, 0 };

 	smart_str_appendl(&collector, "", 0);
-	zend_hash_apply_with_arguments(HASH_OF(array) TSRMLS_CC, twig_add_array_key_to_string, 2, &collector, joiner);
+	zend_hash_apply_with_arguments(HASH_OF(array) APPLY_TSRMLS_CC, twig_add_array_key_to_string, 2, &collector, joiner);
 	smart_str_0(&collector);

 	return collector.c;
@@ -596,8 +552,7 @@ static void TWIG_THROW_EXCEPTION(char *exception_name TSRMLS_DC, char *message,
 	va_list args;
 	zend_class_entry **pce;

-	if (zend_lookup_class(exception_name, strlen(exception_name), &pce TSRMLS_CC) == FAILURE)
-	{
+	if (zend_lookup_class(exception_name, strlen(exception_name), &pce TSRMLS_CC) == FAILURE) {
 		return;
 	}

@@ -606,9 +561,67 @@ static void TWIG_THROW_EXCEPTION(char *exception_name TSRMLS_DC, char *message,
 	va_end(args);

 	zend_throw_exception_ex(*pce, 0 TSRMLS_CC, buffer);
+	efree(buffer);
+}
+
+static void TWIG_RUNTIME_ERROR(zval *template TSRMLS_DC, char *message, ...)
+{
+	char *buffer;
+	va_list args;
+	zend_class_entry **pce;
+	zval *ex;
+	zval *constructor;
+	zval *zmessage;
+	zval *lineno;
+	zval *filename_func;
+	zval *filename;
+	zval *constructor_args[3];
+	zval *constructor_retval;
+
+	if (zend_lookup_class("Twig_Error_Runtime", strlen("Twig_Error_Runtime"), &pce TSRMLS_CC) == FAILURE) {
+		return;
+	}
+
+	va_start(args, message);
+	vspprintf(&buffer, 0, message, args);
+	va_end(args);
+
+	MAKE_STD_ZVAL(ex);
+	object_init_ex(ex, *pce);
+
+	// Call Twig_Error constructor
+	MAKE_STD_ZVAL(constructor);
+	MAKE_STD_ZVAL(zmessage);
+	MAKE_STD_ZVAL(lineno);
+	MAKE_STD_ZVAL(filename);
+	MAKE_STD_ZVAL(filename_func);
+	MAKE_STD_ZVAL(constructor_retval);
+
+	ZVAL_STRINGL(constructor, "__construct", sizeof("__construct")-1, 1);
+	ZVAL_STRING(zmessage, buffer, 1);
+	ZVAL_LONG(lineno, -1);
+
+	// Get template filename
+	ZVAL_STRINGL(filename_func, "getTemplateName", sizeof("getTemplateName")-1, 1);
+	call_user_function(EG(function_table), &template, filename_func, filename, 0, 0 TSRMLS_CC);
+
+	constructor_args[0] = zmessage;
+	constructor_args[1] = lineno;
+	constructor_args[2] = filename;
+	call_user_function(EG(function_table), &ex, constructor, constructor_retval, 3, constructor_args TSRMLS_CC);
+
+	zval_ptr_dtor(&constructor_retval);
+	zval_ptr_dtor(&zmessage);
+	zval_ptr_dtor(&lineno);
+	zval_ptr_dtor(&filename);
+	FREE_DTOR(constructor);
+	FREE_DTOR(filename_func);
+	efree(buffer);
+
+	zend_throw_exception_object(ex TSRMLS_CC);
 }

-char *TWIG_GET_CLASS_NAME(zval *object TSRMLS_DC)
+static char *TWIG_GET_CLASS_NAME(zval *object TSRMLS_DC)
 {
 	char *class_name;
 	zend_uint class_name_len;
@@ -616,11 +629,15 @@ char *TWIG_GET_CLASS_NAME(zval *object TSRMLS_DC)
 	if (Z_TYPE_P(object) != IS_OBJECT) {
 		return "";
 	}
+#if PHP_API_VERSION >= 20100412
+	zend_get_object_classname(object, (const char **) &class_name, &class_name_len TSRMLS_CC);
+#else
 	zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
+#endif
 	return class_name;
 }

-static int twig_add_method_to_class(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
+static int twig_add_method_to_class(void *pDest APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
 {
 	zval *retval;
 	char *item;
@@ -642,7 +659,7 @@ static int twig_add_method_to_class(void *pDest TSRMLS_DC, int num_args, va_list
 	return 0;
 }

-static int twig_add_property_to_class(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
+static int twig_add_property_to_class(void *pDest APPLY_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
 {
 	zend_class_entry *ce;
 	zval *retval;
@@ -656,32 +673,17 @@ static int twig_add_property_to_class(void *pDest TSRMLS_DC, int num_args, va_li
 	ce = *va_arg(args, zend_class_entry**);
 	retval = va_arg(args, zval*);

+#if PHP_API_VERSION >= 20100412
+	zend_unmangle_property_name(pptr->name, pptr->name_length, (const char **) &class_name, (const char **) &prop_name);
+#else
 	zend_unmangle_property_name(pptr->name, pptr->name_length, &class_name, &prop_name);
+#endif

 	add_assoc_string(retval, prop_name, prop_name, 1);

 	return 0;
 }

-/* {{{ _adddynproperty */
-static int twig_add_dyn_property_to_class(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
-{
-	zend_class_entry *ce = *va_arg(args, zend_class_entry**);
-	zval *retval = va_arg(args, zval*), member;
-	char *class_name, *prop_name;
-
-	if (hash_key->nKeyLength < 1 || hash_key->arKey[0] == '\0') {
-		return 0; /* non public cannot be dynamic */
-	}
-
-	ZVAL_STRINGL(&member, hash_key->arKey, hash_key->nKeyLength-1, 0);
-	if (zend_get_property_info(ce, &member, 1 TSRMLS_CC) == &EG(std_property_info)) {
-		zend_unmangle_property_name((&EG(std_property_info))->name, (&EG(std_property_info))->name_length, &class_name, &prop_name);
-		add_assoc_string(retval, prop_name, prop_name, 1);
-	}
-	return 0;
-}
-
 static void twig_add_class_to_cache(zval *cache, zval *object, char *class_name TSRMLS_DC)
 {
 	zval *class_info, *class_methods, *class_properties;
@@ -696,13 +698,9 @@ static void twig_add_class_to_cache(zval *cache, zval *object, char *class_name
 	array_init(class_methods);
 	array_init(class_properties);
 	// add all methods to self::cache[$class]['methods']
-	zend_hash_apply_with_arguments(&class_ce->function_table TSRMLS_CC, twig_add_method_to_class, 1, class_methods);
-	zend_hash_apply_with_arguments(&class_ce->properties_info TSRMLS_CC, twig_add_property_to_class, 2, &class_ce, class_properties);
+	zend_hash_apply_with_arguments(&class_ce->function_table APPLY_TSRMLS_CC, twig_add_method_to_class, 1, class_methods);
+	zend_hash_apply_with_arguments(&class_ce->properties_info APPLY_TSRMLS_CC, twig_add_property_to_class, 2, &class_ce, class_properties);

-	if (object && Z_OBJ_HT_P(object)->get_properties) {
-		HashTable *properties = Z_OBJ_HT_P(object)->get_properties(object TSRMLS_CC);
-		zend_hash_apply_with_arguments(properties TSRMLS_CC, twig_add_dyn_property_to_class, 2, &class_ce, class_properties);
-	}
 	add_assoc_zval(class_info, "methods", class_methods);
 	add_assoc_zval(class_info, "properties", class_properties);
 	add_assoc_zval(cache, class_name, class_info);
@@ -734,6 +732,16 @@ PHP_FUNCTION(twig_template_get_attributes)
 	INIT_PZVAL(&zitem);
 	ZVAL_STRINGL(&zitem, item, item_len, 0);

+    switch (is_numeric_string(item, item_len, &Z_LVAL(zitem), &Z_DVAL(zitem), 0)) {
+    case IS_LONG:
+        Z_TYPE(zitem) = IS_LONG;
+        break;
+    case IS_DOUBLE:
+        Z_TYPE(zitem) = IS_DOUBLE;
+        convert_to_long(&zitem);
+        break;
+    }
+
 	if (!type) {
 		type = "any";
 	}
@@ -763,6 +771,9 @@ PHP_FUNCTION(twig_template_get_attributes)
 			}

 			ret = TWIG_GET_ARRAY_ELEMENT(object, item, item_len TSRMLS_CC);
+			if (!ret) {
+				ret = &EG(uninitialized_zval);
+			}
 			RETVAL_ZVAL(ret, 1, 0);
 			if (free_ret) {
 				zval_ptr_dtor(&ret);
@@ -787,18 +798,21 @@ PHP_FUNCTION(twig_template_get_attributes)
 			}
 /*
 			if (is_object($object)) {
-				throw new Twig_Error_Runtime(sprintf('Key "%s" in object (with ArrayAccess) of type "%s" does not exist', $item, get_class($object)));
-			// array
+				throw new Twig_Error_Runtime(sprintf('Key "%s" in object (with ArrayAccess) of type "%s" does not exist', $item, get_class($object)), -1, $this->getTemplateName());
+			} elseif (is_array($object)) {
+				throw new Twig_Error_Runtime(sprintf('Key "%s" for array with keys "%s" does not exist', $item, implode(', ', array_keys($object))), -1, $this->getTemplateName());
 			} else {
-				throw new Twig_Error_Runtime(sprintf('Key "%s" for array with keys "%s" does not exist', $item, implode(', ', array_keys($object))));
+				throw new Twig_Error_Runtime(sprintf('Impossible to access a key ("%s") on a "%s" variable', $item, gettype($object)), -1, $this->getTemplateName());
 			}
 		}
 	}
 */
 			if (Z_TYPE_P(object) == IS_OBJECT) {
-				TWIG_THROW_EXCEPTION("Twig_Error_Runtime" TSRMLS_CC, "Key \"%s\" in object (with ArrayAccess) of type \"%s\" does not exist", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
+				TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Key \"%s\" in object (with ArrayAccess) of type \"%s\" does not exist", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
+			} else if (Z_TYPE_P(object) == IS_ARRAY) {
+				TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Key \"%s\" for array with keys \"%s\" does not exist", item, TWIG_IMPLODE_ARRAY_KEYS(", ", object TSRMLS_CC));
 			} else {
-				TWIG_THROW_EXCEPTION("Twig_Error_Runtime" TSRMLS_CC, "Key \"%s\" for array with keys \"%s\" does not exist", item, TWIG_IMPLODE_ARRAY_KEYS(", ", object TSRMLS_CC));
+				TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to access a key (\"%s\") on a \"%s\" variable", item, zend_zval_type_name(object));
 			}
 			return;
 		}
@@ -826,11 +840,11 @@ PHP_FUNCTION(twig_template_get_attributes)
 			RETURN_FALSE;
 		}
 		if (Z_TYPE_P(object) == IS_ARRAY) {
-			TWIG_THROW_EXCEPTION("Twig_Error_Runtime" TSRMLS_CC, "Item \"%s\" for \"Array\" does not exist", item);
+			TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Item \"%s\" for \"Array\" does not exist", item);
 		} else {
 			Z_ADDREF_P(object);
 			convert_to_string_ex(&object);
-			TWIG_THROW_EXCEPTION("Twig_Error_Runtime" TSRMLS_CC, "Item \"%s\" for \"%s\" does not exist", item, Z_STRVAL_P(object));
+			TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Item \"%s\" for \"%s\" does not exist", item, Z_STRVAL_P(object));
 			zval_ptr_dtor(&object);
 		}
 		return;
@@ -890,8 +904,7 @@ PHP_FUNCTION(twig_template_get_attributes)

 		efree(class_name);

-		if (tmp_item || TWIG_HAS_PROPERTY(object, &zitem TSRMLS_CC) || TWIG_ARRAY_KEY_EXISTS(object, item, item_len) // FIXME: Array key? is that array access here?
-		) {
+		if (tmp_item || TWIG_HAS_PROPERTY(object, &zitem TSRMLS_CC) || TWIG_HAS_DYNAMIC_PROPERTY(object, item, item_len TSRMLS_CC)) {
 			if (isDefinedTest) {
 				RETURN_TRUE;
 			}
@@ -962,15 +975,20 @@ PHP_FUNCTION(twig_template_get_attributes)
 	}
 */
 		} else {
+			efree(tmp_method_name_get);
+			efree(tmp_method_name_is);
+			efree(lcItem);
+
 			if (isDefinedTest) {
 				RETURN_FALSE;
 			}
 			if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
 				return;
 			}
-			TWIG_THROW_EXCEPTION("Twig_Error_Runtime" TSRMLS_CC, "Method \"%s\" for object \"%s\" does not exist", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
+			TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Method \"%s\" for object \"%s\" does not exist", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
 			return;
 		}
+
 		if (isDefinedTest) {
 			efree(tmp_method_name_get);
 			efree(tmp_method_name_is);
@@ -986,6 +1004,9 @@ PHP_FUNCTION(twig_template_get_attributes)
 			TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getExtension", "sandbox" TSRMLS_CC), "checkMethodAllowed", object, &zitem TSRMLS_CC);
 		}
 		if (EG(exception)) {
+			efree(tmp_method_name_get);
+			efree(tmp_method_name_is);
+			efree(lcItem);
 			return;
 		}
 /*
diff --git a/core/vendor/twig/twig/lib/Twig/Autoloader.php b/core/vendor/twig/twig/lib/Twig/Autoloader.php
index 59f28f7..9bcec43 100644
--- a/core/vendor/twig/twig/lib/Twig/Autoloader.php
+++ b/core/vendor/twig/twig/lib/Twig/Autoloader.php
@@ -20,7 +20,7 @@ class Twig_Autoloader
     /**
      * Registers Twig_Autoloader as an SPL autoloader.
      */
-    static public function register()
+    public static function register()
     {
         ini_set('unserialize_callback_func', 'spl_autoload_call');
         spl_autoload_register(array(new self, 'autoload'));
@@ -31,7 +31,7 @@ static public function register()
      *
      * @param string $class A class name.
      */
-    static public function autoload($class)
+    public static function autoload($class)
     {
         if (0 !== strpos($class, 'Twig')) {
             return;
diff --git a/core/vendor/twig/twig/lib/Twig/Compiler.php b/core/vendor/twig/twig/lib/Twig/Compiler.php
index d03dfa0..786a75f 100644
--- a/core/vendor/twig/twig/lib/Twig/Compiler.php
+++ b/core/vendor/twig/twig/lib/Twig/Compiler.php
@@ -25,6 +25,7 @@ class Twig_Compiler implements Twig_CompilerInterface
     protected $debugInfo;
     protected $sourceOffset;
     protected $sourceLine;
+    protected $filename;

     /**
      * Constructor.
@@ -37,6 +38,11 @@ public function __construct(Twig_Environment $env)
         $this->debugInfo = array();
     }

+    public function getFilename()
+    {
+        return $this->filename;
+    }
+
     /**
      * Returns the environment instance related to this compiler.
      *
@@ -73,6 +79,10 @@ public function compile(Twig_NodeInterface $node, $indentation = 0)
         $this->sourceLine = 0;
         $this->indentation = $indentation;

+        if ($node instanceof Twig_Node_Module) {
+            $this->filename = $node->getAttribute('filename');
+        }
+
         $node->compile($this);

         return $this;
@@ -246,7 +256,7 @@ public function outdent($step = 1)
     {
         // can't outdent by more steps that the current indentation level
         if ($this->indentation < $step) {
-            throw new Twig_Error('Unable to call outdent() as the indentation would become negative');
+            throw new LogicException('Unable to call outdent() as the indentation would become negative');
         }

         $this->indentation -= $step;
diff --git a/core/vendor/twig/twig/lib/Twig/CompilerInterface.php b/core/vendor/twig/twig/lib/Twig/CompilerInterface.php
index f861381..89d87e6 100644
--- a/core/vendor/twig/twig/lib/Twig/CompilerInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/CompilerInterface.php
@@ -24,12 +24,12 @@
      *
      * @return Twig_CompilerInterface The current compiler instance
      */
-    function compile(Twig_NodeInterface $node);
+    public function compile(Twig_NodeInterface $node);

     /**
      * Gets the current PHP code after compilation.
      *
      * @return string The PHP code
      */
-    function getSource();
+    public function getSource();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Environment.php b/core/vendor/twig/twig/lib/Twig/Environment.php
index 00ebcba..2b7a369 100644
--- a/core/vendor/twig/twig/lib/Twig/Environment.php
+++ b/core/vendor/twig/twig/lib/Twig/Environment.php
@@ -17,7 +17,7 @@
  */
 class Twig_Environment
 {
-    const VERSION = '1.8.3';
+    const VERSION = '1.11.0';

     protected $charset;
     protected $loader;
@@ -711,7 +711,7 @@ public function getTokenParsers()
                     } elseif ($parser instanceof Twig_TokenParserBrokerInterface) {
                         $this->parsers->addTokenParserBroker($parser);
                     } else {
-                        throw new Twig_Error_Runtime('getTokenParsers() must return an array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances');
+                        throw new LogicException('getTokenParsers() must return an array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances');
                     }
                 }
             }
@@ -1100,6 +1100,6 @@ protected function writeCacheFile($file, $content)
             }
         }

-        throw new Twig_Error_Runtime(sprintf('Failed to write cache file "%s".', $file));
+        throw new RuntimeException(sprintf('Failed to write cache file "%s".', $file));
     }
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Error.php b/core/vendor/twig/twig/lib/Twig/Error.php
index 4b74e40..138151b 100644
--- a/core/vendor/twig/twig/lib/Twig/Error.php
+++ b/core/vendor/twig/twig/lib/Twig/Error.php
@@ -12,6 +12,23 @@
 /**
  * Twig base exception.
  *
+ * This exception class and its children must only be used when
+ * an error occurs during the loading of a template, when a syntax error
+ * is detected in a template, or when rendering a template. Other
+ * errors must use regular PHP exception classes (like when the template
+ * cache directory is not writable for instance).
+ *
+ * To help debugging template issues, this class tracks the original template
+ * name and line where the error occurred.
+ *
+ * Whenever possible, you must set these information (original template name
+ * and line number) yourself by passing them to the constructor. If some or all
+ * these information are not available from where you throw the exception, then
+ * this class will guess them automatically (when the line number is set to -1
+ * and/or the filename is set to null). As this is a costly operation, this
+ * can be disabled by passing false for both the filename and the line number
+ * when creating a new instance of this class.
+ *
  * @package    twig
  * @author     Fabien Potencier <fabien@symfony.com>
  */
@@ -25,6 +42,15 @@ class Twig_Error extends Exception
     /**
      * Constructor.
      *
+     * Set both the line number and the filename to false to
+     * disable automatic guessing of the original template name
+     * and line number.
+     *
+     * Set the line number to -1 to enable its automatic guessing.
+     * Set the filename to null to enable its automatic guessing.
+     *
+     * By default, automatic guessing is enabled.
+     *
      * @param string    $message  The error message
      * @param integer   $lineno   The template line where the error occurred
      * @param string    $filename The template file name where the error occurred
@@ -105,6 +131,12 @@ public function setTemplateLine($lineno)
         $this->updateRepr();
     }

+    public function guess()
+    {
+        $this->guessTemplateInfo();
+        $this->updateRepr();
+    }
+
     /**
      * For PHP < 5.3.0, provides access to the getPrevious() method.
      *
@@ -112,6 +144,8 @@ public function setTemplateLine($lineno)
      * @param array  $arguments The parameters to be passed to the method
      *
      * @return Exception The previous exception or null
+     *
+     * @throws BadMethodCallException
      */
     public function __call($method, $arguments)
     {
@@ -132,7 +166,7 @@ protected function updateRepr()
             $dot = true;
         }

-        if (null !== $this->filename) {
+        if ($this->filename) {
             if (is_string($this->filename) || (is_object($this->filename) && method_exists($this->filename, '__toString'))) {
                 $filename = sprintf('"%s"', $this->filename);
             } else {
@@ -141,7 +175,7 @@ protected function updateRepr()
             $this->message .= sprintf(' in %s', $filename);
         }

-        if ($this->lineno >= 0) {
+        if ($this->lineno && $this->lineno >= 0) {
             $this->message .= sprintf(' at line %d', $this->lineno);
         }

@@ -155,17 +189,17 @@ protected function guessTemplateInfo()
         $template = null;
         foreach (debug_backtrace() as $trace) {
             if (isset($trace['object']) && $trace['object'] instanceof Twig_Template && 'Twig_Template' !== get_class($trace['object'])) {
-                $template = $trace['object'];
-
-                // update template filename
-                if (null === $this->filename) {
-                    $this->filename = $template->getTemplateName();
+                if (null === $this->filename || $this->filename == $trace['object']->getTemplateName()) {
+                    $template = $trace['object'];
                 }
-
-                break;
             }
         }

+        // update template filename
+        if (null !== $template && null === $this->filename) {
+            $this->filename = $template->getTemplateName();
+        }
+
         if (null === $template || $this->lineno > -1) {
             return;
         }
diff --git a/core/vendor/twig/twig/lib/Twig/Error/Loader.php b/core/vendor/twig/twig/lib/Twig/Error/Loader.php
index 418a776..7124974 100644
--- a/core/vendor/twig/twig/lib/Twig/Error/Loader.php
+++ b/core/vendor/twig/twig/lib/Twig/Error/Loader.php
@@ -12,9 +12,21 @@
 /**
  * Exception thrown when an error occurs during template loading.
  *
+ * Automatic template information guessing is always turned off as
+ * if a template cannot be loaded, there is nothing to guess.
+ * However, when a template is loaded from another one, then, we need
+ * to find the current context and this is automatically done by
+ * Twig_Template::displayWithErrorHandling().
+ *
+ * This strategy makes Twig_Environment::resolveTemplate() much faster.
+ *
  * @package    twig
  * @author     Fabien Potencier <fabien@symfony.com>
  */
 class Twig_Error_Loader extends Twig_Error
 {
+    public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null)
+    {
+        parent::__construct($message, false, false, $previous);
+    }
 }
diff --git a/core/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php b/core/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php
new file mode 100644
index 0000000..0e08a1d
--- /dev/null
+++ b/core/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php
@@ -0,0 +1,28 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2009 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Adds an exists() method for loaders.
+ *
+ * @package    twig
+ * @author     Florin Patan <florinpatan@gmail.com>
+ */
+interface Twig_ExistsLoaderInterface
+{
+    /**
+     * Check if we have the source code of a template, given its name.
+     *
+     * @param string $name The name of the template to check if we can load
+     *
+     * @return boolean If the template source code is handled by this loader or not
+     */
+    public function exists($name);
+}
diff --git a/core/vendor/twig/twig/lib/Twig/ExpressionParser.php b/core/vendor/twig/twig/lib/Twig/ExpressionParser.php
index 0f35930..3309bb5 100644
--- a/core/vendor/twig/twig/lib/Twig/ExpressionParser.php
+++ b/core/vendor/twig/twig/lib/Twig/ExpressionParser.php
@@ -158,7 +158,7 @@ public function parsePrimaryExpression()
                 } elseif ($token->test(Twig_Token::PUNCTUATION_TYPE, '{')) {
                     $node = $this->parseHashExpression();
                 } else {
-                    throw new Twig_Error_Syntax(sprintf('Unexpected token "%s" of value "%s"', Twig_Token::typeToEnglish($token->getType(), $token->getLine()), $token->getValue()), $token->getLine());
+                    throw new Twig_Error_Syntax(sprintf('Unexpected token "%s" of value "%s"', Twig_Token::typeToEnglish($token->getType(), $token->getLine()), $token->getValue()), $token->getLine(), $this->parser->getFilename());
                 }
         }

@@ -252,7 +252,7 @@ public function parseHashExpression()
             } else {
                 $current = $stream->getCurrent();

-                throw new Twig_Error_Syntax(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s"', Twig_Token::typeToEnglish($current->getType(), $current->getLine()), $current->getValue()), $current->getLine());
+                throw new Twig_Error_Syntax(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s"', Twig_Token::typeToEnglish($current->getType(), $current->getLine()), $current->getValue()), $current->getLine(), $this->parser->getFilename());
             }

             $stream->expect(Twig_Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)');
@@ -291,11 +291,11 @@ public function getFunctionNode($name, $line)
         switch ($name) {
             case 'parent':
                 if (!count($this->parser->getBlockStack())) {
-                    throw new Twig_Error_Syntax('Calling "parent" outside a block is forbidden', $line);
+                    throw new Twig_Error_Syntax('Calling "parent" outside a block is forbidden', $line, $this->parser->getFilename());
                 }

                 if (!$this->parser->getParent() && !$this->parser->hasTraits()) {
-                    throw new Twig_Error_Syntax('Calling "parent" on a template that does not extend nor "use" another template is forbidden', $line);
+                    throw new Twig_Error_Syntax('Calling "parent" on a template that does not extend nor "use" another template is forbidden', $line, $this->parser->getFilename());
                 }

                 return new Twig_Node_Expression_Parent($this->parser->peekBlockStack(), $line);
@@ -303,12 +303,12 @@ public function getFunctionNode($name, $line)
                 return new Twig_Node_Expression_BlockReference($args->getNode(0), false, $line);
             case 'attribute':
                 if (count($args) < 2) {
-                    throw new Twig_Error_Syntax('The "attribute" function takes at least two arguments (the variable and the attributes)', $line);
+                    throw new Twig_Error_Syntax('The "attribute" function takes at least two arguments (the variable and the attributes)', $line, $this->parser->getFilename());
                 }

                 return new Twig_Node_Expression_GetAttr($args->getNode(0), $args->getNode(1), count($args) > 2 ? $args->getNode(2) : new Twig_Node_Expression_Array(array(), $line), Twig_TemplateInterface::ANY_CALL, $line);
             default:
-                if (null !== $alias = $this->parser->getImportedFunction($name)) {
+                if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) {
                     $arguments = new Twig_Node_Expression_Array(array(), $line);
                     foreach ($args as $n) {
                         $arguments->addElement($n);
@@ -351,7 +351,7 @@ public function parseSubscriptExpression($node)
                     }
                 }
             } else {
-                throw new Twig_Error_Syntax('Expected name or number', $lineno);
+                throw new Twig_Error_Syntax('Expected name or number', $lineno, $this->parser->getFilename());
             }
         } else {
             $type = Twig_TemplateInterface::ARRAY_CALL;
@@ -380,6 +380,13 @@ public function parseSubscriptExpression($node)
             $stream->expect(Twig_Token::PUNCTUATION_TYPE, ']');
         }

+        if ($node instanceof Twig_Node_Expression_Name && null !== $alias = $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) {
+            $node = new Twig_Node_Expression_MethodCall($node, 'get'.$arg->getAttribute('value'), $arguments, $lineno);
+            $node->setAttribute('safe', true);
+
+            return $node;
+        }
+
         return new Twig_Node_Expression_GetAttr($node, $arg, $arguments, $type, $lineno);
     }

@@ -439,7 +446,7 @@ public function parseAssignmentExpression()
         while (true) {
             $token = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, null, 'Only variables can be assigned to');
             if (in_array($token->getValue(), array('true', 'false', 'none'))) {
-                throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s"', $token->getValue()), $token->getLine());
+                throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s"', $token->getValue()), $token->getLine(), $this->parser->getFilename());
             }
             $targets[] = new Twig_Node_Expression_AssignName($token->getValue(), $token->getLine());

diff --git a/core/vendor/twig/twig/lib/Twig/Extension/Core.php b/core/vendor/twig/twig/lib/Twig/Extension/Core.php
index 27c80ce..3db899f 100644
--- a/core/vendor/twig/twig/lib/Twig/Extension/Core.php
+++ b/core/vendor/twig/twig/lib/Twig/Extension/Core.php
@@ -62,6 +62,10 @@ public function setTimezone($timezone)
      */
     public function getTimezone()
     {
+        if (null === $this->timezone) {
+            $this->timezone = new DateTimeZone(date_default_timezone_get());
+        }
+
         return $this->timezone;
     }

@@ -123,6 +127,7 @@ public function getFilters()
         $filters = array(
             // formatting filters
             'date'          => new Twig_Filter_Function('twig_date_format_filter', array('needs_environment' => true)),
+            'date_modify'   => new Twig_Filter_Function('twig_date_modify_filter', array('needs_environment' => true)),
             'format'        => new Twig_Filter_Function('sprintf'),
             'replace'       => new Twig_Filter_Function('strtr'),
             'number_format' => new Twig_Filter_Function('twig_number_format_filter', array('needs_environment' => true)),
@@ -144,6 +149,7 @@ public function getFilters()

             // array helpers
             'join'    => new Twig_Filter_Function('twig_join_filter'),
+            'split'   => new Twig_Filter_Function('twig_split_filter'),
             'sort'    => new Twig_Filter_Function('twig_sort_filter'),
             'merge'   => new Twig_Filter_Function('twig_array_merge'),

@@ -222,11 +228,11 @@ public function getOperators()
                 '+'   => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'),
             ),
             array(
-                'b-and'  => array('precedence' => 5, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'b-xor'  => array('precedence' => 5, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'b-or'   => array('precedence' => 5, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
                 'or'     => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
                 'and'    => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'b-or'   => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'b-xor'  => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'b-and'  => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
                 '=='     => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
                 '!='     => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
                 '<'      => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
@@ -313,8 +319,8 @@ function twig_cycle($values, $i)
  * - a random character from a string
  * - a random integer between 0 and the integer parameter
  *
- * @param Twig_Environment             $env    A Twig_Environment instance
- * @param Traversable|array|int|string $values The values to pick a random item from
+ * @param Twig_Environment                 $env    A Twig_Environment instance
+ * @param Traversable|array|integer|string $values The values to pick a random item from
  *
  * @throws Twig_Error_Runtime When $values is an empty array (does not apply to an empty string which is returned as is).
  *
@@ -378,7 +384,7 @@ function twig_random(Twig_Environment $env, $values = null)
  * @param string                       $format   A format
  * @param DateTimeZone|string          $timezone A timezone
  *
- * @return string The formatter date
+ * @return string The formatted date
  */
 function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $timezone = null)
 {
@@ -387,12 +393,7 @@ function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $
         $format = $date instanceof DateInterval ? $formats[1] : $formats[0];
     }

-    if ($date instanceof DateInterval || $date instanceof DateTime) {
-        if (null !== $timezone) {
-            $date = clone $date;
-            $date->setTimezone($timezone instanceof DateTimeZone ? $timezone : new DateTimeZone($timezone));
-        }
-
+    if ($date instanceof DateInterval) {
         return $date->format($format);
     }

@@ -400,6 +401,27 @@ function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $
 }

 /**
+ * Returns a new date object modified
+ *
+ * <pre>
+ *   {{ post.published_at|modify("-1day")|date("m/d/Y") }}
+ * </pre>
+ *
+ * @param Twig_Environment  $env      A Twig_Environment instance
+ * @param DateTime|string   $date     A date
+ * @param string            $modifier A modifier string
+ *
+ * @return DateTime A new date object
+ */
+function twig_date_modify_filter(Twig_Environment $env, $date, $modifier)
+{
+    $date = twig_date_converter($env, $date, false);
+    $date->modify($modifier);
+
+    return $date;
+}
+
+/**
  * Converts an input to a DateTime instance.
  *
  * <pre>
@@ -416,32 +438,33 @@ function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $
  */
 function twig_date_converter(Twig_Environment $env, $date = null, $timezone = null)
 {
-    if (!$date instanceof DateTime) {
-        $asString = (string) $date;
-
-        if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) {
-            $date = new DateTime('@'.$date);
-        } else {
-            $date = new DateTime($date);
-        }
+    // determine the timezone
+    if (!$timezone) {
+        $defaultTimezone = $env->getExtension('core')->getTimezone();
+    } elseif (!$timezone instanceof DateTimeZone) {
+        $defaultTimezone = new DateTimeZone($timezone);
     } else {
-        $date = clone $date;
+        $defaultTimezone = $timezone;
     }

-    // set Timezone
-    if (null !== $timezone) {
-        if ($timezone instanceof DateTimeZone) {
-            $date->setTimezone($timezone);
-        } else {
-            $date->setTimezone(new DateTimeZone($timezone));
+    if ($date instanceof DateTime) {
+        $date = clone $date;
+        if (false !== $timezone) {
+            $date->setTimezone($defaultTimezone);
         }
-    } elseif (($timezone = $env->getExtension('core')->getTimezone()) instanceof DateTimeZone) {
-        $date->setTimezone($timezone);
-    } else {
-        $date->setTimezone(new DateTimeZone(date_default_timezone_get()));
+
+        return $date;
     }

-    return $date;
+    $asString = (string) $date;
+    if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) {
+        $date = new DateTime('@'.$date);
+        $date->setTimezone($defaultTimezone);
+
+        return $date;
+    }
+
+    return new DateTime($date, $defaultTimezone);
 }

 /**
@@ -453,7 +476,7 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
  *
  * @param Twig_Environment    $env          A Twig_Environment instance
  * @param mixed               $number       A float/int/string of the number to format
- * @param int                 $decimal      The number of decimal points to display.
+ * @param integer             $decimal      The number of decimal points to display.
  * @param string              $decimalPoint The character(s) to use for the decimal point.
  * @param string              $thousandSep  The character(s) to use for the thousands separator.
  *
@@ -623,6 +646,38 @@ function twig_join_filter($value, $glue = '')
     return implode($glue, (array) $value);
 }

+/**
+ * Splits the string into an array.
+ *
+ * <pre>
+ *  {{ "one,two,three"|split(',') }}
+ *  {# returns [one, two, three] #}
+ *
+ *  {{ "one,two,three,four,five"|split(',', 3) }}
+ *  {# returns [one, two, "three,four,five"] #}
+ *
+ *  {{ "123"|split('') }}
+ *  {# returns [1, 2, 3] #}
+ *
+ *  {{ "aabbcc"|split('', 2) }}
+ *  {# returns [aa, bb, cc] #}
+ * </pre>
+ *
+ * @param string  $value     A string
+ * @param string  $delimiter The delimiter
+ * @param integer $limit     The limit
+ *
+ * @return array The split string as an array
+ */
+function twig_split_filter($value, $delimiter, $limit = null)
+{
+    if (empty($delimiter)) {
+        return str_split($value, null === $limit ? 1 : $limit);
+    }
+
+    return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit);
+}
+
 // The '_default' filter is used internally to avoid using the ternary operator
 // which costs a lot for big contexts (before PHP 5.4). So, on average,
 // a function call is cheaper.
@@ -718,8 +773,10 @@ function twig_sort_filter($array)
 /* used internally */
 function twig_in_filter($value, $compare)
 {
+    $strict = is_object($value);
+
     if (is_array($compare)) {
-        return in_array($value, $compare);
+        return in_array($value, $compare, $strict);
     } elseif (is_string($compare)) {
         if (!strlen((string) $value)) {
             return empty($compare);
@@ -727,7 +784,7 @@ function twig_in_filter($value, $compare)

         return false !== strpos($compare, (string) $value);
     } elseif (is_object($compare) && $compare instanceof Traversable) {
-        return in_array($value, iterator_to_array($compare, false));
+        return in_array($value, iterator_to_array($compare, false), $strict);
     }

     return false;
@@ -766,10 +823,46 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
                 $string = twig_convert_encoding($string, 'UTF-8', $charset);
             }

-            if (null === $string = preg_replace_callback('#[^\p{L}\p{N} ]#u', '_twig_escape_js_callback', $string)) {
+            if (0 == strlen($string) ? false : (1 == preg_match('/^./su', $string) ? false : true)) {
+                throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.');
+            }
+
+            $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', '_twig_escape_js_callback', $string);
+
+            if ('UTF-8' != $charset) {
+                $string = twig_convert_encoding($string, $charset, 'UTF-8');
+            }
+
+            return $string;
+
+        case 'css':
+            if ('UTF-8' != $charset) {
+                $string = twig_convert_encoding($string, 'UTF-8', $charset);
+            }
+
+            if (0 == strlen($string) ? false : (1 == preg_match('/^./su', $string) ? false : true)) {
                 throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.');
             }

+            $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', '_twig_escape_css_callback', $string);
+
+            if ('UTF-8' != $charset) {
+                $string = twig_convert_encoding($string, $charset, 'UTF-8');
+            }
+
+            return $string;
+
+        case 'html_attr':
+            if ('UTF-8' != $charset) {
+                $string = twig_convert_encoding($string, 'UTF-8', $charset);
+            }
+
+            if (0 == strlen($string) ? false : (1 == preg_match('/^./su', $string) ? false : true)) {
+                throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.');
+            }
+
+            $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', '_twig_escape_html_attr_callback', $string);
+
             if ('UTF-8' != $charset) {
                 $string = twig_convert_encoding($string, $charset, 'UTF-8');
             }
@@ -808,8 +901,15 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',

             return twig_convert_encoding($string, $charset, 'UTF-8');

+        case 'url':
+            if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+                return str_replace('%7E', '~', rawurlencode($string));
+            }
+
+            return rawurlencode($string);
+
         default:
-            throw new Twig_Error_Runtime(sprintf('Invalid escaping strategy "%s" (valid ones: html, js).', $strategy));
+            throw new Twig_Error_Runtime(sprintf('Invalid escaping strategy "%s" (valid ones: html, js, url, css, and html_attr).', $strategy));
     }
 }

@@ -850,13 +950,89 @@ function _twig_escape_js_callback($matches)

     // \xHH
     if (!isset($char[1])) {
-        return '\\x'.substr('00'.bin2hex($char), -2);
+        return '\\x'.strtoupper(substr('00'.bin2hex($char), -2));
     }

     // \uHHHH
     $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8');

-    return '\\u'.substr('0000'.bin2hex($char), -4);
+    return '\\u'.strtoupper(substr('0000'.bin2hex($char), -4));
+}
+
+function _twig_escape_css_callback($matches)
+{
+    $char = $matches[0];
+
+    // \xHH
+    if (!isset($char[1])) {
+        $hex = ltrim(strtoupper(bin2hex($char)), '0');
+        if (0 === strlen($hex)) {
+            $hex = '0';
+        }
+
+        return '\\'.$hex.' ';
+    }
+
+    // \uHHHH
+    $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8');
+
+    return '\\'.ltrim(strtoupper(bin2hex($char)), '0').' ';
+}
+
+/**
+ * This function is adapted from code coming from Zend Framework.
+ *
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+function _twig_escape_html_attr_callback($matches)
+{
+    /*
+     * While HTML supports far more named entities, the lowest common denominator
+     * has become HTML5's XML Serialisation which is restricted to the those named
+     * entities that XML supports. Using HTML entities would result in this error:
+     *     XML Parsing Error: undefined entity
+     */
+    static $entityMap = array(
+        34 => 'quot', /* quotation mark */
+        38 => 'amp',  /* ampersand */
+        60 => 'lt',   /* less-than sign */
+        62 => 'gt',   /* greater-than sign */
+    );
+
+    $chr = $matches[0];
+    $ord = ord($chr);
+
+    /**
+     * The following replaces characters undefined in HTML with the
+     * hex entity for the Unicode replacement character.
+     */
+    if (($ord <= 0x1f && $chr != "\t" && $chr != "\n" && $chr != "\r") || ($ord >= 0x7f && $ord <= 0x9f)) {
+        return '&#xFFFD;';
+    }
+
+    /**
+     * Check if the current character to escape has a name entity we should
+     * replace it with while grabbing the hex value of the character.
+     */
+    if (strlen($chr) == 1) {
+        $hex = strtoupper(substr('00'.bin2hex($chr), -2));
+    } else {
+        $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8');
+        $hex = strtoupper(substr('0000'.bin2hex($chr), -4));
+    }
+
+    $int = hexdec($hex);
+    if (array_key_exists($int, $entityMap)) {
+        return sprintf('&%s;', $entityMap[$int]);
+    }
+
+    /**
+     * Per OWASP recommendations, we'll use hex entities for any other
+     * characters where a named entity does not exist.
+     */
+
+    return sprintf('&#x%s;', $hex);
 }

 // add multibyte extensions if possible
@@ -944,8 +1120,7 @@ function twig_capitalize_string_filter(Twig_Environment $env, $string)
     }
 }
 // and byte fallback
-else
-{
+else {
     /**
      * Returns the length of a variable.
      *
diff --git a/core/vendor/twig/twig/lib/Twig/Extension/Debug.php b/core/vendor/twig/twig/lib/Twig/Extension/Debug.php
index 8059df0..3dc4d2d 100644
--- a/core/vendor/twig/twig/lib/Twig/Extension/Debug.php
+++ b/core/vendor/twig/twig/lib/Twig/Extension/Debug.php
@@ -17,7 +17,7 @@ class Twig_Extension_Debug extends Twig_Extension
      */
     public function getFunctions()
     {
-        // dump is safe if var_dump is overriden by xdebug
+        // dump is safe if var_dump is overridden by xdebug
         $isDumpOutputHtmlSafe = extension_loaded('xdebug')
             // false means that it was not set (and the default is on) or it explicitly enabled
             && (false === ini_get('xdebug.overload_var_dump') || ini_get('xdebug.overload_var_dump'))
diff --git a/core/vendor/twig/twig/lib/Twig/Extension/Escaper.php b/core/vendor/twig/twig/lib/Twig/Extension/Escaper.php
index c02c3a8..db1a50e 100644
--- a/core/vendor/twig/twig/lib/Twig/Extension/Escaper.php
+++ b/core/vendor/twig/twig/lib/Twig/Extension/Escaper.php
@@ -105,4 +105,3 @@ function twig_raw_filter($string)
 {
     return $string;
 }
-
diff --git a/core/vendor/twig/twig/lib/Twig/Extension/StringLoader.php b/core/vendor/twig/twig/lib/Twig/Extension/StringLoader.php
new file mode 100644
index 0000000..90caf28
--- /dev/null
+++ b/core/vendor/twig/twig/lib/Twig/Extension/StringLoader.php
@@ -0,0 +1,64 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2012 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+class Twig_Extension_StringLoader extends Twig_Extension
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getFunctions()
+    {
+        return array(
+            'template_from_string' => new Twig_Function_Function('twig_template_from_string', array('needs_environment' => true)),
+        );
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        return 'string_loader';
+    }
+}
+
+/**
+ * Loads a template from a string.
+ *
+ * <pre>
+ * {% include template_from_string("Hello {{ name }}") }}
+ * </pre>
+ *
+ * @param Twig_Environment $env      A Twig_Environment instance
+ * @param string           $template A template as a string
+ *
+ * @return Twig_Template A Twig_Template instance
+ */
+function twig_template_from_string(Twig_Environment $env, $template)
+{
+    static $loader;
+
+    if (null === $loader) {
+        $loader = new Twig_Loader_String();
+    }
+
+    $current = $env->getLoader();
+    $env->setLoader($loader);
+    try {
+        $template = $env->loadTemplate($template);
+    } catch (Exception $e) {
+        $env->setLoader($current);
+
+        throw $e;
+    }
+    $env->setLoader($current);
+
+    return $template;
+}
diff --git a/core/vendor/twig/twig/lib/Twig/ExtensionInterface.php b/core/vendor/twig/twig/lib/Twig/ExtensionInterface.php
index 0bfed88..fe20a4e 100644
--- a/core/vendor/twig/twig/lib/Twig/ExtensionInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/ExtensionInterface.php
@@ -24,61 +24,61 @@
      *
      * @param Twig_Environment $environment The current Twig_Environment instance
      */
-    function initRuntime(Twig_Environment $environment);
+    public function initRuntime(Twig_Environment $environment);

     /**
      * Returns the token parser instances to add to the existing list.
      *
      * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
      */
-    function getTokenParsers();
+    public function getTokenParsers();

     /**
      * Returns the node visitor instances to add to the existing list.
      *
      * @return array An array of Twig_NodeVisitorInterface instances
      */
-    function getNodeVisitors();
+    public function getNodeVisitors();

     /**
      * Returns a list of filters to add to the existing list.
      *
      * @return array An array of filters
      */
-    function getFilters();
+    public function getFilters();

     /**
      * Returns a list of tests to add to the existing list.
      *
      * @return array An array of tests
      */
-    function getTests();
+    public function getTests();

     /**
      * Returns a list of functions to add to the existing list.
      *
      * @return array An array of functions
      */
-    function getFunctions();
+    public function getFunctions();

     /**
      * Returns a list of operators to add to the existing list.
      *
      * @return array An array of operators
      */
-    function getOperators();
+    public function getOperators();

     /**
      * Returns a list of global variables to add to the existing list.
      *
      * @return array An array of global variables
      */
-    function getGlobals();
+    public function getGlobals();

     /**
      * Returns the name of the extension.
      *
      * @return string The extension name
      */
-    function getName();
+    public function getName();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/FilterInterface.php b/core/vendor/twig/twig/lib/Twig/FilterInterface.php
index f398026..0a07c7c 100644
--- a/core/vendor/twig/twig/lib/Twig/FilterInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/FilterInterface.php
@@ -22,19 +22,19 @@
      *
      * @return string The PHP code for the filter
      */
-    function compile();
+    public function compile();

-    function needsEnvironment();
+    public function needsEnvironment();

-    function needsContext();
+    public function needsContext();

-    function getSafe(Twig_Node $filterArgs);
+    public function getSafe(Twig_Node $filterArgs);

-    function getPreservesSafety();
+    public function getPreservesSafety();

-    function getPreEscape();
+    public function getPreEscape();

-    function setArguments($arguments);
+    public function setArguments($arguments);

-    function getArguments();
+    public function getArguments();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Function/Node.php b/core/vendor/twig/twig/lib/Twig/Function/Node.php
index a687a84..df937e5 100644
--- a/core/vendor/twig/twig/lib/Twig/Function/Node.php
+++ b/core/vendor/twig/twig/lib/Twig/Function/Node.php
@@ -15,7 +15,7 @@
  * @package    twig
  * @author     Fabien Potencier <fabien@symfony.com>
  */
-class Twig_Function_Node extends Twig_Filter
+class Twig_Function_Node extends Twig_Function
 {
     protected $class;

diff --git a/core/vendor/twig/twig/lib/Twig/FunctionInterface.php b/core/vendor/twig/twig/lib/Twig/FunctionInterface.php
index d402d17..d652ac3 100644
--- a/core/vendor/twig/twig/lib/Twig/FunctionInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/FunctionInterface.php
@@ -23,15 +23,15 @@
      *
      * @return string The PHP code for the function
      */
-    function compile();
+    public function compile();

-    function needsEnvironment();
+    public function needsEnvironment();

-    function needsContext();
+    public function needsContext();

-    function getSafe(Twig_Node $filterArgs);
+    public function getSafe(Twig_Node $filterArgs);

-    function setArguments($arguments);
+    public function setArguments($arguments);

-    function getArguments();
+    public function getArguments();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/LexerInterface.php b/core/vendor/twig/twig/lib/Twig/LexerInterface.php
index 2bec235..9c3d3d2 100644
--- a/core/vendor/twig/twig/lib/Twig/LexerInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/LexerInterface.php
@@ -25,5 +25,5 @@
      *
      * @return Twig_TokenStream A token stream instance
      */
-    function tokenize($code, $filename = null);
+    public function tokenize($code, $filename = null);
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Loader/Array.php b/core/vendor/twig/twig/lib/Twig/Loader/Array.php
index 8776264..e00910c 100644
--- a/core/vendor/twig/twig/lib/Twig/Loader/Array.php
+++ b/core/vendor/twig/twig/lib/Twig/Loader/Array.php
@@ -20,7 +20,7 @@
  * @package    twig
  * @author     Fabien Potencier <fabien@symfony.com>
  */
-class Twig_Loader_Array implements Twig_LoaderInterface
+class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
 {
     protected $templates;

@@ -51,11 +51,7 @@ public function setTemplate($name, $template)
     }

     /**
-     * Gets the source code of a template, given its name.
-     *
-     * @param string $name The name of the template to load
-     *
-     * @return string The template source code
+     * {@inheritdoc}
      */
     public function getSource($name)
     {
@@ -68,11 +64,15 @@ public function getSource($name)
     }

     /**
-     * Gets the cache key to use for the cache for a given template name.
-     *
-     * @param string $name The name of the template to load
-     *
-     * @return string The cache key
+     * {@inheritdoc}
+     */
+    public function exists($name)
+    {
+        return isset($this->templates[(string) $name]);
+    }
+
+    /**
+     * {@inheritdoc}
      */
     public function getCacheKey($name)
     {
@@ -85,10 +85,7 @@ public function getCacheKey($name)
     }

     /**
-     * Returns true if the template is still fresh.
-     *
-     * @param string    $name The template name
-     * @param timestamp $time The last modification time of the cached template
+     * {@inheritdoc}
      */
     public function isFresh($name, $time)
     {
diff --git a/core/vendor/twig/twig/lib/Twig/Loader/Chain.php b/core/vendor/twig/twig/lib/Twig/Loader/Chain.php
index a044905..da61aca 100644
--- a/core/vendor/twig/twig/lib/Twig/Loader/Chain.php
+++ b/core/vendor/twig/twig/lib/Twig/Loader/Chain.php
@@ -15,8 +15,9 @@
  * @package twig
  * @author  Fabien Potencier <fabien@symfony.com>
  */
-class Twig_Loader_Chain implements Twig_LoaderInterface
+class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
 {
+    private $hasSourceCache = array();
     protected $loaders;

     /**
@@ -40,61 +41,96 @@ public function __construct(array $loaders = array())
     public function addLoader(Twig_LoaderInterface $loader)
     {
         $this->loaders[] = $loader;
+        $this->hasSourceCache = array();
     }

     /**
-     * Gets the source code of a template, given its name.
-     *
-     * @param string $name The name of the template to load
-     *
-     * @return string The template source code
+     * {@inheritdoc}
      */
     public function getSource($name)
     {
+        $exceptions = array();
         foreach ($this->loaders as $loader) {
+            if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) {
+                continue;
+            }
+
             try {
                 return $loader->getSource($name);
             } catch (Twig_Error_Loader $e) {
+                $exceptions[] = $e->getMessage();
             }
         }

-        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
+        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined (%s).', $name, implode(', ', $exceptions)));
     }

     /**
-     * Gets the cache key to use for the cache for a given template name.
-     *
-     * @param string $name The name of the template to load
-     *
-     * @return string The cache key
+     * {@inheritdoc}
+     */
+    public function exists($name)
+    {
+        $name = (string) $name;
+
+        if (isset($this->hasSourceCache[$name])) {
+            return $this->hasSourceCache[$name];
+        }
+
+        foreach ($this->loaders as $loader) {
+            if ($loader instanceof Twig_ExistsLoaderInterface && $loader->exists($name)) {
+                return $this->hasSourceCache[$name] = true;
+            }
+
+            try {
+                $loader->getSource($name);
+
+                return $this->hasSourceCache[$name] = true;
+            } catch (Twig_Error_Loader $e) {
+            }
+        }
+
+        return $this->hasSourceCache[$name] = false;
+    }
+
+    /**
+     * {@inheritdoc}
      */
     public function getCacheKey($name)
     {
+        $exceptions = array();
         foreach ($this->loaders as $loader) {
+            if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) {
+                continue;
+            }
+
             try {
                 return $loader->getCacheKey($name);
             } catch (Twig_Error_Loader $e) {
+                $exceptions[] = get_class($loader).': '.$e->getMessage();
             }
         }

-        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
+        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined (%s).', $name, implode(' ', $exceptions)));
     }

     /**
-     * Returns true if the template is still fresh.
-     *
-     * @param string    $name The template name
-     * @param timestamp $time The last modification time of the cached template
+     * {@inheritdoc}
      */
     public function isFresh($name, $time)
     {
+        $exceptions = array();
         foreach ($this->loaders as $loader) {
+            if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) {
+                continue;
+            }
+
             try {
                 return $loader->isFresh($name, $time);
             } catch (Twig_Error_Loader $e) {
+                $exceptions[] = get_class($loader).': '.$e->getMessage();
             }
         }

-        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
+        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined (%s).', $name, implode(' ', $exceptions)));
     }
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Loader/Filesystem.php b/core/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
index 18104a5..8748e3d 100644
--- a/core/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
+++ b/core/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
@@ -15,7 +15,7 @@
  * @package    twig
  * @author     Fabien Potencier <fabien@symfony.com>
  */
-class Twig_Loader_Filesystem implements Twig_LoaderInterface
+class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
 {
     protected $paths;
     protected $cache;
@@ -33,36 +33,54 @@ public function __construct($paths)
     /**
      * Returns the paths to the templates.
      *
+     * @param string $namespace A path namespace
+     *
      * @return array The array of paths where to look for templates
      */
-    public function getPaths()
+    public function getPaths($namespace = '__main__')
+    {
+        return isset($this->paths[$namespace]) ? $this->paths[$namespace] : array();
+    }
+
+    /**
+     * Returns the path namespaces.
+     *
+     * The "__main__" namespace is always defined.
+     *
+     * @return array The array of defined namespaces
+     */
+    public function getNamespaces()
     {
-        return $this->paths;
+        return array_keys($this->paths);
     }

     /**
      * Sets the paths where templates are stored.
      *
-     * @param string|array $paths A path or an array of paths where to look for templates
+     * @param string|array $paths     A path or an array of paths where to look for templates
+     * @param string       $namespace A path namespace
      */
-    public function setPaths($paths)
+    public function setPaths($paths, $namespace = '__main__')
     {
         if (!is_array($paths)) {
             $paths = array($paths);
         }

-        $this->paths = array();
+        $this->paths[$namespace] = array();
         foreach ($paths as $path) {
-            $this->addPath($path);
+            $this->addPath($path, $namespace);
         }
     }

     /**
      * Adds a path where templates are stored.
      *
-     * @param string $path A path where to look for templates
+     * @param string $path      A path where to look for templates
+     * @param string $namespace A path name
+     *
+     * @throws Twig_Error_Loader
      */
-    public function addPath($path)
+    public function addPath($path, $namespace = '__main__')
     {
         // invalidate the cache
         $this->cache = array();
@@ -71,15 +89,37 @@ public function addPath($path)
             throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist.', $path));
         }

-        $this->paths[] = rtrim($path, '/\\');
+        $this->paths[$namespace][] = rtrim($path, '/\\');
     }

     /**
-     * Gets the source code of a template, given its name.
+     * Prepends a path where templates are stored.
      *
-     * @param string $name The name of the template to load
+     * @param string $path      A path where to look for templates
+     * @param string $namespace A path name
      *
-     * @return string The template source code
+     * @throws Twig_Error_Loader
+     */
+    public function prependPath($path, $namespace = '__main__')
+    {
+        // invalidate the cache
+        $this->cache = array();
+
+        if (!is_dir($path)) {
+            throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist.', $path));
+        }
+
+        $path = rtrim($path, '/\\');
+
+        if (!isset($this->paths[$namespace])) {
+            $this->paths[$namespace][] = $path;
+        } else {
+            array_unshift($this->paths[$namespace], $path);
+        }
+    }
+
+    /**
+     * {@inheritdoc}
      */
     public function getSource($name)
     {
@@ -87,11 +127,7 @@ public function getSource($name)
     }

     /**
-     * Gets the cache key to use for the cache for a given template name.
-     *
-     * @param string $name The name of the template to load
-     *
-     * @return string The cache key
+     * {@inheritdoc}
      */
     public function getCacheKey($name)
     {
@@ -99,10 +135,26 @@ public function getCacheKey($name)
     }

     /**
-     * Returns true if the template is still fresh.
-     *
-     * @param string    $name The template name
-     * @param timestamp $time The last modification time of the cached template
+     * {@inheritdoc}
+     */
+    public function exists($name)
+    {
+        $name = (string) $name;
+        if (isset($this->cache[$name])) {
+            return true;
+        }
+
+        try {
+            $this->findTemplate($name);
+
+            return true;
+        } catch (Twig_Error_Loader $exception) {
+            return false;
+        }
+    }
+
+    /**
+     * {@inheritdoc}
      */
     public function isFresh($name, $time)
     {
@@ -111,6 +163,8 @@ public function isFresh($name, $time)

     protected function findTemplate($name)
     {
+        $name = (string) $name;
+
         // normalize name
         $name = preg_replace('#/{2,}#', '/', strtr($name, '\\', '/'));

@@ -120,13 +174,28 @@ protected function findTemplate($name)

         $this->validateName($name);

-        foreach ($this->paths as $path) {
+        $namespace = '__main__';
+        if (isset($name[0]) && '@' == $name[0]) {
+            if (false === $pos = strpos($name, '/')) {
+                throw new Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
+            }
+
+            $namespace = substr($name, 1, $pos - 1);
+
+            $name = substr($name, $pos + 1);
+        }
+
+        if (!isset($this->paths[$namespace])) {
+            throw new Twig_Error_Loader(sprintf('There are no registered paths for namespace "%s".', $namespace));
+        }
+
+        foreach ($this->paths[$namespace] as $path) {
             if (is_file($path.'/'.$name)) {
                 return $this->cache[$name] = $path.'/'.$name;
             }
         }

-        throw new Twig_Error_Loader(sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths)));
+        throw new Twig_Error_Loader(sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])));
     }

     protected function validateName($name)
diff --git a/core/vendor/twig/twig/lib/Twig/Loader/String.php b/core/vendor/twig/twig/lib/Twig/Loader/String.php
index bc792b1..6a4c0ab 100644
--- a/core/vendor/twig/twig/lib/Twig/Loader/String.php
+++ b/core/vendor/twig/twig/lib/Twig/Loader/String.php
@@ -12,6 +12,10 @@
 /**
  * Loads a template from a string.
  *
+ * This loader should only be used for unit testing as it has many limitations
+ * (for instance, the include or extends tag does not make any sense for a string
+ * loader).
+ *
  * When using this loader with a cache mechanism, you should know that a new cache
  * key is generated each time a template content "changes" (the cache key being the
  * source code of the template). If you don't want to see your cache grows out of
@@ -20,14 +24,10 @@
  * @package    twig
  * @author     Fabien Potencier <fabien@symfony.com>
  */
-class Twig_Loader_String implements Twig_LoaderInterface
+class Twig_Loader_String implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
 {
     /**
-     * Gets the source code of a template, given its name.
-     *
-     * @param string $name The name of the template to load
-     *
-     * @return string The template source code
+     * {@inheritdoc}
      */
     public function getSource($name)
     {
@@ -35,11 +35,15 @@ public function getSource($name)
     }

     /**
-     * Gets the cache key to use for the cache for a given template name.
-     *
-     * @param string $name The name of the template to load
-     *
-     * @return string The cache key
+     * {@inheritdoc}
+     */
+    public function exists($name)
+    {
+        return true;
+    }
+
+    /**
+     * {@inheritdoc}
      */
     public function getCacheKey($name)
     {
@@ -47,10 +51,7 @@ public function getCacheKey($name)
     }

     /**
-     * Returns true if the template is still fresh.
-     *
-     * @param string    $name The template name
-     * @param timestamp $time The last modification time of the cached template
+     * {@inheritdoc}
      */
     public function isFresh($name, $time)
     {
diff --git a/core/vendor/twig/twig/lib/Twig/LoaderInterface.php b/core/vendor/twig/twig/lib/Twig/LoaderInterface.php
index 55e3ac6..3d69b14 100644
--- a/core/vendor/twig/twig/lib/Twig/LoaderInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/LoaderInterface.php
@@ -26,7 +26,7 @@
      *
      * @throws Twig_Error_Loader When $name is not found
      */
-    function getSource($name);
+    public function getSource($name);

     /**
      * Gets the cache key to use for the cache for a given template name.
@@ -37,7 +37,7 @@ function getSource($name);
      *
      * @throws Twig_Error_Loader When $name is not found
      */
-    function getCacheKey($name);
+    public function getCacheKey($name);

     /**
      * Returns true if the template is still fresh.
@@ -49,5 +49,5 @@ function getCacheKey($name);
      *
      * @throws Twig_Error_Loader When $name is not found
      */
-    function isFresh($name, $time);
+    public function isFresh($name, $time);
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Node.php b/core/vendor/twig/twig/lib/Twig/Node.php
index 651ffc4..3048db5 100644
--- a/core/vendor/twig/twig/lib/Twig/Node.php
+++ b/core/vendor/twig/twig/lib/Twig/Node.php
@@ -134,12 +134,12 @@ public function hasAttribute($name)
      *
      * @param  string The attribute name
      *
-     * @return mixed  The attribute value
+     * @return mixed The attribute value
      */
     public function getAttribute($name)
     {
         if (!array_key_exists($name, $this->attributes)) {
-            throw new Twig_Error_Runtime(sprintf('Attribute "%s" does not exist for Node "%s".', $name, get_class($this)));
+            throw new LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, get_class($this)));
         }

         return $this->attributes[$name];
@@ -188,7 +188,7 @@ public function hasNode($name)
     public function getNode($name)
     {
         if (!array_key_exists($name, $this->nodes)) {
-            throw new Twig_Error_Runtime(sprintf('Node "%s" does not exist for Node "%s".', $name, get_class($this)));
+            throw new LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, get_class($this)));
         }

         return $this->nodes[$name];
diff --git a/core/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php b/core/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php
index 8a0903a..eb9cd31 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php
@@ -26,7 +26,7 @@ public function compile(Twig_Compiler $compiler)
                 $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
             }

-            throw new Twig_Error_Syntax($message, $this->getLine());
+            throw new Twig_Error_Syntax($message, $this->getLine(), $compiler->getFilename());
         }

         $this->compileFilter($compiler, $filter);
diff --git a/core/vendor/twig/twig/lib/Twig/Node/Expression/Function.php b/core/vendor/twig/twig/lib/Twig/Node/Expression/Function.php
index 9342bb1..5640377 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Expression/Function.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Expression/Function.php
@@ -25,7 +25,7 @@ public function compile(Twig_Compiler $compiler)
                 $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
             }

-            throw new Twig_Error_Syntax($message, $this->getLine());
+            throw new Twig_Error_Syntax($message, $this->getLine(), $compiler->getFilename());
         }

         $compiler->raw($function->compile().'(');
diff --git a/core/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php b/core/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php
index 6498444..81a9b13 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php
@@ -13,12 +13,12 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression
 {
     public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression_Array $arguments, $type, $lineno)
     {
-        parent::__construct(array('node' => $node, 'attribute' => $attribute, 'arguments' => $arguments), array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false), $lineno);
+        parent::__construct(array('node' => $node, 'attribute' => $attribute, 'arguments' => $arguments), array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno);
     }

     public function compile(Twig_Compiler $compiler)
     {
-        if (function_exists('twig_template_get_attributes')) {
+        if (function_exists('twig_template_get_attributes') && !$this->getAttribute('disable_c_ext')) {
             $compiler->raw('twig_template_get_attributes($this, ');
         } else {
             $compiler->raw('$this->getAttribute(');
diff --git a/core/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php b/core/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php
index 5093808..620b02b 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php
@@ -13,6 +13,10 @@ class Twig_Node_Expression_MethodCall extends Twig_Node_Expression
     public function __construct(Twig_Node_Expression $node, $method, Twig_Node_Expression_Array $arguments, $lineno)
     {
         parent::__construct(array('node' => $node, 'arguments' => $arguments), array('method' => $method, 'safe' => false), $lineno);
+
+        if ($node instanceof Twig_Node_Expression_Name) {
+            $node->setAttribute('always_defined', true);
+        }
     }

     public function compile(Twig_Compiler $compiler)
diff --git a/core/vendor/twig/twig/lib/Twig/Node/Expression/Name.php b/core/vendor/twig/twig/lib/Twig/Node/Expression/Name.php
index 8f5a1ea..2e5321d 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Expression/Name.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Expression/Name.php
@@ -19,7 +19,7 @@ class Twig_Node_Expression_Name extends Twig_Node_Expression

     public function __construct($name, $lineno)
     {
-        parent::__construct(array(), array('name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false), $lineno);
+        parent::__construct(array(), array('name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false), $lineno);
     }

     public function compile(Twig_Compiler $compiler)
@@ -34,6 +34,12 @@ public function compile(Twig_Compiler $compiler)
             }
         } elseif ($this->isSpecial()) {
             $compiler->raw($this->specialVars[$name]);
+        } elseif ($this->getAttribute('always_defined')) {
+            $compiler
+                ->raw('$context[')
+                ->string($name)
+                ->raw(']')
+            ;
         } else {
             // remove the non-PHP 5.4 version when PHP 5.3 support is dropped
             // as the non-optimized version is just a workaround for slow ternary operator
diff --git a/core/vendor/twig/twig/lib/Twig/Node/Expression/Test.php b/core/vendor/twig/twig/lib/Twig/Node/Expression/Test.php
index 4e0b25e..076e39d 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Expression/Test.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Expression/Test.php
@@ -25,7 +25,7 @@ public function compile(Twig_Compiler $compiler)
                 $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
             }

-            throw new Twig_Error_Syntax($message, $this->getLine());
+            throw new Twig_Error_Syntax($message, $this->getLine(), $compiler->getFilename());
         }

         $name = $this->getAttribute('name');
diff --git a/core/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php b/core/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php
index e7c6828..915e60a 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php
@@ -35,7 +35,7 @@ public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface

             $this->changeIgnoreStrictCheck($node);
         } else {
-            throw new Twig_Error_Syntax('The "defined" test only works with simple variables', $this->getLine());
+            throw new Twig_Error_Syntax('The "defined" test only works with simple variables', $this->getLine(), $compiler->getFilename());
         }
     }

diff --git a/core/vendor/twig/twig/lib/Twig/Node/Macro.php b/core/vendor/twig/twig/lib/Twig/Node/Macro.php
index e0c3dca..bdbef27 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/Macro.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/Macro.php
@@ -31,7 +31,7 @@ public function compile(Twig_Compiler $compiler)
     {
         $arguments = array();
         foreach ($this->getNode('arguments') as $argument) {
-            $arguments[] = '$'.$argument->getAttribute('name').' = null';
+            $arguments[] = '$_'.$argument->getAttribute('name').' = null';
         }

         $compiler
@@ -52,7 +52,7 @@ public function compile(Twig_Compiler $compiler)
                 $compiler
                     ->write('')
                     ->string($argument->getAttribute('name'))
-                    ->raw(' => $'.$argument->getAttribute('name'))
+                    ->raw(' => $_'.$argument->getAttribute('name'))
                     ->raw(",\n")
                 ;
             }
@@ -70,7 +70,7 @@ public function compile(Twig_Compiler $compiler)
             ->indent()
             ->subcompile($this->getNode('body'))
             ->outdent()
-            ->write("} catch(Exception \$e) {\n")
+            ->write("} catch (Exception \$e) {\n")
             ->indent()
             ->write("ob_end_clean();\n\n")
             ->write("throw \$e;\n")
diff --git a/core/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php b/core/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php
index 6dd63e5..c1b3bce 100644
--- a/core/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php
+++ b/core/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php
@@ -45,7 +45,7 @@ protected function compileDisplayFooter(Twig_Compiler $compiler)
         parent::compileDisplayFooter($compiler);

         $compiler
-            ->write("protected function checkSecurity() {\n")
+            ->write("protected function checkSecurity()\n", "{\n")
             ->indent()
             ->write("\$this->env->getExtension('sandbox')->checkSecurity(\n")
             ->indent()
diff --git a/core/vendor/twig/twig/lib/Twig/NodeInterface.php b/core/vendor/twig/twig/lib/Twig/NodeInterface.php
index 29a84b0..e77782f 100644
--- a/core/vendor/twig/twig/lib/Twig/NodeInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/NodeInterface.php
@@ -22,9 +22,9 @@
      *
      * @param Twig_Compiler A Twig_Compiler instance
      */
-    function compile(Twig_Compiler $compiler);
+    public function compile(Twig_Compiler $compiler);

-    function getLine();
+    public function getLine();

-    function getNodeTag();
+    public function getNodeTag();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php b/core/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php
index 5b1249d..cc9a58b 100644
--- a/core/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php
+++ b/core/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php
@@ -22,6 +22,7 @@ class Twig_NodeVisitor_Escaper implements Twig_NodeVisitorInterface
     protected $safeAnalysis;
     protected $traverser;
     protected $defaultStrategy = false;
+    protected $safeVars = array();

     public function __construct()
     {
@@ -42,10 +43,13 @@ public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
             if ($env->hasExtension('escaper') && $defaultStrategy = $env->getExtension('escaper')->getDefaultStrategy($node->getAttribute('filename'))) {
                 $this->defaultStrategy = $defaultStrategy;
             }
+            $this->safeVars = array();
         } elseif ($node instanceof Twig_Node_AutoEscape) {
             $this->statusStack[] = $node->getAttribute('value');
         } elseif ($node instanceof Twig_Node_Block) {
             $this->statusStack[] = isset($this->blocks[$node->getAttribute('name')]) ? $this->blocks[$node->getAttribute('name')] : $this->needEscaping($env);
+        } elseif ($node instanceof Twig_Node_Import) {
+            $this->safeVars[] = $node->getNode('var')->getAttribute('name');
         }

         return $node;
@@ -63,6 +67,7 @@ public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
     {
         if ($node instanceof Twig_Node_Module) {
             $this->defaultStrategy = false;
+            $this->safeVars = array();
         } elseif ($node instanceof Twig_Node_Expression_Filter) {
             return $this->preEscapeFilterNode($node, $env);
         } elseif ($node instanceof Twig_Node_Print) {
@@ -129,6 +134,9 @@ protected function isSafeFor($type, Twig_NodeInterface $expression, $env)
             if (null === $this->traverser) {
                 $this->traverser = new Twig_NodeTraverser($env, array($this->safeAnalysis));
             }
+
+            $this->safeAnalysis->setSafeVars($this->safeVars);
+
             $this->traverser->traverse($expression);
             $safe = $this->safeAnalysis->getSafe($expression);
         }
diff --git a/core/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php b/core/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php
index 7cc2e22..7dc65c0 100644
--- a/core/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php
+++ b/core/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php
@@ -3,6 +3,12 @@
 class Twig_NodeVisitor_SafeAnalysis implements Twig_NodeVisitorInterface
 {
     protected $data = array();
+    protected $safeVars = array();
+
+    public function setSafeVars($safeVars)
+    {
+        $this->safeVars = $safeVars;
+    }

     public function getSafe(Twig_NodeInterface $node)
     {
@@ -85,6 +91,14 @@ public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
             } else {
                 $this->setSafe($node, array());
             }
+        } elseif ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name) {
+            $name = $node->getNode('node')->getAttribute('name');
+            // attributes on template instances are safe
+            if ('_self' == $name || in_array($name, $this->safeVars)) {
+                $this->setSafe($node, array('all'));
+            } else {
+                $this->setSafe($node, array());
+            }
         } else {
             $this->setSafe($node, array());
         }
diff --git a/core/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php b/core/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
index 61ef0c6..1957f8a 100644
--- a/core/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
+++ b/core/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
@@ -32,19 +32,6 @@ class Twig_NodeVisitor_Sandbox implements Twig_NodeVisitorInterface
      */
     public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
     {
-        // in a sandbox tag, only include tags are allowed
-        if ($node instanceof Twig_Node_Sandbox && !$node->getNode('body') instanceof Twig_Node_Include) {
-            foreach ($node->getNode('body') as $n) {
-                if ($n instanceof Twig_Node_Text && ctype_space($n->getAttribute('data'))) {
-                    continue;
-                }
-
-                if (!$n instanceof Twig_Node_Include) {
-                    throw new Twig_Error_Syntax('Only "include" tags are allowed within a "sandbox" section', $n->getLine());
-                }
-            }
-        }
-
         if ($node instanceof Twig_Node_Module) {
             $this->inAModule = true;
             $this->tags = array();
diff --git a/core/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php b/core/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
index e0123b5..f4974c6 100644
--- a/core/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
@@ -25,7 +25,7 @@
      *
      * @return Twig_NodeInterface The modified node
      */
-    function enterNode(Twig_NodeInterface $node, Twig_Environment $env);
+    public function enterNode(Twig_NodeInterface $node, Twig_Environment $env);

     /**
      * Called after child nodes are visited.
@@ -35,7 +35,7 @@ function enterNode(Twig_NodeInterface $node, Twig_Environment $env);
      *
      * @return Twig_NodeInterface The modified node
      */
-    function leaveNode(Twig_NodeInterface $node, Twig_Environment $env);
+    public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env);

     /**
      * Returns the priority for this visitor.
@@ -44,5 +44,5 @@ function leaveNode(Twig_NodeInterface $node, Twig_Environment $env);
      *
      * @return integer The priority level
      */
-    function getPriority();
+    public function getPriority();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Parser.php b/core/vendor/twig/twig/lib/Twig/Parser.php
index 8c578fd..1179913 100644
--- a/core/vendor/twig/twig/lib/Twig/Parser.php
+++ b/core/vendor/twig/twig/lib/Twig/Parser.php
@@ -29,8 +29,7 @@ class Twig_Parser implements Twig_ParserInterface
     protected $macros;
     protected $env;
     protected $reservedMacroNames;
-    protected $importedFunctions;
-    protected $tmpVarCount;
+    protected $importedSymbols;
     protected $traits;
     protected $embeddedTemplates = array();

@@ -51,7 +50,12 @@ public function getEnvironment()

     public function getVarName()
     {
-        return sprintf('__internal_%s_%d', substr($this->env->getTemplateClass($this->stream->getFilename()), strlen($this->env->getTemplateClassPrefix())), ++$this->tmpVarCount);
+        return sprintf('__internal_%s', hash('sha1', uniqid(mt_rand(), true), false));
+    }
+
+    public function getFilename()
+    {
+        return $this->stream->getFilename();
     }

     /**
@@ -68,8 +72,6 @@ public function parse(Twig_TokenStream $stream, $test = null, $dropNeedle = fals
         unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser']);
         $this->stack[] = $vars;

-        $this->tmpVarCount = 0;
-
         // tag handlers
         if (null === $this->handlers) {
             $this->handlers = $this->env->getTokenParsers();
@@ -91,7 +93,7 @@ public function parse(Twig_TokenStream $stream, $test = null, $dropNeedle = fals
         $this->macros = array();
         $this->traits = array();
         $this->blockStack = array();
-        $this->importedFunctions = array(array());
+        $this->importedSymbols = array(array());
         $this->embeddedTemplates = array();

         try {
@@ -103,14 +105,18 @@ public function parse(Twig_TokenStream $stream, $test = null, $dropNeedle = fals
                 }
             }
         } catch (Twig_Error_Syntax $e) {
-            if (null === $e->getTemplateFile()) {
-                $e->setTemplateFile($this->stream->getFilename());
+            if (!$e->getTemplateFile()) {
+                $e->setTemplateFile($this->getFilename());
+            }
+
+            if (!$e->getTemplateLine()) {
+                $e->setTemplateLine($this->stream->getCurrent()->getLine());
             }

             throw $e;
         }

-        $node = new Twig_Node_Module(new Twig_Node_Body(array($body)), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $this->stream->getFilename());
+        $node = new Twig_Node_Module(new Twig_Node_Body(array($body)), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $this->getFilename());

         $traverser = new Twig_NodeTraverser($this->env, $this->visitors);

@@ -147,7 +153,7 @@ public function subparse($test, $dropNeedle = false)
                     $token = $this->getCurrentToken();

                     if ($token->getType() !== Twig_Token::NAME_TYPE) {
-                        throw new Twig_Error_Syntax('A block must start with a tag name', $token->getLine(), $this->stream->getFilename());
+                        throw new Twig_Error_Syntax('A block must start with a tag name', $token->getLine(), $this->getFilename());
                     }

                     if (null !== $test && call_user_func($test, $token)) {
@@ -165,7 +171,12 @@ public function subparse($test, $dropNeedle = false)
                     $subparser = $this->handlers->getTokenParser($token->getValue());
                     if (null === $subparser) {
                         if (null !== $test) {
-                            throw new Twig_Error_Syntax(sprintf('Unexpected tag name "%s" (expecting closing tag for the "%s" tag defined near line %s)', $token->getValue(), $test[0]->getTag(), $lineno), $token->getLine(), $this->stream->getFilename());
+                            $error = sprintf('Unexpected tag name "%s"', $token->getValue());
+                            if (is_array($test) && isset($test[0]) && $test[0] instanceof Twig_TokenParserInterface) {
+                                $error .= sprintf(' (expecting closing tag for the "%s" tag defined near line %s)', $test[0]->getTag(), $lineno);
+                            }
+
+                            throw new Twig_Error_Syntax($error, $token->getLine(), $this->getFilename());
                         }

                         $message = sprintf('Unknown tag name "%s"', $token->getValue());
@@ -173,7 +184,7 @@ public function subparse($test, $dropNeedle = false)
                             $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
                         }

-                        throw new Twig_Error_Syntax($message, $token->getLine(), $this->stream->getFilename());
+                        throw new Twig_Error_Syntax($message, $token->getLine(), $this->getFilename());
                     }

                     $this->stream->next();
@@ -185,7 +196,7 @@ public function subparse($test, $dropNeedle = false)
                     break;

                 default:
-                    throw new Twig_Error_Syntax('Lexer or parser ended up in unsupported state.', -1, $this->stream->getFilename());
+                    throw new Twig_Error_Syntax('Lexer or parser ended up in unsupported state.', 0, $this->getFilename());
             }
         }

@@ -257,7 +268,7 @@ public function setMacro($name, Twig_Node_Macro $node)
         }

         if (in_array($name, $this->reservedMacroNames)) {
-            throw new Twig_Error_Syntax(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword', $name), $node->getLine());
+            throw new Twig_Error_Syntax(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword', $name), $node->getLine(), $this->getFilename());
         }

         $this->macros[$name] = $node;
@@ -275,38 +286,38 @@ public function hasTraits()

     public function embedTemplate(Twig_Node_Module $template)
     {
-        $template->setIndex(count($this->embeddedTemplates) + 1);
+        $template->setIndex(mt_rand());

         $this->embeddedTemplates[] = $template;
     }

-    public function addImportedFunction($alias, $name, Twig_Node_Expression $node)
+    public function addImportedSymbol($type, $alias, $name = null, Twig_Node_Expression $node = null)
     {
-        $this->importedFunctions[0][$alias] = array('name' => $name, 'node' => $node);
+        $this->importedSymbols[0][$type][$alias] = array('name' => $name, 'node' => $node);
     }

-    public function getImportedFunction($alias)
+    public function getImportedSymbol($type, $alias)
     {
-        foreach ($this->importedFunctions as $functions) {
-            if (isset($functions[$alias])) {
-                return $functions[$alias];
+        foreach ($this->importedSymbols as $functions) {
+            if (isset($functions[$type][$alias])) {
+                return $functions[$type][$alias];
             }
         }
     }

     public function isMainScope()
     {
-        return 1 === count($this->importedFunctions);
+        return 1 === count($this->importedSymbols);
     }

     public function pushLocalScope()
     {
-        array_unshift($this->importedFunctions, array());
+        array_unshift($this->importedSymbols, array());
     }

     public function popLocalScope()
     {
-        array_shift($this->importedFunctions);
+        array_shift($this->importedSymbols);
     }

     /**
@@ -358,10 +369,10 @@ protected function filterBodyNodes(Twig_NodeInterface $node)
             (!$node instanceof Twig_Node_Text && !$node instanceof Twig_Node_BlockReference && $node instanceof Twig_NodeOutputInterface)
         ) {
             if (false !== strpos((string) $node, chr(0xEF).chr(0xBB).chr(0xBF))) {
-                throw new Twig_Error_Syntax('A template that extends another one cannot have a body but a byte order mark (BOM) has been detected; it must be removed.', $node->getLine(), $this->stream->getFilename());
+                throw new Twig_Error_Syntax('A template that extends another one cannot have a body but a byte order mark (BOM) has been detected; it must be removed.', $node->getLine(), $this->getFilename());
             }

-            throw new Twig_Error_Syntax('A template that extends another one cannot have a body.', $node->getLine(), $this->stream->getFilename());
+            throw new Twig_Error_Syntax('A template that extends another one cannot have a body.', $node->getLine(), $this->getFilename());
         }

         // bypass "set" nodes as they "capture" the output
diff --git a/core/vendor/twig/twig/lib/Twig/ParserInterface.php b/core/vendor/twig/twig/lib/Twig/ParserInterface.php
index 9659845..4de3999 100644
--- a/core/vendor/twig/twig/lib/Twig/ParserInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/ParserInterface.php
@@ -24,5 +24,5 @@
      *
      * @return Twig_Node_Module A node tree
      */
-    function parse(Twig_TokenStream $stream);
+    public function parse(Twig_TokenStream $stream);
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php b/core/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php
index d5015af..655b16b 100644
--- a/core/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php
@@ -17,9 +17,9 @@
  */
 interface Twig_Sandbox_SecurityPolicyInterface
 {
-    function checkSecurity($tags, $filters, $functions);
+    public function checkSecurity($tags, $filters, $functions);

-    function checkMethodAllowed($obj, $method);
+    public function checkMethodAllowed($obj, $method);

-    function checkPropertyAllowed($obj, $method);
+    public function checkPropertyAllowed($obj, $method);
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Template.php b/core/vendor/twig/twig/lib/Twig/Template.php
index 7ecdba4..a078627 100644
--- a/core/vendor/twig/twig/lib/Twig/Template.php
+++ b/core/vendor/twig/twig/lib/Twig/Template.php
@@ -18,7 +18,7 @@
  */
 abstract class Twig_Template implements Twig_TemplateInterface
 {
-    static protected $cache = array();
+    protected static $cache = array();

     protected $parent;
     protected $parents;
@@ -264,6 +264,17 @@ protected function displayWithErrorHandling(array $context, array $blocks = arra
         try {
             $this->doDisplay($context, $blocks);
         } catch (Twig_Error $e) {
+            if (!$e->getTemplateFile()) {
+                $e->setTemplateFile($this->getTemplateName());
+            }
+
+            // this is mostly useful for Twig_Error_Loader exceptions
+            // see Twig_Error_Loader
+            if (false === $e->getTemplateLine()) {
+                $e->setTemplateLine(-1);
+                $e->guess();
+            }
+
             throw $e;
         } catch (Exception $e) {
             throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, null, $e);
@@ -284,7 +295,7 @@ protected function displayWithErrorHandling(array $context, array $blocks = arra
      * This method is for internal use only and should never be called
      * directly.
      *
-     * This method should not be overriden in a sub-class as this is an
+     * This method should not be overridden in a sub-class as this is an
      * implementation detail that has been introduced to optimize variable
      * access for versions of PHP before 5.4. This is not a way to override
      * the way to get a variable value.
@@ -304,7 +315,7 @@ protected function displayWithErrorHandling(array $context, array $blocks = arra
                 return null;
             }

-            throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $item));
+            throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $item), -1, $this->getTemplateName());
         }

         return $context[$item];
@@ -350,11 +361,11 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ
                 }

                 if (is_object($object)) {
-                    throw new Twig_Error_Runtime(sprintf('Key "%s" in object (with ArrayAccess) of type "%s" does not exist', $item, get_class($object)));
+                    throw new Twig_Error_Runtime(sprintf('Key "%s" in object (with ArrayAccess) of type "%s" does not exist', $item, get_class($object)), -1, $this->getTemplateName());
                 } elseif (is_array($object)) {
-                    throw new Twig_Error_Runtime(sprintf('Key "%s" for array with keys "%s" does not exist', $item, implode(', ', array_keys($object))));
+                    throw new Twig_Error_Runtime(sprintf('Key "%s" for array with keys "%s" does not exist', $item, implode(', ', array_keys($object))), -1, $this->getTemplateName());
                 } else {
-                    throw new Twig_Error_Runtime(sprintf('Impossible to access a key ("%s") on a "%s" variable', $item, gettype($object)));
+                    throw new Twig_Error_Runtime(sprintf('Impossible to access a key ("%s") on a "%s" variable', $item, gettype($object)), -1, $this->getTemplateName());
                 }
             }
         }
@@ -368,7 +379,7 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ
                 return null;
             }

-            throw new Twig_Error_Runtime(sprintf('Item "%s" for "%s" does not exist', $item, is_array($object) ? 'Array' : $object));
+            throw new Twig_Error_Runtime(sprintf('Item "%s" for "%s" does not exist', $item, is_array($object) ? 'Array' : $object), -1, $this->getTemplateName());
         }

         $class = get_class($object);
@@ -411,7 +422,7 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ
                 return null;
             }

-            throw new Twig_Error_Runtime(sprintf('Method "%s" for object "%s" does not exist', $item, get_class($object)));
+            throw new Twig_Error_Runtime(sprintf('Method "%s" for object "%s" does not exist', $item, get_class($object)), -1, $this->getTemplateName());
         }

         if ($isDefinedTest) {
@@ -424,7 +435,8 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ

         $ret = call_user_func_array(array($object, $method), $arguments);

-        // hack to be removed when macro calls are refactored
+        // useful when calling a template method from a template
+        // this is not supported but unfortunately heavily used in the Symfony profiler
         if ($object instanceof Twig_TemplateInterface) {
             return $ret === '' ? '' : new Twig_Markup($ret, $this->env->getCharset());
         }
@@ -435,7 +447,7 @@ protected function getAttribute($object, $item, array $arguments = array(), $typ
     /**
      * This method is only useful when testing Twig. Do not use it.
      */
-    static public function clearCache()
+    public static function clearCache()
     {
         self::$cache = array();
     }
diff --git a/core/vendor/twig/twig/lib/Twig/TemplateInterface.php b/core/vendor/twig/twig/lib/Twig/TemplateInterface.php
index 08da116..5d7b027 100644
--- a/core/vendor/twig/twig/lib/Twig/TemplateInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/TemplateInterface.php
@@ -28,7 +28,7 @@
      *
      * @return string The rendered template
      */
-    function render(array $context);
+    public function render(array $context);

     /**
      * Displays the template with the given context.
@@ -36,12 +36,12 @@ function render(array $context);
      * @param array $context An array of parameters to pass to the template
      * @param array $blocks  An array of blocks to pass to the template
      */
-    function display(array $context, array $blocks = array());
+    public function display(array $context, array $blocks = array());

     /**
      * Returns the bound environment for this template.
      *
      * @return Twig_Environment The current environment
      */
-    function getEnvironment();
+    public function getEnvironment();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php b/core/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
new file mode 100644
index 0000000..2973dc5
--- /dev/null
+++ b/core/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
@@ -0,0 +1,155 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2010 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Integration test helper
+ *
+ * @package twig
+ * @author  Fabien Potencier <fabien@symfony.com>
+ * @author  Karma Dordrak <drak@zikula.org>
+ */
+abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
+{
+    abstract protected function getExtensions();
+    abstract protected function getFixturesDir();
+
+    /**
+     * @dataProvider getTests
+     */
+    public function testIntegration($file, $message, $condition, $templates, $exception, $outputs)
+    {
+        $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs);
+    }
+
+    public function getTests()
+    {
+        $fixturesDir = realpath($this->getFixturesDir());
+        $tests = array();
+
+        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fixturesDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
+            if (!preg_match('/\.test$/', $file)) {
+                continue;
+            }
+
+            $test = file_get_contents($file->getRealpath());
+
+            if (preg_match('/
+                    --TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) {
+                $message = $match[1];
+                $condition = $match[2];
+                $templates = $this->parseTemplates($match[3]);
+                $exception = $match[5];
+                $outputs = array(array(null, $match[4], null, ''));
+            } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) {
+                $message = $match[1];
+                $condition = $match[2];
+                $templates = $this->parseTemplates($match[3]);
+                $exception = false;
+                preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, PREG_SET_ORDER);
+            } else {
+                throw new InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file)));
+            }
+
+            $tests[] = array(str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs);
+        }
+
+        return $tests;
+    }
+
+    protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs)
+    {
+        if ($condition) {
+            eval('$ret = '.$condition.';');
+            if (!$ret) {
+                $this->markTestSkipped($condition);
+            }
+        }
+
+        $loader = new Twig_Loader_Array($templates);
+
+        foreach ($outputs as $match) {
+            $config = array_merge(array(
+                'cache' => false,
+                'strict_variables' => true,
+            ), $match[2] ? eval($match[2].';') : array());
+            $twig = new Twig_Environment($loader, $config);
+            $twig->addGlobal('global', 'global');
+            foreach ($this->getExtensions() as $extension) {
+                $twig->addExtension($extension);
+            }
+
+            try {
+                $template = $twig->loadTemplate('index.twig');
+            } catch (Exception $e) {
+                if (false !== $exception) {
+                    $this->assertEquals(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage())));
+
+                    return;
+                }
+
+                if ($e instanceof Twig_Error_Syntax) {
+                    $e->setTemplateFile($file);
+
+                    throw $e;
+                }
+
+                throw new Twig_Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e);
+            }
+
+            try {
+                $output = trim($template->render(eval($match[1].';')), "\n ");
+            } catch (Exception $e) {
+                if (false !== $exception) {
+                    $this->assertEquals(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage())));
+
+                    return;
+                }
+
+                if ($e instanceof Twig_Error_Syntax) {
+                    $e->setTemplateFile($file);
+                } else {
+                    $e = new Twig_Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e);
+                }
+
+                $output = trim(sprintf('%s: %s', get_class($e), $e->getMessage()));
+            }
+
+            if (false !== $exception) {
+                list($class, ) = explode(':', $exception);
+                $this->assertThat(NULL, new PHPUnit_Framework_Constraint_Exception($class));
+            }
+
+            $expected = trim($match[3], "\n ");
+
+            if ($expected != $output) {
+                echo 'Compiled template that failed:';
+
+                foreach (array_keys($templates) as $name) {
+                    echo "Template: $name\n";
+                    $source = $loader->getSource($name);
+                    echo $twig->compile($twig->parse($twig->tokenize($source, $name)));
+                }
+            }
+            $this->assertEquals($expected, $output, $message.' (in '.$file.')');
+        }
+    }
+
+    protected static function parseTemplates($test)
+    {
+        $templates = array();
+        preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, PREG_SET_ORDER);
+        foreach ($matches as $match) {
+            $templates[($match[1] ? $match[1] : 'index.twig')] = $match[2];
+        }
+
+        return $templates;
+    }
+}
diff --git a/core/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php b/core/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php
new file mode 100644
index 0000000..b15c85f
--- /dev/null
+++ b/core/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php
@@ -0,0 +1,58 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+abstract class Twig_Test_NodeTestCase extends PHPUnit_Framework_TestCase
+{
+    abstract public function getTests();
+
+    /**
+     * @dataProvider getTests
+     */
+    public function testCompile($node, $source, $environment = null)
+    {
+        $this->assertNodeCompilation($source, $node, $environment);
+    }
+
+    public function assertNodeCompilation($source, Twig_Node $node, Twig_Environment $environment = null)
+    {
+        $compiler = $this->getCompiler($environment);
+        $compiler->compile($node);
+
+        $this->assertEquals($source, trim($compiler->getSource()));
+    }
+
+    protected function getCompiler(Twig_Environment $environment = null)
+    {
+        return new Twig_Compiler(null === $environment ? $this->getEnvironment() : $environment);
+    }
+
+    protected function getEnvironment()
+    {
+        return new Twig_Environment();
+    }
+
+    protected function getVariableGetter($name)
+    {
+        if (version_compare(phpversion(), '5.4.0RC1', '>=')) {
+            return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
+        }
+
+        return sprintf('$this->getContext($context, "%s")', $name);
+    }
+
+    protected function getAttributeGetter()
+    {
+        if (function_exists('twig_template_get_attributes')) {
+            return 'twig_template_get_attributes($this, ';
+        }
+
+        return '$this->getAttribute(';
+    }
+}
diff --git a/core/vendor/twig/twig/lib/Twig/TestInterface.php b/core/vendor/twig/twig/lib/Twig/TestInterface.php
index c2ff725..96db428 100644
--- a/core/vendor/twig/twig/lib/Twig/TestInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/TestInterface.php
@@ -22,5 +22,5 @@
      *
      * @return string The PHP code for the test
      */
-    function compile();
+    public function compile();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/Token.php b/core/vendor/twig/twig/lib/Twig/Token.php
index 918bb91..7f58e56 100644
--- a/core/vendor/twig/twig/lib/Twig/Token.php
+++ b/core/vendor/twig/twig/lib/Twig/Token.php
@@ -126,7 +126,7 @@ public function getValue()
      *
      * @return string The string representation
      */
-    static public function typeToString($type, $short = false, $line = -1)
+    public static function typeToString($type, $short = false, $line = -1)
     {
         switch ($type) {
             case self::EOF_TYPE:
@@ -169,7 +169,7 @@ static public function typeToString($type, $short = false, $line = -1)
                 $name = 'INTERPOLATION_END_TYPE';
                 break;
             default:
-                throw new Twig_Error_Syntax(sprintf('Token of type "%s" does not exist.', $type), $line);
+                throw new LogicException(sprintf('Token of type "%s" does not exist.', $type));
         }

         return $short ? $name : 'Twig_Token::'.$name;
@@ -183,7 +183,7 @@ static public function typeToString($type, $short = false, $line = -1)
      *
      * @return string The string representation
      */
-    static public function typeToEnglish($type, $line = -1)
+    public static function typeToEnglish($type, $line = -1)
     {
         switch ($type) {
             case self::EOF_TYPE:
@@ -213,7 +213,7 @@ static public function typeToEnglish($type, $line = -1)
             case self::INTERPOLATION_END_TYPE:
                 return 'end of string interpolation';
             default:
-                throw new Twig_Error_Syntax(sprintf('Token of type "%s" does not exist.', $type), $line);
+                throw new LogicException(sprintf('Token of type "%s" does not exist.', $type));
         }
     }
 }
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php b/core/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php
index 0040845..2756028 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php
@@ -39,13 +39,14 @@ class Twig_TokenParser_AutoEscape extends Twig_TokenParser
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
+        $stream = $this->parser->getStream();

-        if ($this->parser->getStream()->test(Twig_Token::BLOCK_END_TYPE)) {
+        if ($stream->test(Twig_Token::BLOCK_END_TYPE)) {
             $value = 'html';
         } else {
             $expr = $this->parser->getExpressionParser()->parseExpression();
             if (!$expr instanceof Twig_Node_Expression_Constant) {
-                throw new Twig_Error_Syntax('An escaping strategy must be a string or a Boolean.', $lineno);
+                throw new Twig_Error_Syntax('An escaping strategy must be a string or a Boolean.', $stream->getCurrent()->getLine(), $stream->getFilename());
             }
             $value = $expr->getAttribute('value');

@@ -55,18 +56,18 @@ public function parse(Twig_Token $token)
                 $value = 'html';
             }

-            if ($compat && $this->parser->getStream()->test(Twig_Token::NAME_TYPE)) {
+            if ($compat && $stream->test(Twig_Token::NAME_TYPE)) {
                 if (false === $value) {
-                    throw new Twig_Error_Syntax('Unexpected escaping strategy as you set autoescaping to false.', $lineno);
+                    throw new Twig_Error_Syntax('Unexpected escaping strategy as you set autoescaping to false.', $stream->getCurrent()->getLine(), $stream->getFilename());
                 }

-                $value = $this->parser->getStream()->next()->getValue();
+                $value = $stream->next()->getValue();
             }
         }

-        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+        $stream->expect(Twig_Token::BLOCK_END_TYPE);
         $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true);
-        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+        $stream->expect(Twig_Token::BLOCK_END_TYPE);

         return new Twig_Node_AutoEscape($value, $body, $lineno, $this->getTag());
     }
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/Block.php b/core/vendor/twig/twig/lib/Twig/TokenParser/Block.php
index 994078e..a2e017f 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/Block.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/Block.php
@@ -35,7 +35,7 @@ public function parse(Twig_Token $token)
         $stream = $this->parser->getStream();
         $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue();
         if ($this->parser->hasBlock($name)) {
-            throw new Twig_Error_Syntax(sprintf("The block '$name' has already been defined line %d", $this->parser->getBlock($name)->getLine()), $lineno);
+            throw new Twig_Error_Syntax(sprintf("The block '$name' has already been defined line %d", $this->parser->getBlock($name)->getLine()), $stream->getCurrent()->getLine(), $stream->getFilename());
         }
         $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node(array()), $lineno));
         $this->parser->pushLocalScope();
@@ -49,7 +49,7 @@ public function parse(Twig_Token $token)
                 $value = $stream->next()->getValue();

                 if ($value != $name) {
-                    throw new Twig_Error_Syntax(sprintf("Expected endblock for block '$name' (but %s given)", $value), $lineno);
+                    throw new Twig_Error_Syntax(sprintf("Expected endblock for block '$name' (but %s given)", $value), $stream->getCurrent()->getLine(), $stream->getFilename());
                 }
             }
         } else {
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/Extends.php b/core/vendor/twig/twig/lib/Twig/TokenParser/Extends.php
index 54f49ad..110bc8b 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/Extends.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/Extends.php
@@ -29,11 +29,11 @@ class Twig_TokenParser_Extends extends Twig_TokenParser
     public function parse(Twig_Token $token)
     {
         if (!$this->parser->isMainScope()) {
-            throw new Twig_Error_Syntax('Cannot extend from a block', $token->getLine());
+            throw new Twig_Error_Syntax('Cannot extend from a block', $token->getLine(), $this->parser->getFilename());
         }

         if (null !== $this->parser->getParent()) {
-            throw new Twig_Error_Syntax('Multiple extends tags are forbidden', $token->getLine());
+            throw new Twig_Error_Syntax('Multiple extends tags are forbidden', $token->getLine(), $this->parser->getFilename());
         }
         $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());

diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/From.php b/core/vendor/twig/twig/lib/Twig/TokenParser/From.php
index 16999bc..a54054d 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/From.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/From.php
@@ -56,7 +56,7 @@ public function parse(Twig_Token $token)
         $node = new Twig_Node_Import($macro, new Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), $token->getLine(), $this->getTag());

         foreach ($targets as $name => $alias) {
-            $this->parser->addImportedFunction($alias, 'get'.$name, $node->getNode('var'));
+            $this->parser->addImportedSymbol('function', $alias, 'get'.$name, $node->getNode('var'));
         }

         return $node;
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/If.php b/core/vendor/twig/twig/lib/Twig/TokenParser/If.php
index 1a694af..3d7d1f5 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/If.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/If.php
@@ -36,22 +36,23 @@ public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
         $expr = $this->parser->getExpressionParser()->parseExpression();
-        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+        $stream = $this->parser->getStream();
+        $stream->expect(Twig_Token::BLOCK_END_TYPE);
         $body = $this->parser->subparse(array($this, 'decideIfFork'));
         $tests = array($expr, $body);
         $else = null;

         $end = false;
         while (!$end) {
-            switch ($this->parser->getStream()->next()->getValue()) {
+            switch ($stream->next()->getValue()) {
                 case 'else':
-                    $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+                    $stream->expect(Twig_Token::BLOCK_END_TYPE);
                     $else = $this->parser->subparse(array($this, 'decideIfEnd'));
                     break;

                 case 'elseif':
                     $expr = $this->parser->getExpressionParser()->parseExpression();
-                    $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+                    $stream->expect(Twig_Token::BLOCK_END_TYPE);
                     $body = $this->parser->subparse(array($this, 'decideIfFork'));
                     $tests[] = $expr;
                     $tests[] = $body;
@@ -62,11 +63,11 @@ public function parse(Twig_Token $token)
                     break;

                 default:
-                    throw new Twig_Error_Syntax(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d)', $lineno), -1);
+                    throw new Twig_Error_Syntax(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d)', $lineno), $stream->getCurrent()->getLine(), $stream->getFilename());
             }
         }

-        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+        $stream->expect(Twig_Token::BLOCK_END_TYPE);

         return new Twig_Node_If(new Twig_Node($tests), $else, $lineno, $this->getTag());
     }
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/Import.php b/core/vendor/twig/twig/lib/Twig/TokenParser/Import.php
index 5219289..e7050c7 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/Import.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/Import.php
@@ -32,6 +32,8 @@ public function parse(Twig_Token $token)
         $var = new Twig_Node_Expression_AssignName($this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue(), $token->getLine());
         $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);

+        $this->parser->addImportedSymbol('template', $var->getAttribute('name'));
+
         return new Twig_Node_Import($macro, $var, $token->getLine(), $this->getTag());
     }

diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/Macro.php b/core/vendor/twig/twig/lib/Twig/TokenParser/Macro.php
index ffd5848..de10059 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/Macro.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/Macro.php
@@ -30,22 +30,23 @@ class Twig_TokenParser_Macro extends Twig_TokenParser
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
-        $name = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue();
+        $stream = $this->parser->getStream();
+        $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue();

         $arguments = $this->parser->getExpressionParser()->parseArguments();

-        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+        $stream->expect(Twig_Token::BLOCK_END_TYPE);
         $this->parser->pushLocalScope();
         $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true);
-        if ($this->parser->getStream()->test(Twig_Token::NAME_TYPE)) {
-            $value = $this->parser->getStream()->next()->getValue();
+        if ($stream->test(Twig_Token::NAME_TYPE)) {
+            $value = $stream->next()->getValue();

             if ($value != $name) {
-                throw new Twig_Error_Syntax(sprintf("Expected endmacro for macro '$name' (but %s given)", $value), $lineno);
+                throw new Twig_Error_Syntax(sprintf("Expected endmacro for macro '$name' (but %s given)", $value), $stream->getCurrent()->getLine(), $stream->getFilename());
             }
         }
         $this->parser->popLocalScope();
-        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+        $stream->expect(Twig_Token::BLOCK_END_TYPE);

         $this->parser->setMacro($name, new Twig_Node_Macro($name, new Twig_Node_Body(array($body)), $arguments, $lineno, $this->getTag()));

diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php b/core/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php
index 0277c70..9457325 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php
@@ -35,6 +35,19 @@ public function parse(Twig_Token $token)
         $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true);
         $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);

+        // in a sandbox tag, only include tags are allowed
+        if (!$body instanceof Twig_Node_Include) {
+            foreach ($body as $node) {
+                if ($node instanceof Twig_Node_Text && ctype_space($node->getAttribute('data'))) {
+                    continue;
+                }
+
+                if (!$node instanceof Twig_Node_Include) {
+                    throw new Twig_Error_Syntax('Only "include" tags are allowed within a "sandbox" section', $node->getLine(), $this->parser->getFilename());
+                }
+            }
+        }
+
         return new Twig_Node_Sandbox($body, $token->getLine(), $this->getTag());
     }

diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/Set.php b/core/vendor/twig/twig/lib/Twig/TokenParser/Set.php
index 3b4479c..6dbd1db 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/Set.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/Set.php
@@ -49,13 +49,13 @@ public function parse(Twig_Token $token)
             $stream->expect(Twig_Token::BLOCK_END_TYPE);

             if (count($names) !== count($values)) {
-                throw new Twig_Error_Syntax("When using set, you must have the same number of variables and assignements.", $lineno);
+                throw new Twig_Error_Syntax("When using set, you must have the same number of variables and assignements.", $stream->getCurrent()->getLine(), $stream->getFilename());
             }
         } else {
             $capture = true;

             if (count($names) > 1) {
-                throw new Twig_Error_Syntax("When using set with a block, you cannot have a multi-target.", $lineno);
+                throw new Twig_Error_Syntax("When using set with a block, you cannot have a multi-target.", $stream->getCurrent()->getLine(), $stream->getFilename());
             }

             $stream->expect(Twig_Token::BLOCK_END_TYPE);
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParser/Use.php b/core/vendor/twig/twig/lib/Twig/TokenParser/Use.php
index beafc80..85f084a 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParser/Use.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParser/Use.php
@@ -35,13 +35,12 @@ class Twig_TokenParser_Use extends Twig_TokenParser
     public function parse(Twig_Token $token)
     {
         $template = $this->parser->getExpressionParser()->parseExpression();
+        $stream = $this->parser->getStream();

         if (!$template instanceof Twig_Node_Expression_Constant) {
-            throw new Twig_Error_Syntax('The template references in a "use" statement must be a string.', $token->getLine());
+            throw new Twig_Error_Syntax('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getFilename());
         }

-        $stream = $this->parser->getStream();
-
         $targets = array();
         if ($stream->test('with')) {
             $stream->next();
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParserBroker.php b/core/vendor/twig/twig/lib/Twig/TokenParserBroker.php
index b214e99..f2c27ee 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParserBroker.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParserBroker.php
@@ -32,13 +32,13 @@ public function __construct($parsers = array(), $brokers = array())
     {
         foreach ($parsers as $parser) {
             if (!$parser instanceof Twig_TokenParserInterface) {
-                throw new Twig_Error('$parsers must a an array of Twig_TokenParserInterface');
+                throw new LogicException('$parsers must a an array of Twig_TokenParserInterface');
             }
             $this->parsers[$parser->getTag()] = $parser;
         }
         foreach ($brokers as $broker) {
             if (!$broker instanceof Twig_TokenParserBrokerInterface) {
-                throw new Twig_Error('$brokers must a an array of Twig_TokenParserBrokerInterface');
+                throw new LogicException('$brokers must a an array of Twig_TokenParserBrokerInterface');
             }
             $this->brokers[] = $broker;
         }
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php b/core/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php
index c2df729..b8e3c23 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php
@@ -27,19 +27,19 @@
      *
      * @return null|Twig_TokenParserInterface A Twig_TokenParserInterface or null if no suitable TokenParser was found
      */
-    function getTokenParser($tag);
+    public function getTokenParser($tag);

     /**
      * Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of.
      *
      * @param Twig_ParserInterface $parser A Twig_ParserInterface interface
      */
-    function setParser(Twig_ParserInterface $parser);
+    public function setParser(Twig_ParserInterface $parser);

     /**
      * Gets the Twig_ParserInterface.
      *
      * @return null|Twig_ParserInterface A Twig_ParserInterface instance or null
      */
-    function getParser();
+    public function getParser();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/TokenParserInterface.php b/core/vendor/twig/twig/lib/Twig/TokenParserInterface.php
index 192c018..2b6c2ac 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenParserInterface.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenParserInterface.php
@@ -22,7 +22,7 @@
      *
      * @param $parser A Twig_Parser instance
      */
-    function setParser(Twig_Parser $parser);
+    public function setParser(Twig_Parser $parser);

     /**
      * Parses a token and returns a node.
@@ -31,12 +31,12 @@ function setParser(Twig_Parser $parser);
      *
      * @return Twig_NodeInterface A Twig_NodeInterface instance
      */
-    function parse(Twig_Token $token);
+    public function parse(Twig_Token $token);

     /**
      * Gets the tag name associated with this token parser.
      *
      * @return string The tag name
      */
-    function getTag();
+    public function getTag();
 }
diff --git a/core/vendor/twig/twig/lib/Twig/TokenStream.php b/core/vendor/twig/twig/lib/Twig/TokenStream.php
index 5708091..292c11f 100644
--- a/core/vendor/twig/twig/lib/Twig/TokenStream.php
+++ b/core/vendor/twig/twig/lib/Twig/TokenStream.php
@@ -58,7 +58,7 @@ public function injectTokens(array $tokens)
     public function next()
     {
         if (!isset($this->tokens[++$this->current])) {
-            throw new Twig_Error_Syntax('Unexpected end of template', -1, $this->filename);
+            throw new Twig_Error_Syntax('Unexpected end of template', $this->token[$this->current - 1]->getLine(), $this->filename);
         }

         return $this->tokens[$this->current - 1];
@@ -97,7 +97,7 @@ public function expect($type, $value = null, $message = null)
     public function look($number = 1)
     {
         if (!isset($this->tokens[$this->current + $number])) {
-            throw new Twig_Error_Syntax('Unexpected end of template', -1, $this->filename);
+            throw new Twig_Error_Syntax('Unexpected end of template', $this->token[$this->current + $number - 1]->getLine(), $this->filename);
         }

         return $this->tokens[$this->current + $number];
diff --git a/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php b/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php
index bb31690..76731ea 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php
@@ -25,7 +25,7 @@ public function testAutoescapeOption()
         ));

         $this->assertEquals('foo&lt;br/ &gt; foo&lt;br/ &gt;', $twig->render('html', array('foo' => 'foo<br/ >')));
-        $this->assertEquals('foo\x3cbr\x2f \x3e foo\x3cbr\x2f \x3e', $twig->render('js', array('bar' => 'foo<br/ >')));
+        $this->assertEquals('foo\x3Cbr\x2F\x20\x3E foo\x3Cbr\x2F\x20\x3E', $twig->render('js', array('bar' => 'foo<br/ >')));
     }

     public function escapingStrategyCallback($filename)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/ErrorTest.php b/core/vendor/twig/twig/test/Twig/Tests/ErrorTest.php
index d0e48be..9b28697 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/ErrorTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/ErrorTest.php
@@ -78,7 +78,6 @@ public function testTwigExceptionAddsFileAndLineWhenMissingWithInheritance()
         $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false));

         $template = $twig->loadTemplate('index');
-
         try {
             $template->render(array());

@@ -88,6 +87,66 @@ public function testTwigExceptionAddsFileAndLineWhenMissingWithInheritance()
             $this->assertEquals(3, $e->getTemplateLine());
             $this->assertEquals('index', $e->getTemplateFile());
         }
+
+        try {
+            $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo()));
+
+            $this->fail();
+        } catch (Twig_Error_Runtime $e) {
+            $this->assertEquals('An exception has been thrown during the rendering of a template ("Runtime error...") in "index" at line 3.', $e->getMessage());
+            $this->assertEquals(3, $e->getTemplateLine());
+            $this->assertEquals('index', $e->getTemplateFile());
+        }
+    }
+
+    public function testTwigExceptionAddsFileAndLineWhenMissingWithInheritanceAgain()
+    {
+        $loader = new Twig_Loader_Array(array(
+            'index' => "{% extends 'base' %}
+            {% block content %}
+                {{ parent() }}
+            {% endblock %}",
+            'base' => '{% block content %}{{ foo }}{% endblock %}'
+        ));
+        $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false));
+
+        $template = $twig->loadTemplate('index');
+        try {
+            $template->render(array());
+
+            $this->fail();
+        } catch (Twig_Error_Runtime $e) {
+            $this->assertEquals('Variable "foo" does not exist in "base" at line 1', $e->getMessage());
+            $this->assertEquals(1, $e->getTemplateLine());
+            $this->assertEquals('base', $e->getTemplateFile());
+        }
+    }
+
+    public function testTwigExceptionAddsFileAndLineWhenMissingWithInheritanceOnDisk()
+    {
+        $loader = new Twig_Loader_Filesystem(dirname(__FILE__).'/Fixtures/errors');
+        $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false));
+
+        $template = $twig->loadTemplate('index.html');
+        try {
+            $template->render(array());
+
+            $this->fail();
+        } catch (Twig_Error_Runtime $e) {
+            $this->assertEquals('Variable "foo" does not exist in "index.html" at line 3', $e->getMessage());
+            $this->assertEquals(3, $e->getTemplateLine());
+            $this->assertEquals('index.html', $e->getTemplateFile());
+        }
+
+        try {
+            $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo()));
+
+            $this->fail();
+        } catch (Twig_Error_Runtime $e) {
+            $this->assertEquals('An exception has been thrown during the rendering of a template ("Runtime error...") in "index.html" at line 3.', $e->getMessage());
+            $this->assertEquals(3, $e->getTemplateLine());
+            $this->assertEquals('index.html', $e->getTemplateFile());
+        }
     }
 }

diff --git a/core/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php b/core/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php
index 0768c65..72253c8 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php
@@ -11,7 +11,7 @@

 class Twig_Tests_Extension_SandboxTest extends PHPUnit_Framework_TestCase
 {
-    static protected $params, $templates;
+    protected static $params, $templates;

     public function setUp()
     {
@@ -156,10 +156,13 @@ public function testSandboxLocallySetForAnInclude()
     public function testMacrosInASandbox()
     {
         $twig = $this->getEnvironment(true, array('autoescape' => true), array('index' => <<<EOF
-{% macro test(text) %}<p>{{ text }}</p>{% endmacro %}
-{{ _self.test('username') }}
+{%- import _self as macros %}
+
+{%- macro test(text) %}<p>{{ text }}</p>{% endmacro %}
+
+{{- macros.test('username') }}
 EOF
-        ), array('macro'), array('escape'));
+        ), array('macro', 'import'), array('escape'));

         $this->assertEquals('<p>username</p>', $twig->loadTemplate('index')->render(array()));
     }
@@ -177,11 +180,11 @@ protected function getEnvironment($sandboxed, $options, $templates, $tags = arra

 class FooObject
 {
-    static public $called = array('__toString' => 0, 'foo' => 0, 'getFooBar' => 0);
+    public static $called = array('__toString' => 0, 'foo' => 0, 'getFooBar' => 0);

     public $bar = 'bar';

-    static public function reset()
+    public static function reset()
     {
         self::$called = array('__toString' => 0, 'foo' => 0, 'getFooBar' => 0);
     }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php b/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php
index 2c77c06..8efc948 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php
@@ -10,7 +10,7 @@ public function setUp()
     {
         $this->tmpDir = sys_get_temp_dir().'/TwigTests';
         if (!file_exists($this->tmpDir)) {
-            @mkdir($this->tmpDir, 0777, true);;
+            @mkdir($this->tmpDir, 0777, true);
         }

         if (!is_writable($this->tmpDir)) {
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/base.html b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/base.html
new file mode 100644
index 0000000..cb0dbe4
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/base.html
@@ -0,0 +1 @@
+{% block content %}{% endblock %}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/index.html b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/index.html
new file mode 100644
index 0000000..df57c82
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/index.html
@@ -0,0 +1,7 @@
+{% extends 'base.html' %}
+{% block content %}
+    {{ foo.bar }}
+{% endblock %}
+{% block foo %}
+    {{ foo.bar }}
+{% endblock %}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test
index 911094c..7b56b76 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test
@@ -4,9 +4,11 @@
 {{ 1 b-and 5 }}
 {{ 1 b-or 5 }}
 {{ 1 b-xor 5 }}
+{{ (1 and 0 b-or 0) is sameas(1 and (0 b-or 0)) ? 'ok' : 'ko' }}
 --DATA--
 return array()
 --EXPECT--
 1
 5
 4
+ok
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test
index 9d84a4c..5f801e6 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test
@@ -12,7 +12,7 @@
 {{ items.foo.in }}
 {{ items.foo.not }}
 --DATA--
-return array('foo' => 'bar', 'items' => array('foo' => new Foo(), 'bar' => 'foo'))
+return array('foo' => 'bar', 'items' => array('foo' => new TwigTestFoo(), 'bar' => 'foo'))
 --CONFIG--
 return array('strict_variables' => false)
 --EXPECT--
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test
index db047c0..542c350 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test
@@ -1,6 +1,7 @@
 --TEST--
 Twig parses postfix expressions
 --TEMPLATE--
+{% import _self as macros %}

 {% macro foo() %}foo{% endmacro %}

@@ -8,8 +9,8 @@
 {{ 'a'|upper }}
 {{ ('a')|upper }}
 {{ -1|upper }}
-{{ _self.foo() }}
-{{ (_self).foo() }}
+{{ macros.foo() }}
+{{ (macros).foo() }}
 --DATA--
 return array();
 --EXPECT--
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test
index ae6d0da..f40f4cb 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test
@@ -11,6 +11,7 @@
 {{ date2|date }}
 {{ date2|date('d/m/Y') }}
 {{ date2|date('d/m/Y H:i:s', 'Europe/Paris') }}
+{{ date2|date('d/m/Y H:i:s', timezone1) }}
 {{ date2|date('d/m/Y H:i:s') }}
 {{ date3|date }}
 {{ date3|date('d/m/Y') }}
@@ -20,8 +21,9 @@
 {{ date5|date('d/m/Y') }}
 {{ date6|date('d/m/Y H:i:s P', 'Europe/Paris') }}
 {{ date6|date('d/m/Y H:i:s P', 'Asia/Hong_Kong') }}
+{{ date6|date('d/m/Y H:i:s P', false) }}
 {{ date6|date('e', 'Europe/Paris') }}
-{{ date6|date('e') }}
+{{ date6|date('e', false) }}
 --DATA--
 date_default_timezone_set('UTC');
 return array(
@@ -31,6 +33,7 @@
     'date4' => 1286199900,
     'date5' => -86410,
     'date6' => new DateTime('2010-10-04 13:45', new DateTimeZone('America/New_York')),
+    'timezone1' => new DateTimeZone('America/New_York'),
 )
 --EXPECT--
 October 4, 2010 13:45
@@ -43,6 +46,7 @@
 October 4, 2010 13:45
 04/10/2010
 04/10/2010 15:45:00
+04/10/2010 09:45:00
 04/10/2010 13:45:00
 October 4, 2010 13:45
 04/10/2010
@@ -52,5 +56,6 @@
 30/12/1969
 04/10/2010 19:45:00 +02:00
 05/10/2010 01:45:00 +08:00
+04/10/2010 13:45:00 -04:00
 Europe/Paris
-America/New_York
\ No newline at end of file
+America/New_York
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test
index 2d5adc1..0c8c6f1 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test
@@ -3,14 +3,17 @@
 --CONDITION--
 version_compare(phpversion(), '5.3.0', '>=')
 --TEMPLATE--
-{{ date6|date }}
-{{ date6|date('%d days %h hours') }}
+{{ date1|date }}
+{{ date1|date('%d days %h hours') }}
+{{ date1|date('%d days %h hours', timezone1) }}
 --DATA--
 date_default_timezone_set('UTC');
 return array(
-    'date5' => -86410,
-    'date6' => new DateInterval('P2D'),
+    'date1' => new DateInterval('P2D'),
+    // This should have no effect on DateInterval formatting
+    'timezone1' => new DateTimeZone('America/New_York'),
 )
 --EXPECT--
 2 days
 2 days 0 hours
+2 days 0 hours
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test
new file mode 100644
index 0000000..53d3a69
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test
@@ -0,0 +1,14 @@
+--TEST--
+"date_modify" filter
+--TEMPLATE--
+{{ date1|date_modify('-1day')|date('Y-m-d H:i:s') }}
+{{ date2|date_modify('-1day')|date('Y-m-d H:i:s') }}
+--DATA--
+date_default_timezone_set('UTC');
+return array(
+    'date1' => '2010-10-04 13:45',
+    'date2' => new DateTime('2010-10-04 13:45'),
+)
+--EXPECT--
+2010-10-03 13:45:00
+2010-10-03 13:45:00
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test
index 22e86e4..0e4404b 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test
@@ -51,7 +51,7 @@
         'nullVar'      => null,
         'definedArray' => array(0),
     ),
-    'object' => new Foo(),
+    'object' => new TwigTestFoo(),
 )
 --CONFIG--
 return array('strict_variables' => false)
@@ -106,7 +106,7 @@
         'nullVar'      => null,
         'definedArray' => array(0),
     ),
-    'object' => new Foo(),
+    'object' => new TwigTestFoo(),
 )
 --CONFIG--
 return array('strict_variables' => true)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test
index 3690e71..85a9b71 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test
@@ -14,5 +14,5 @@
 return array()
 --EXPECT--
     foo&lt;br /&gt;
-    foo\x3cbr \x2f\x3e\x0a
+\x20\x20\x20\x20foo\x3Cbr\x20\x2F\x3E\x0A
         foo<br />
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test
index 8feef63..b342c17 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test
@@ -5,7 +5,7 @@
 {{ foo|join(', ') }}
 {{ bar|join(', ') }}
 --DATA--
-return array('foo' => new Foo(), 'bar' => new ArrayObject(array(3, 4)))
+return array('foo' => new TwigTestFoo(), 'bar' => new ArrayObject(array(3, 4)))
 --EXPECT--
 foo, bar
 1, 2
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test
index 357b352..2bd3d4c 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test
@@ -5,10 +5,12 @@
 {{ items|merge({'bar': 'foo'})|keys|join }}
 {{ {'bar': 'foo'}|merge(items)|join }}
 {{ {'bar': 'foo'}|merge(items)|keys|join }}
+{{ numerics|merge([4, 5, 6])|join }}
 --DATA--
-return array('items' => array('foo' => 'bar'))
+return array('items' => array('foo' => 'bar'), 'numerics' => array(1, 2, 3))
 --EXPECT--
 barfoo
 foobar
 foobar
 barfoo
+123456
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test
new file mode 100644
index 0000000..ce8ec9c
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test
@@ -0,0 +1,18 @@
+--TEST--
+"split" filter
+--TEMPLATE--
+{{ "one,two,three,four,five"|split(',')|join('-') }}
+{{ foo|split(',')|join('-') }}
+{{ foo|split(',', 3)|join('-') }}
+{{ baz|split('')|join('-') }}
+{{ baz|split('', 2)|join('-') }}
+{{ foo|split(',', -2)|join('-') }}
+--DATA--
+return array('foo' => "one,two,three,four,five", 'baz' => '12345',)
+--EXPECT--
+one-two-three-four-five
+one-two-three-four-five
+one-two-three,four,five
+1-2-3-4-5
+12-34-5
+one-two-three
\ No newline at end of file
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test
index ba7d5e8..16ae1e8 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test
@@ -5,7 +5,7 @@
 {{ attribute(array, item) }}
 {{ attribute(obj, "bar", ["a", "b"]) }}
 --DATA--
-return array('obj' => new Foo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo')
+return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo')
 --EXPECT--
 foo
 bar
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test
index 371a587..f407237 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test
@@ -1,5 +1,7 @@
 --TEST--
 "dump" function
+--CONDITION--
+!extension_loaded('xdebug')
 --TEMPLATE--
 {{ dump('foo') }}
 {{ dump('foo', 'bar') }}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test
new file mode 100644
index 0000000..41428da
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test
@@ -0,0 +1,11 @@
+--TEST--
+"template_from_string" function
+--TEMPLATE--
+{% include template_from_string(template) %}
+
+{% include template_from_string("Hello {{ name }}") %}
+--DATA--
+return array('name' => 'Fabien', 'template' => "Hello {{ name }}")
+--EXPECT--
+Hello Fabien
+Hello Fabien
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test
new file mode 100644
index 0000000..cbfb921
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test
@@ -0,0 +1,14 @@
+--TEST--
+macro
+--TEMPLATE--
+{% from _self import test %}
+
+{% macro test(this) -%}
+    {{ this }}
+{%- endmacro %}
+
+{{ test(this) }}
+--DATA--
+return array('this' => 'foo');
+--EXPECT--
+foo
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test
index 864655c..ce7ea78 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test
@@ -80,4 +80,4 @@
 autoescape js

 safe_br
-\x3cbr \x2f\x3e
+\x3Cbr\x20\x2F\x3E
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test
index 101d5af..cf8ccee 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test
@@ -11,7 +11,7 @@
 --DATA--
 return array('var' => '<br />"')
 --EXPECT--
-\x3cbr \x2f\x3e\x22
+\x3Cbr\x20\x2F\x3E\x22
 &lt;br /&gt;&quot;
-\x3cbr \x2f\x3e\x22
+\x3Cbr\x20\x2F\x3E\x22
 &lt;br /&gt;&quot;
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test
index 10fd63f..4f41520 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test
@@ -44,15 +44,15 @@

 1. autoescape 'html' |escape('js')

-<a onclick="alert(&quot;\x3c\x3e\x0a\x27\x22&quot;)"></a>
+<a onclick="alert(&quot;\x3C\x3E\x0A\x27\x22&quot;)"></a>

 2. autoescape 'html' |escape('js')

-<a onclick="alert(&quot;\x3c\x3e\x0a\x27\x22&quot;)"></a>
+<a onclick="alert(&quot;\x3C\x3E\x0A\x27\x22&quot;)"></a>

 3. autoescape 'js' |escape('js')

-<a onclick="alert(&quot;\x3c\x3e\x0a\x27\x22&quot;)"></a>
+<a onclick="alert(&quot;\x3C\x3E\x0A\x27\x22&quot;)"></a>

 4. no escape

@@ -61,9 +61,9 @@

 5. |escape('js')|escape('html')

-<a onclick="alert(&quot;\x3c\x3e\x0a\x27\x22&quot;)"></a>
+<a onclick="alert(&quot;\x3C\x3E\x0A\x27\x22&quot;)"></a>

 6. autoescape 'html' |escape('js')|escape('html')

-<a onclick="alert(&quot;\x3c\x3e\x0a\x27\x22&quot;)"></a>
+<a onclick="alert(&quot;\x3C\x3E\x0A\x27\x22&quot;)"></a>

diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test
new file mode 100644
index 0000000..81563dc
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test
@@ -0,0 +1,42 @@
+--TEST--
+"embed" tag
+--TEMPLATE--
+{% embed "foo.twig" %}
+    {% block c1 %}
+        {{ parent() }}
+        {% embed "foo.twig" %}
+            {% block c1 %}
+                {{ parent() }}
+                block1extended
+            {% endblock %}
+        {% endembed %}
+
+    {% endblock %}
+{% endembed %}
+--TEMPLATE(foo.twig)--
+A
+{% block c1 %}
+    block1
+{% endblock %}
+B
+{% block c2 %}
+    block2
+{% endblock %}
+C
+--DATA--
+return array()
+--EXPECT--
+A
+            block1
+
+
+A
+                    block1
+
+                block1extended
+            B
+    block2
+C
+    B
+    block2
+C
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test
new file mode 100644
index 0000000..f25e871
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test
@@ -0,0 +1,8 @@
+--TEST--
+"include" tag
+--TEMPLATE--
+{% include "foo.twig" %}
+--DATA--
+return array();
+--EXCEPTION--
+Twig_Error_Loader: Template "foo.twig" is not defined in "index.twig" at line 2.
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test
new file mode 100644
index 0000000..86c1864
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test
@@ -0,0 +1,16 @@
+--TEST--
+"include" tag
+--TEMPLATE--
+{% extends "base.twig" %}
+
+{% block content %}
+    {{ parent() }}
+{% endblock %}
+--TEMPLATE(base.twig)--
+{% block content %}
+    {% include "foo.twig" %}
+{% endblock %}
+--DATA--
+return array();
+--EXCEPTION--
+Twig_Error_Loader: Template "foo.twig" is not defined in "base.twig" at line 3.
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test
index ef59a57..eef0c10 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test
@@ -1,8 +1,10 @@
 --TEST--
 "macro" tag
 --TEMPLATE--
-{{ _self.input('username') }}
-{{ _self.input('password', null, 'password', 1) }}
+{% import _self as macros %}
+
+{{ macros.input('username') }}
+{{ macros.input('password', null, 'password', 1) }}

 {% macro input(name, value, type, size) %}
   <input type="{{ type|default("text") }}" name="{{ name }}" value="{{ value|e|default('') }}" size="{{ size|default(20) }}">
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test
index fa81189..ae6203b 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test
@@ -1,8 +1,10 @@
 --TEST--
 "macro" tag supports name for endmacro
 --TEMPLATE--
-{{ _self.foo() }}
-{{ _self.bar() }}
+{% import _self as macros %}
+
+{{ macros.foo() }}
+{{ macros.bar() }}

 {% macro foo() %}foo{% endmacro %}
 {% macro bar() %}bar{% endmacro bar %}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test
index e61716e..0999951 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test
@@ -1,7 +1,9 @@
 --TEST--
 "☃" as a macro name
 --TEMPLATE--
-{{ _self.☃('foo') }}
+{% import _self as macros %}
+
+{{ macros.☃('foo') }}

 {% macro ☃(foo) %}
   ☃{{ foo }}☃
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test
index fb3d288..c8adb15 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test
@@ -2,8 +2,8 @@
 "const" test
 --TEMPLATE--
 {{ 8 is constant('E_NOTICE') ? 'ok' : 'no' }}
-{{ 'bar' is constant('Foo::BAR_NAME') ? 'ok' : 'no' }}
-{{ value is constant('Foo::BAR_NAME') ? 'ok' : 'no' }}
+{{ 'bar' is constant('TwigTestFoo::BAR_NAME') ? 'ok' : 'no' }}
+{{ value is constant('TwigTestFoo::BAR_NAME') ? 'ok' : 'no' }}
 --DATA--
 return array('value' => 'bar');
 --EXPECT--
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test
index 2fbaa86..cbfe03d 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test
@@ -37,7 +37,7 @@
         'nullVar'      => null,
         'definedArray' => array(0),
     ),
-    'object' => new Foo(),
+    'object' => new TwigTestFoo(),
 );
 --EXPECT--
 ok
@@ -76,7 +76,7 @@
         'nullVar'      => null,
         'definedArray' => array(0),
     ),
-    'object' => new Foo(),
+    'object' => new TwigTestFoo(),
 );
 --CONFIG--
 return array('strict_variables' => false)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test
new file mode 100644
index 0000000..8e08061
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test
@@ -0,0 +1,19 @@
+--TEST--
+Twig supports the in operator when using objects
+--TEMPLATE--
+{% if object in object_list %}
+TRUE
+{% endif %}
+--DATA--
+$foo = new TwigTestFoo();
+$foo1 = new TwigTestFoo();
+
+$foo->position = $foo1;
+$foo1->position = $foo;
+
+return array(
+    'object'      => $foo,
+    'object_list' => array($foo1, $foo),
+);
+--EXPECT--
+TRUE
diff --git a/core/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php b/core/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php
new file mode 100644
index 0000000..3b053cd
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php
@@ -0,0 +1,217 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+// This function is defined to check that escaping strategies
+// like html works even if a function with the same name is defined.
+function html()
+{
+    return 'foo';
+}
+
+class Twig_Tests_IntegrationTest extends Twig_Test_IntegrationTestCase
+{
+    public function getExtensions()
+    {
+        $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(), array(), array());
+
+        return array(
+            new Twig_Extension_Debug(),
+            new Twig_Extension_Sandbox($policy, false),
+            new Twig_Extension_StringLoader(),
+            new TwigTestExtension(),
+        );
+    }
+
+    public function getFixturesDir()
+    {
+        return dirname(__FILE__).'/Fixtures/';
+    }
+}
+
+function test_foo($value = 'foo')
+{
+    return $value;
+}
+
+class TwigTestFoo implements Iterator
+{
+    const BAR_NAME = 'bar';
+
+    public $position = 0;
+    public $array = array(1, 2);
+
+    public function bar($param1 = null, $param2 = null)
+    {
+        return 'bar'.($param1 ? '_'.$param1 : '').($param2 ? '-'.$param2 : '');
+    }
+
+    public function getFoo()
+    {
+        return 'foo';
+    }
+
+    public function getSelf()
+    {
+        return $this;
+    }
+
+    public function is()
+    {
+        return 'is';
+    }
+
+    public function in()
+    {
+        return 'in';
+    }
+
+    public function not()
+    {
+        return 'not';
+    }
+
+    public function strToLower($value)
+    {
+        return strtolower($value);
+    }
+
+    public function rewind()
+    {
+        $this->position = 0;
+    }
+
+    public function current()
+    {
+        return $this->array[$this->position];
+    }
+
+    public function key()
+    {
+        return 'a';
+    }
+
+    public function next()
+    {
+        ++$this->position;
+    }
+
+    public function valid()
+    {
+        return isset($this->array[$this->position]);
+    }
+}
+
+class TwigTestTokenParser_☃ extends Twig_TokenParser
+{
+    public function parse(Twig_Token $token)
+    {
+        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
+
+        return new Twig_Node_Print(new Twig_Node_Expression_Constant('☃', -1), -1);
+    }
+
+    public function getTag()
+    {
+        return '☃';
+    }
+}
+
+class TwigTestExtension extends Twig_Extension
+{
+    public function getTokenParsers()
+    {
+        return array(
+            new TwigTestTokenParser_☃(),
+        );
+    }
+
+    public function getFilters()
+    {
+        return array(
+            '☃'                => new Twig_Filter_Method($this, '☃Filter'),
+            'escape_and_nl2br' => new Twig_Filter_Method($this, 'escape_and_nl2br', array('needs_environment' => true, 'is_safe' => array('html'))),
+            'nl2br'            => new Twig_Filter_Method($this, 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),
+            'escape_something' => new Twig_Filter_Method($this, 'escape_something', array('is_safe' => array('something'))),
+            'preserves_safety' => new Twig_Filter_Method($this, 'preserves_safety', array('preserves_safety' => array('html'))),
+            '*_path'           => new Twig_Filter_Method($this, 'dynamic_path'),
+            '*_foo_*_bar'      => new Twig_Filter_Method($this, 'dynamic_foo'),
+        );
+    }
+
+    public function getFunctions()
+    {
+        return array(
+            '☃'           => new Twig_Function_Method($this, '☃Function'),
+            'safe_br'     => new Twig_Function_Method($this, 'br', array('is_safe' => array('html'))),
+            'unsafe_br'   => new Twig_Function_Method($this, 'br'),
+            '*_path'      => new Twig_Function_Method($this, 'dynamic_path'),
+            '*_foo_*_bar' => new Twig_Function_Method($this, 'dynamic_foo'),
+        );
+    }
+
+    public function ☃Filter($value)
+    {
+        return "☃{$value}☃";
+    }
+
+    public function ☃Function($value)
+    {
+        return "☃{$value}☃";
+    }
+
+    /**
+     * nl2br which also escapes, for testing escaper filters
+     */
+    public function escape_and_nl2br($env, $value, $sep = '<br />')
+    {
+        return $this->nl2br(twig_escape_filter($env, $value, 'html'), $sep);
+    }
+
+    /**
+     * nl2br only, for testing filters with pre_escape
+     */
+    public function nl2br($value, $sep = '<br />')
+    {
+        // not secure if $value contains html tags (not only entities)
+        // don't use
+        return str_replace("\n", "$sep\n", $value);
+    }
+
+    public function dynamic_path($element, $item)
+    {
+        return $element.'/'.$item;
+    }
+
+    public function dynamic_foo($foo, $bar, $item)
+    {
+        return $foo.'/'.$bar.'/'.$item;
+    }
+
+    public function escape_something($value)
+    {
+        return strtoupper($value);
+    }
+
+    public function preserves_safety($value)
+    {
+        return strtoupper($value);
+    }
+
+    public function br()
+    {
+        return '<br />';
+    }
+
+    public function getName()
+    {
+        return 'test';
+    }
+}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php b/core/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php
index 22ae5aa..9ea2d0e 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php
@@ -49,4 +49,42 @@ public function getSecurityTests()
             array('filters\\//../\\/\\..\\AutoloaderTest.php'),
         );
     }
+
+    public function testPaths()
+    {
+        $basePath = dirname(__FILE__).'/Fixtures';
+
+        $loader = new Twig_Loader_Filesystem(array($basePath.'/normal', $basePath.'/normal_bis'));
+        $loader->setPaths(array($basePath.'/named', $basePath.'/named_bis'), 'named');
+        $loader->addPath($basePath.'/named_ter', 'named');
+        $loader->addPath($basePath.'/normal_ter');
+        $loader->prependPath($basePath.'/normal_final');
+        $loader->prependPath($basePath.'/named_final', 'named');
+
+        $this->assertEquals(array(
+            $basePath.'/normal_final',
+            $basePath.'/normal',
+            $basePath.'/normal_bis',
+            $basePath.'/normal_ter',
+        ), $loader->getPaths());
+        $this->assertEquals(array(
+            $basePath.'/named_final',
+            $basePath.'/named',
+            $basePath.'/named_bis',
+            $basePath.'/named_ter',
+        ), $loader->getPaths('named'));
+
+        $this->assertEquals("path (final)\n", $loader->getSource('index.html'));
+        $this->assertEquals("path (final)\n", $loader->getSource('@__main__/index.html'));
+        $this->assertEquals("named path (final)\n", $loader->getSource('@named/index.html'));
+    }
+
+    public function testGetNamespaces()
+    {
+        $loader = new Twig_Loader_Filesystem(sys_get_temp_dir());
+        $this->assertEquals(array('__main__'), $loader->getNamespaces());
+
+        $loader->addPath(sys_get_temp_dir(), 'named');
+        $this->assertEquals(array('__main__', 'named'), $loader->getNamespaces());
+    }
 }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named/index.html
new file mode 100644
index 0000000..9e5449c
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named/index.html
@@ -0,0 +1 @@
+named path
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_bis/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_bis/index.html
new file mode 100644
index 0000000..d3a272b
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_bis/index.html
@@ -0,0 +1 @@
+named path (bis)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_final/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_final/index.html
new file mode 100644
index 0000000..9f05d15
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_final/index.html
@@ -0,0 +1 @@
+named path (final)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_ter/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_ter/index.html
new file mode 100644
index 0000000..24fb68a
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_ter/index.html
@@ -0,0 +1 @@
+named path (ter)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal/index.html
new file mode 100644
index 0000000..e7a8fd4
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal/index.html
@@ -0,0 +1 @@
+path
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_bis/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_bis/index.html
new file mode 100644
index 0000000..bfa9160
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_bis/index.html
@@ -0,0 +1 @@
+path (bis)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_final/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_final/index.html
new file mode 100644
index 0000000..73a089b
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_final/index.html
@@ -0,0 +1 @@
+path (final)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_ter/index.html b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_ter/index.html
new file mode 100644
index 0000000..b7ad97d
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_ter/index.html
@@ -0,0 +1 @@
+path (ter)
diff --git a/core/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php b/core/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php
new file mode 100644
index 0000000..3fafd33
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php
@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase
+{
+    public function testGetProperties()
+    {
+        $twig = new Twig_Environment(new Twig_Loader_String(), array(
+            'debug'      => true,
+            'cache'      => false,
+            'autoescape' => false
+        ));
+
+        $d1 = new DateTime();
+        $d2 = new DateTime();
+        $output = $twig->render('{{ d1.date }}{{ d2.date }}', compact('d1', 'd2'));
+
+        // If it fails, PHP will crash.
+        $this->assertEquals($output, $d1->date . $d2->date);
+    }
+}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php
index ebfcb48..608446b 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_AutoEscapeTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_AutoEscape::__construct
      */
     public function testConstructor()
     {
-        $body = new Twig_Node(array(new Twig_Node_Text('foo', 0)));
-        $node = new Twig_Node_AutoEscape(true, $body, 0);
+        $body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
+        $node = new Twig_Node_AutoEscape(true, $body, 1);

         $this->assertEquals($body, $node->getNode('body'));
         $this->assertEquals(true, $node->getAttribute('value'));
@@ -36,11 +34,11 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $body = new Twig_Node(array(new Twig_Node_Text('foo', 0)));
-        $node = new Twig_Node_AutoEscape(true, $body, 0);
+        $body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
+        $node = new Twig_Node_AutoEscape(true, $body, 1);

         return array(
-            array($node, 'echo "foo";'),
+            array($node, "// line 1\necho \"foo\";"),
         );
     }
 }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php
index f1c5ab1..96d0e10 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php
@@ -9,16 +9,14 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_BlockReferenceTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_BlockReferenceTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_BlockReference::__construct
      */
     public function testConstructor()
     {
-        $node = new Twig_Node_BlockReference('foo', 0);
+        $node = new Twig_Node_BlockReference('foo', 1);

         $this->assertEquals('foo', $node->getAttribute('name'));
     }
@@ -35,7 +33,11 @@ public function testCompile($node, $source, $environment = null)
     public function getTests()
     {
         return array(
-            array(new Twig_Node_BlockReference('foo', 0), '$this->displayBlock(\'foo\', $context, $blocks);'),
+            array(new Twig_Node_BlockReference('foo', 1), <<<EOF
+// line 1
+\$this->displayBlock('foo', \$context, \$blocks);
+EOF
+            ),
         );
     }
 }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php
index 6bc5e79..024049d 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_BlockTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_BlockTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Block::__construct
      */
     public function testConstructor()
     {
-        $body = new Twig_Node_Text('foo', 0);
-        $node = new Twig_Node_Block('foo', $body, 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $node = new Twig_Node_Block('foo', $body, 1);

         $this->assertEquals($body, $node->getNode('body'));
         $this->assertEquals('foo', $node->getAttribute('name'));
@@ -36,11 +34,12 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $body = new Twig_Node_Text('foo', 0);
-        $node = new Twig_Node_Block('foo', $body, 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $node = new Twig_Node_Block('foo', $body, 1);

         return array(
             array($node, <<<EOF
+// line 1
 public function block_foo(\$context, array \$blocks = array())
 {
     echo "foo";
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/DoTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/DoTest.php
index 49c2a59..a406e22 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/DoTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/DoTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_DoTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_DoTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Do::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant('foo', 0);
-        $node = new Twig_Node_Do($expr, 0);
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
+        $node = new Twig_Node_Do($expr, 1);

         $this->assertEquals($expr, $node->getNode('expr'));
     }
@@ -37,9 +35,9 @@ public function getTests()
     {
         $tests = array();

-        $expr = new Twig_Node_Expression_Constant('foo', 0);
-        $node = new Twig_Node_Do($expr, 0);
-        $tests[] = array($node, '"foo";');
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
+        $node = new Twig_Node_Do($expr, 1);
+        $tests[] = array($node, "// line 1\n\"foo\";");

         return $tests;
     }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php
index 06b30e9..c6a9044 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_ArrayTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_ArrayTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Array::__construct
      */
     public function testConstructor()
     {
-        $elements = array(new Twig_Node_Expression_Constant('foo', 0), $foo = new Twig_Node_Expression_Constant('bar', 0));
-        $node = new Twig_Node_Expression_Array($elements, 0);
+        $elements = array(new Twig_Node_Expression_Constant('foo', 1), $foo = new Twig_Node_Expression_Constant('bar', 1));
+        $node = new Twig_Node_Expression_Array($elements, 1);

         $this->assertEquals($foo, $node->getNode(1));
     }
@@ -36,13 +34,13 @@ public function testCompile($node, $source, $environment = null)
     public function getTests()
     {
         $elements = array(
-            new Twig_Node_Expression_Constant('foo', 0),
-            new Twig_Node_Expression_Constant('bar', 0),
+            new Twig_Node_Expression_Constant('foo', 1),
+            new Twig_Node_Expression_Constant('bar', 1),

-            new Twig_Node_Expression_Constant('bar', 0),
-            new Twig_Node_Expression_Constant('foo', 0),
+            new Twig_Node_Expression_Constant('bar', 1),
+            new Twig_Node_Expression_Constant('foo', 1),
         );
-        $node = new Twig_Node_Expression_Array($elements, 0);
+        $node = new Twig_Node_Expression_Array($elements, 1);

         return array(
             array($node, 'array("foo" => "bar", "bar" => "foo")'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php
index fc92b0d..b156dcc 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php
@@ -9,16 +9,14 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_AssignName::__construct
      */
     public function testConstructor()
     {
-        $node = new Twig_Node_Expression_AssignName('foo', 0);
+        $node = new Twig_Node_Expression_AssignName('foo', 1);

         $this->assertEquals('foo', $node->getAttribute('name'));
     }
@@ -34,7 +32,7 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $node = new Twig_Node_Expression_AssignName('foo', 0);
+        $node = new Twig_Node_Expression_AssignName('foo', 1);

         return array(
             array($node, '$context["foo"]'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php
index 80d318f..a0f49cb 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_Add::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Add($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Add($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Add($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Add($left, $right, 1);

         return array(
             array($node, '(1 + 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php
index a6ed4f2..50e551a 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_And::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_And($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_And($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_And($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_And($left, $right, 1);

         return array(
             array($node, '(1 && 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php
index a04edc9..140329f 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_Concat::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Concat($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Concat($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Concat($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Concat($left, $right, 1);

         return array(
             array($node, '(1 . 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php
index 42002fc..0c1a3c7 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_Div::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Div($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Div($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Div($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Div($left, $right, 1);

         return array(
             array($node, '(1 / 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php
index 94ff2f6..ead1fde 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_FloorDiv::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_FloorDiv($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_FloorDiv($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_FloorDiv($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_FloorDiv($left, $right, 1);

         return array(
             array($node, 'intval(floor((1 / 2)))'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php
index 67612a5..4fe1a1f 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_Mod::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Mod($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Mod($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Mod($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Mod($left, $right, 1);

         return array(
             array($node, '(1 % 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php
index c817d02..12bb35c 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_Mul::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Mul($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Mul($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Mul($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Mul($left, $right, 1);

         return array(
             array($node, '(1 * 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php
index d8e2f8d..9534c41 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_Or::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Or($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Or($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Or($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Or($left, $right, 1);

         return array(
             array($node, '(1 || 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php
index 6583d09..9074893 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Binary_Sub::__construct
      */
     public function testConstructor()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Sub($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Sub($left, $right, 1);

         $this->assertEquals($left, $node->getNode('left'));
         $this->assertEquals($right, $node->getNode('right'));
@@ -38,9 +36,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $left = new Twig_Node_Expression_Constant(1, 0);
-        $right = new Twig_Node_Expression_Constant(2, 0);
-        $node = new Twig_Node_Expression_Binary_Sub($left, $right, 0);
+        $left = new Twig_Node_Expression_Constant(1, 1);
+        $right = new Twig_Node_Expression_Constant(2, 1);
+        $node = new Twig_Node_Expression_Binary_Sub($left, $right, 1);

         return array(
             array($node, '(1 - 2)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php
index 4a05e4e..9906d51 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php
@@ -9,19 +9,17 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_ConditionalTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_ConditionalTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Conditional::__construct
      */
     public function testConstructor()
     {
-        $expr1 = new Twig_Node_Expression_Constant(1, 0);
-        $expr2 = new Twig_Node_Expression_Constant(2, 0);
-        $expr3 = new Twig_Node_Expression_Constant(3, 0);
-        $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 0);
+        $expr1 = new Twig_Node_Expression_Constant(1, 1);
+        $expr2 = new Twig_Node_Expression_Constant(2, 1);
+        $expr3 = new Twig_Node_Expression_Constant(3, 1);
+        $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 1);

         $this->assertEquals($expr1, $node->getNode('expr1'));
         $this->assertEquals($expr2, $node->getNode('expr2'));
@@ -41,10 +39,10 @@ public function getTests()
     {
         $tests = array();

-        $expr1 = new Twig_Node_Expression_Constant(1, 0);
-        $expr2 = new Twig_Node_Expression_Constant(2, 0);
-        $expr3 = new Twig_Node_Expression_Constant(3, 0);
-        $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 0);
+        $expr1 = new Twig_Node_Expression_Constant(1, 1);
+        $expr2 = new Twig_Node_Expression_Constant(2, 1);
+        $expr3 = new Twig_Node_Expression_Constant(3, 1);
+        $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 1);
         $tests[] = array($node, '((1) ? (2) : (3))');

         return $tests;
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php
index 0cf3867..d0dec53 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php
@@ -9,16 +9,14 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_ConstantTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_ConstantTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Constant::__construct
      */
     public function testConstructor()
     {
-        $node = new Twig_Node_Expression_Constant('foo', 0);
+        $node = new Twig_Node_Expression_Constant('foo', 1);

         $this->assertEquals('foo', $node->getAttribute('value'));
     }
@@ -36,7 +34,7 @@ public function getTests()
     {
         $tests = array();

-        $node = new Twig_Node_Expression_Constant('foo', 0);
+        $node = new Twig_Node_Expression_Constant('foo', 1);
         $tests[] = array($node, '"foo"');

         return $tests;
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php
index 2c52482..d37dd22 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php
@@ -9,19 +9,17 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_FilterTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Filter::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant('foo', 0);
-        $name = new Twig_Node_Expression_Constant('upper', 0);
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
+        $name = new Twig_Node_Expression_Constant('upper', 1);
         $args = new Twig_Node();
-        $node = new Twig_Node_Expression_Filter($expr, $name, $args, 0);
+        $node = new Twig_Node_Expression_Filter($expr, $name, $args, 1);

         $this->assertEquals($expr, $node->getNode('node'));
         $this->assertEquals($name, $node->getNode('filter'));
@@ -35,30 +33,33 @@ public function testConstructor()
     public function testCompile($node, $source, $environment = null)
     {
         parent::testCompile($node, $source, $environment);
+    }

-        $expr = new Twig_Node_Expression_Constant('foo', 0);
-        $node = $this->createFilter($expr, 'foobar', array(new Twig_Node_Expression_Constant('bar', 0), new Twig_Node_Expression_Constant('foobar', 0)));
+    /**
+     * @covers Twig_Node_Expression_Filter::compile
+     * @expectedException Twig_Error_Syntax
+     * @expectedExceptionMessage The filter "lowe" does not exist. Did you mean "lower" at line 1
+     */
+    public function testCompileUnknownFilter()
+    {
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
+        $node = $this->createFilter($expr, 'lowe', array(new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foobar', 1)));

-        try {
-            $node->compile($this->getCompiler());
-            $this->fail();
-        } catch (Exception $e) {
-            $this->assertEquals('Twig_Error_Syntax', get_class($e));
-        }
+        $node->compile($this->getCompiler());
     }

     public function getTests()
     {
         $tests = array();

-        $expr = new Twig_Node_Expression_Constant('foo', 0);
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
         $node = $this->createFilter($expr, 'upper');
-        $node = $this->createFilter($node, 'lower', array(new Twig_Node_Expression_Constant('bar', 0), new Twig_Node_Expression_Constant('foobar', 0)));
+        $node = $this->createFilter($node, 'number_format', array(new Twig_Node_Expression_Constant(2, 1), new Twig_Node_Expression_Constant('.', 1), new Twig_Node_Expression_Constant(',', 1)));

         if (function_exists('mb_get_info')) {
-            $tests[] = array($node, 'twig_lower_filter($this->env, twig_upper_filter($this->env, "foo"), "bar", "foobar")');
+            $tests[] = array($node, 'twig_number_format_filter($this->env, twig_upper_filter($this->env, "foo"), 2, ".", ",")');
         } else {
-            $tests[] = array($node, 'strtolower(strtoupper("foo"), "bar", "foobar")');
+            $tests[] = array($node, 'twig_number_format_filter($this->env, strtoupper("foo"), 2, ".", ",")');
         }

         return $tests;
@@ -67,19 +68,19 @@ public function getTests()
     /**
      * @covers Twig_Node_Expression_Filter::compile
      * @expectedException        Twig_Error_Syntax
-     * @expectedExceptionMessage The filter "uppe" does not exist. Did you mean "upper" at line 0
+     * @expectedExceptionMessage The filter "uppe" does not exist. Did you mean "upper" at line 1
      */
     public function testUnknownFilter()
     {
-        $node = $this->createFilter(new Twig_Node_Expression_Constant('foo', 0), 'uppe');
+        $node = $this->createFilter(new Twig_Node_Expression_Constant('foo', 1), 'uppe');
         $node->compile($this->getCompiler());
     }

     protected function createFilter($node, $name, array $arguments = array())
     {
-        $name = new Twig_Node_Expression_Constant($name, 0);
+        $name = new Twig_Node_Expression_Constant($name, 1);
         $arguments = new Twig_Node($arguments);

-        return new Twig_Node_Expression_Filter($node, $name, $arguments, 0);
+        return new Twig_Node_Expression_Filter($node, $name, $arguments, 1);
     }
 }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php
index 68c5c61..13f4823 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php
@@ -9,9 +9,7 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_FunctionTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Function::__construct
@@ -20,7 +18,7 @@ public function testConstructor()
     {
         $name = 'function';
         $args = new Twig_Node();
-        $node = new Twig_Node_Expression_Function($name, $args, 0);
+        $node = new Twig_Node_Expression_Function($name, $args, 1);

         $this->assertEquals($name, $node->getAttribute('name'));
         $this->assertEquals($args, $node->getNode('arguments'));
@@ -38,7 +36,7 @@ public function testCompile($node, $source, $environment = null)
     /**
      * @covers Twig_Node_Expression_Filter::compile
      * @expectedException        Twig_Error_Syntax
-     * @expectedExceptionMessage The function "cycl" does not exist. Did you mean "cycle" at line 0
+     * @expectedExceptionMessage The function "cycl" does not exist. Did you mean "cycle" at line 1
      */
     public function testUnknownFunction()
     {
@@ -59,25 +57,25 @@ public function getTests()
         $node = $this->createFunction('foo');
         $tests[] = array($node, 'foo()', $environment);

-        $node = $this->createFunction('foo', array(new Twig_Node_Expression_Constant('bar', 0), new Twig_Node_Expression_Constant('foobar', 0)));
+        $node = $this->createFunction('foo', array(new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foobar', 1)));
         $tests[] = array($node, 'foo("bar", "foobar")', $environment);

         $node = $this->createFunction('bar');
         $tests[] = array($node, 'bar($this->env)', $environment);

-        $node = $this->createFunction('bar', array(new Twig_Node_Expression_Constant('bar', 0)));
+        $node = $this->createFunction('bar', array(new Twig_Node_Expression_Constant('bar', 1)));
         $tests[] = array($node, 'bar($this->env, "bar")', $environment);

         $node = $this->createFunction('foofoo');
         $tests[] = array($node, 'foofoo($context)', $environment);

-        $node = $this->createFunction('foofoo', array(new Twig_Node_Expression_Constant('bar', 0)));
+        $node = $this->createFunction('foofoo', array(new Twig_Node_Expression_Constant('bar', 1)));
         $tests[] = array($node, 'foofoo($context, "bar")', $environment);

         $node = $this->createFunction('foobar');
         $tests[] = array($node, 'foobar($this->env, $context)', $environment);

-        $node = $this->createFunction('foobar', array(new Twig_Node_Expression_Constant('bar', 0)));
+        $node = $this->createFunction('foobar', array(new Twig_Node_Expression_Constant('bar', 1)));
         $tests[] = array($node, 'foobar($this->env, $context, "bar")', $environment);

         return $tests;
@@ -85,6 +83,6 @@ public function getTests()

     protected function createFunction($name, array $arguments = array())
     {
-        return new Twig_Node_Expression_Function($name, new Twig_Node($arguments), 0);
+        return new Twig_Node_Expression_Function($name, new Twig_Node($arguments), 1);
     }
 }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php
index 6df143d..6a63cce 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php
@@ -9,21 +9,19 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_GetAttr::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Name('foo', 0);
-        $attr = new Twig_Node_Expression_Constant('bar', 0);
-        $args = new Twig_Node_Expression_Array(array(), 0);
-        $args->addElement(new Twig_Node_Expression_Name('foo', 0));
-        $args->addElement(new Twig_Node_Expression_Constant('bar', 0));
-        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::ARRAY_CALL, 0);
+        $expr = new Twig_Node_Expression_Name('foo', 1);
+        $attr = new Twig_Node_Expression_Constant('bar', 1);
+        $args = new Twig_Node_Expression_Array(array(), 1);
+        $args->addElement(new Twig_Node_Expression_Name('foo', 1));
+        $args->addElement(new Twig_Node_Expression_Constant('bar', 1));
+        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::ARRAY_CALL, 1);

         $this->assertEquals($expr, $node->getNode('node'));
         $this->assertEquals($attr, $node->getNode('attribute'));
@@ -44,19 +42,19 @@ public function getTests()
     {
         $tests = array();

-        $expr = new Twig_Node_Expression_Name('foo', 0);
-        $attr = new Twig_Node_Expression_Constant('bar', 0);
-        $args = new Twig_Node_Expression_Array(array(), 0);
-        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::ANY_CALL, 0);
+        $expr = new Twig_Node_Expression_Name('foo', 1);
+        $attr = new Twig_Node_Expression_Constant('bar', 1);
+        $args = new Twig_Node_Expression_Array(array(), 1);
+        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::ANY_CALL, 1);
         $tests[] = array($node, sprintf('%s%s, "bar")', $this->getAttributeGetter(), $this->getVariableGetter('foo')));

-        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::ARRAY_CALL, 0);
+        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::ARRAY_CALL, 1);
         $tests[] = array($node, sprintf('%s%s, "bar", array(), "array")', $this->getAttributeGetter(), $this->getVariableGetter('foo')));

-        $args = new Twig_Node_Expression_Array(array(), 0);
-        $args->addElement(new Twig_Node_Expression_Name('foo', 0));
-        $args->addElement(new Twig_Node_Expression_Constant('bar', 0));
-        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::METHOD_CALL, 0);
+        $args = new Twig_Node_Expression_Array(array(), 1);
+        $args->addElement(new Twig_Node_Expression_Name('foo', 1));
+        $args->addElement(new Twig_Node_Expression_Constant('bar', 1));
+        $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_TemplateInterface::METHOD_CALL, 1);
         $tests[] = array($node, sprintf('%s%s, "bar", array(0 => %s, 1 => "bar"), "method")', $this->getAttributeGetter(), $this->getVariableGetter('foo'), $this->getVariableGetter('foo')));

         return $tests;
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php
index e77b432..945bd9f 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php
@@ -9,16 +9,14 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_NameTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Name::__construct
      */
     public function testConstructor()
     {
-        $node = new Twig_Node_Expression_Name('foo', 0);
+        $node = new Twig_Node_Expression_Name('foo', 1);

         $this->assertEquals('foo', $node->getAttribute('name'));
     }
@@ -34,9 +32,9 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $node = new Twig_Node_Expression_Name('foo', 0);
-        $self = new Twig_Node_Expression_Name('_self', 0);
-        $context = new Twig_Node_Expression_Name('_context', 0);
+        $node = new Twig_Node_Expression_Name('foo', 1);
+        $self = new Twig_Node_Expression_Name('_self', 1);
+        $context = new Twig_Node_Expression_Name('_context', 1);

         $env = new Twig_Environment(null, array('strict_variables' => true));
         $env1 = new Twig_Environment(null, array('strict_variables' => false));
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php
index 7efbe03..4d40419 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php
@@ -9,16 +9,14 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_ParentTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_ParentTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Parent::__construct
      */
     public function testConstructor()
     {
-        $node = new Twig_Node_Expression_Parent('foo', 0);
+        $node = new Twig_Node_Expression_Parent('foo', 1);

         $this->assertEquals('foo', $node->getAttribute('name'));
     }
@@ -35,7 +33,7 @@ public function testCompile($node, $source, $environment = null)
     public function getTests()
     {
         $tests = array();
-        $tests[] = array(new Twig_Node_Expression_Parent('foo', 0), '$this->renderParentBlock("foo", $context, $blocks)');
+        $tests[] = array(new Twig_Node_Expression_Parent('foo', 1), '$this->renderParentBlock("foo", $context, $blocks)');

         return $tests;
     }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php
index 08668c0..4d0cf41 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php
@@ -9,19 +9,17 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../TestCase.php';
-
-class Twig_Tests_Node_Expression_TestTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Test::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant('foo', 0);
-        $name = new Twig_Node_Expression_Constant('null', 0);
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
+        $name = new Twig_Node_Expression_Constant('null', 1);
         $args = new Twig_Node();
-        $node = new Twig_Node_Expression_Test($expr, $name, $args, 0);
+        $node = new Twig_Node_Expression_Test($expr, $name, $args, 1);

         $this->assertEquals($expr, $node->getNode('node'));
         $this->assertEquals($args, $node->getNode('arguments'));
@@ -41,8 +39,8 @@ public function getTests()
     {
         $tests = array();

-        $expr = new Twig_Node_Expression_Constant('foo', 0);
-        $node = new Twig_Node_Expression_Test_Null($expr, 'null', new Twig_Node(array()), 0);
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
+        $node = new Twig_Node_Expression_Test_Null($expr, 'null', new Twig_Node(array()), 1);

         $tests[] = array($node, '(null === "foo")');

@@ -52,16 +50,16 @@ public function getTests()
     /**
      * @covers Twig_Node_Expression_Filter::compile
      * @expectedException        Twig_Error_Syntax
-     * @expectedExceptionMessage The test "nul" does not exist. Did you mean "null" at line 0
+     * @expectedExceptionMessage The test "nul" does not exist. Did you mean "null" at line 1
      */
     public function testUnknownTest()
     {
-        $node = $this->createTest(new Twig_Node_Expression_Constant('foo', 0), 'nul');
+        $node = $this->createTest(new Twig_Node_Expression_Constant('foo', 1), 'nul');
         $node->compile($this->getCompiler());
     }

     protected function createTest($node, $name, array $arguments = array())
     {
-        return new Twig_Node_Expression_Test($node, $name, new Twig_Node($arguments), 0);
+        return new Twig_Node_Expression_Test($node, $name, new Twig_Node($arguments), 1);
     }
 }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php
index 218de6e..d55ab33 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Unary_NegTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Unary_NegTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Unary_Neg::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant(1, 0);
-        $node = new Twig_Node_Expression_Unary_Neg($expr, 0);
+        $expr = new Twig_Node_Expression_Constant(1, 1);
+        $node = new Twig_Node_Expression_Unary_Neg($expr, 1);

         $this->assertEquals($expr, $node->getNode('node'));
     }
@@ -36,8 +34,8 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $node = new Twig_Node_Expression_Constant(1, 0);
-        $node = new Twig_Node_Expression_Unary_Neg($node, 0);
+        $node = new Twig_Node_Expression_Constant(1, 1);
+        $node = new Twig_Node_Expression_Unary_Neg($node, 1);

         return array(
             array($node, '(-1)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php
index ed6349c..625c252 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Unary_NotTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Unary_NotTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Unary_Not::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant(1, 0);
-        $node = new Twig_Node_Expression_Unary_Not($expr, 0);
+        $expr = new Twig_Node_Expression_Constant(1, 1);
+        $node = new Twig_Node_Expression_Unary_Not($expr, 1);

         $this->assertEquals($expr, $node->getNode('node'));
     }
@@ -36,8 +34,8 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $node = new Twig_Node_Expression_Constant(1, 0);
-        $node = new Twig_Node_Expression_Unary_Not($node, 0);
+        $node = new Twig_Node_Expression_Constant(1, 1);
+        $node = new Twig_Node_Expression_Unary_Not($node, 1);

         return array(
             array($node, '(!1)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php
index 6a414bc..047a097 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/../../TestCase.php';
-
-class Twig_Tests_Node_Expression_Unary_PosTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_Expression_Unary_PosTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Expression_Unary_Pos::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant(1, 0);
-        $node = new Twig_Node_Expression_Unary_Pos($expr, 0);
+        $expr = new Twig_Node_Expression_Constant(1, 1);
+        $node = new Twig_Node_Expression_Unary_Pos($expr, 1);

         $this->assertEquals($expr, $node->getNode('node'));
     }
@@ -36,8 +34,8 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $node = new Twig_Node_Expression_Constant(1, 0);
-        $node = new Twig_Node_Expression_Unary_Pos($node, 0);
+        $node = new Twig_Node_Expression_Constant(1, 1);
+        $node = new Twig_Node_Expression_Unary_Pos($node, 1);

         return array(
             array($node, '(+1)'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php
index ef3be82..f1093b7 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php
@@ -9,22 +9,20 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_ForTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_For::__construct
      */
     public function testConstructor()
     {
-        $keyTarget = new Twig_Node_Expression_AssignName('key', 0);
-        $valueTarget = new Twig_Node_Expression_AssignName('item', 0);
-        $seq = new Twig_Node_Expression_Name('items', 0);
-        $ifexpr = new Twig_Node_Expression_Constant(true, 0);
-        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0)), array(), 0);
+        $keyTarget = new Twig_Node_Expression_AssignName('key', 1);
+        $valueTarget = new Twig_Node_Expression_AssignName('item', 1);
+        $seq = new Twig_Node_Expression_Name('items', 1);
+        $ifexpr = new Twig_Node_Expression_Constant(true, 1);
+        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1);
         $else = null;
-        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 0);
+        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1);
         $node->setAttribute('with_loop', false);

         $this->assertEquals($keyTarget, $node->getNode('key_target'));
@@ -35,8 +33,8 @@ public function testConstructor()
         $this->assertEquals($body, $node->getNode('body')->getNode('tests')->getNode(1)->getNode(0));
         $this->assertEquals(null, $node->getNode('else'));

-        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0);
-        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 0);
+        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1);
+        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1);
         $node->setAttribute('with_loop', false);
         $this->assertEquals($else, $node->getNode('else'));
     }
@@ -54,16 +52,17 @@ public function getTests()
     {
         $tests = array();

-        $keyTarget = new Twig_Node_Expression_AssignName('key', 0);
-        $valueTarget = new Twig_Node_Expression_AssignName('item', 0);
-        $seq = new Twig_Node_Expression_Name('items', 0);
+        $keyTarget = new Twig_Node_Expression_AssignName('key', 1);
+        $valueTarget = new Twig_Node_Expression_AssignName('item', 1);
+        $seq = new Twig_Node_Expression_Name('items', 1);
         $ifexpr = null;
-        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0)), array(), 0);
+        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1);
         $else = null;
-        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 0);
+        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1);
         $node->setAttribute('with_loop', false);

         $tests[] = array($node, <<<EOF
+// line 1
 \$context['_parent'] = (array) \$context;
 \$context['_seq'] = twig_ensure_traversable({$this->getVariableGetter('items')});
 foreach (\$context['_seq'] as \$context["key"] => \$context["item"]) {
@@ -75,16 +74,17 @@ public function getTests()
 EOF
         );

-        $keyTarget = new Twig_Node_Expression_AssignName('k', 0);
-        $valueTarget = new Twig_Node_Expression_AssignName('v', 0);
-        $seq = new Twig_Node_Expression_Name('values', 0);
+        $keyTarget = new Twig_Node_Expression_AssignName('k', 1);
+        $valueTarget = new Twig_Node_Expression_AssignName('v', 1);
+        $seq = new Twig_Node_Expression_Name('values', 1);
         $ifexpr = null;
-        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0)), array(), 0);
+        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1);
         $else = null;
-        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 0);
+        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1);
         $node->setAttribute('with_loop', true);

         $tests[] = array($node, <<<EOF
+// line 1
 \$context['_parent'] = (array) \$context;
 \$context['_seq'] = twig_ensure_traversable({$this->getVariableGetter('values')});
 \$context['loop'] = array(
@@ -117,16 +117,17 @@ public function getTests()
 EOF
         );

-        $keyTarget = new Twig_Node_Expression_AssignName('k', 0);
-        $valueTarget = new Twig_Node_Expression_AssignName('v', 0);
-        $seq = new Twig_Node_Expression_Name('values', 0);
-        $ifexpr = new Twig_Node_Expression_Constant(true, 0);
-        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0)), array(), 0);
+        $keyTarget = new Twig_Node_Expression_AssignName('k', 1);
+        $valueTarget = new Twig_Node_Expression_AssignName('v', 1);
+        $seq = new Twig_Node_Expression_Name('values', 1);
+        $ifexpr = new Twig_Node_Expression_Constant(true, 1);
+        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1);
         $else = null;
-        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 0);
+        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1);
         $node->setAttribute('with_loop', true);

         $tests[] = array($node, <<<EOF
+// line 1
 \$context['_parent'] = (array) \$context;
 \$context['_seq'] = twig_ensure_traversable({$this->getVariableGetter('values')});
 \$context['loop'] = array(
@@ -149,16 +150,17 @@ public function getTests()
 EOF
         );

-        $keyTarget = new Twig_Node_Expression_AssignName('k', 0);
-        $valueTarget = new Twig_Node_Expression_AssignName('v', 0);
-        $seq = new Twig_Node_Expression_Name('values', 0);
+        $keyTarget = new Twig_Node_Expression_AssignName('k', 1);
+        $valueTarget = new Twig_Node_Expression_AssignName('v', 1);
+        $seq = new Twig_Node_Expression_Name('values', 1);
         $ifexpr = null;
-        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0)), array(), 0);
-        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0);
-        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 0);
+        $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1);
+        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1);
+        $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1);
         $node->setAttribute('with_loop', true);

         $tests[] = array($node, <<<EOF
+// line 1
 \$context['_parent'] = (array) \$context;
 \$context['_seq'] = twig_ensure_traversable({$this->getVariableGetter('values')});
 \$context['_iterated'] = false;
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php
index 04b92e7..92fc29d 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php
@@ -9,9 +9,7 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_IfTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_If::__construct
@@ -19,17 +17,17 @@ class Twig_Tests_Node_IfTest extends Twig_Tests_Node_TestCase
     public function testConstructor()
     {
         $t = new Twig_Node(array(
-            new Twig_Node_Expression_Constant(true, 0),
-            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0),
-        ), array(), 0);
+            new Twig_Node_Expression_Constant(true, 1),
+            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1),
+        ), array(), 1);
         $else = null;
-        $node = new Twig_Node_If($t, $else, 0);
+        $node = new Twig_Node_If($t, $else, 1);

         $this->assertEquals($t, $node->getNode('tests'));
         $this->assertEquals(null, $node->getNode('else'));

-        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 0), 0);
-        $node = new Twig_Node_If($t, $else, 0);
+        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1);
+        $node = new Twig_Node_If($t, $else, 1);
         $this->assertEquals($else, $node->getNode('else'));
     }

@@ -47,13 +45,14 @@ public function getTests()
         $tests = array();

         $t = new Twig_Node(array(
-            new Twig_Node_Expression_Constant(true, 0),
-            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0),
-        ), array(), 0);
+            new Twig_Node_Expression_Constant(true, 1),
+            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1),
+        ), array(), 1);
         $else = null;
-        $node = new Twig_Node_If($t, $else, 0);
+        $node = new Twig_Node_If($t, $else, 1);

         $tests[] = array($node, <<<EOF
+// line 1
 if (true) {
     echo {$this->getVariableGetter('foo')};
 }
@@ -61,15 +60,16 @@ public function getTests()
         );

         $t = new Twig_Node(array(
-            new Twig_Node_Expression_Constant(true, 0),
-            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0),
-            new Twig_Node_Expression_Constant(false, 0),
-            new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 0), 0),
-        ), array(), 0);
+            new Twig_Node_Expression_Constant(true, 1),
+            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1),
+            new Twig_Node_Expression_Constant(false, 1),
+            new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1),
+        ), array(), 1);
         $else = null;
-        $node = new Twig_Node_If($t, $else, 0);
+        $node = new Twig_Node_If($t, $else, 1);

         $tests[] = array($node, <<<EOF
+// line 1
 if (true) {
     echo {$this->getVariableGetter('foo')};
 } elseif (false) {
@@ -79,13 +79,14 @@ public function getTests()
         );

         $t = new Twig_Node(array(
-            new Twig_Node_Expression_Constant(true, 0),
-            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 0), 0),
-        ), array(), 0);
-        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 0), 0);
-        $node = new Twig_Node_If($t, $else, 0);
+            new Twig_Node_Expression_Constant(true, 1),
+            new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1),
+        ), array(), 1);
+        $else = new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1);
+        $node = new Twig_Node_If($t, $else, 1);

         $tests[] = array($node, <<<EOF
+// line 1
 if (true) {
     echo {$this->getVariableGetter('foo')};
 } else {
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php
index 6a89195..db36581 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_ImportTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_ImportTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Import::__construct
      */
     public function testConstructor()
     {
-        $macro = new Twig_Node_Expression_Constant('foo.twig', 0);
-        $var = new Twig_Node_Expression_AssignName('macro', 0);
-        $node = new Twig_Node_Import($macro, $var, 0);
+        $macro = new Twig_Node_Expression_Constant('foo.twig', 1);
+        $var = new Twig_Node_Expression_AssignName('macro', 1);
+        $node = new Twig_Node_Import($macro, $var, 1);

         $this->assertEquals($macro, $node->getNode('expr'));
         $this->assertEquals($var, $node->getNode('var'));
@@ -39,11 +37,15 @@ public function getTests()
     {
         $tests = array();

-        $macro = new Twig_Node_Expression_Constant('foo.twig', 0);
-        $var = new Twig_Node_Expression_AssignName('macro', 0);
-        $node = new Twig_Node_Import($macro, $var, 0);
+        $macro = new Twig_Node_Expression_Constant('foo.twig', 1);
+        $var = new Twig_Node_Expression_AssignName('macro', 1);
+        $node = new Twig_Node_Import($macro, $var, 1);

-        $tests[] = array($node, '$context["macro"] = $this->env->loadTemplate("foo.twig");');
+        $tests[] = array($node, <<<EOF
+// line 1
+\$context["macro"] = \$this->env->loadTemplate("foo.twig");
+EOF
+        );

         return $tests;
     }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php
index d068392..3b7da6e 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php
@@ -9,24 +9,22 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_IncludeTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Include::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant('foo.twig', 0);
-        $node = new Twig_Node_Include($expr, null, false, false, 0);
+        $expr = new Twig_Node_Expression_Constant('foo.twig', 1);
+        $node = new Twig_Node_Include($expr, null, false, false, 1);

         $this->assertEquals(null, $node->getNode('variables'));
         $this->assertEquals($expr, $node->getNode('expr'));
         $this->assertFalse($node->getAttribute('only'));

-        $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 0), new Twig_Node_Expression_Constant(true, 0)), 0);
-        $node = new Twig_Node_Include($expr, $vars, true, false, 0);
+        $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)), 1);
+        $node = new Twig_Node_Include($expr, $vars, true, false, 1);
         $this->assertEquals($vars, $node->getNode('variables'));
         $this->assertTrue($node->getAttribute('only'));
     }
@@ -44,33 +42,47 @@ public function getTests()
     {
         $tests = array();

-        $expr = new Twig_Node_Expression_Constant('foo.twig', 0);
-        $node = new Twig_Node_Include($expr, null, false, false, 0);
-        $tests[] = array($node, '$this->env->loadTemplate("foo.twig")->display($context);');
+        $expr = new Twig_Node_Expression_Constant('foo.twig', 1);
+        $node = new Twig_Node_Include($expr, null, false, false, 1);
+        $tests[] = array($node, <<<EOF
+// line 1
+\$this->env->loadTemplate("foo.twig")->display(\$context);
+EOF
+        );

         $expr = new Twig_Node_Expression_Conditional(
-                        new Twig_Node_Expression_Constant(true, 0),
-                        new Twig_Node_Expression_Constant('foo', 0),
-                        new Twig_Node_Expression_Constant('foo', 0),
+                        new Twig_Node_Expression_Constant(true, 1),
+                        new Twig_Node_Expression_Constant('foo', 1),
+                        new Twig_Node_Expression_Constant('foo', 1),
                         0
                     );
-        $node = new Twig_Node_Include($expr, null, false, false, 0);
+        $node = new Twig_Node_Include($expr, null, false, false, 1);
         $tests[] = array($node, <<<EOF
+// line 1
 \$template = \$this->env->resolveTemplate(((true) ? ("foo") : ("foo")));
 \$template->display(\$context);
 EOF
         );

-        $expr = new Twig_Node_Expression_Constant('foo.twig', 0);
-        $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 0), new Twig_Node_Expression_Constant(true, 0)), 0);
-        $node = new Twig_Node_Include($expr, $vars, false, false, 0);
-        $tests[] = array($node, '$this->env->loadTemplate("foo.twig")->display(array_merge($context, array("foo" => true)));');
+        $expr = new Twig_Node_Expression_Constant('foo.twig', 1);
+        $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)), 1);
+        $node = new Twig_Node_Include($expr, $vars, false, false, 1);
+        $tests[] = array($node, <<<EOF
+// line 1
+\$this->env->loadTemplate("foo.twig")->display(array_merge(\$context, array("foo" => true)));
+EOF
+        );

-        $node = new Twig_Node_Include($expr, $vars, true, false, 0);
-        $tests[] = array($node, '$this->env->loadTemplate("foo.twig")->display(array("foo" => true));');
+        $node = new Twig_Node_Include($expr, $vars, true, false, 1);
+        $tests[] = array($node, <<<EOF
+// line 1
+\$this->env->loadTemplate("foo.twig")->display(array("foo" => true));
+EOF
+        );

-        $node = new Twig_Node_Include($expr, $vars, true, true, 0);
+        $node = new Twig_Node_Include($expr, $vars, true, true, 1);
         $tests[] = array($node, <<<EOF
+// line 1
 try {
     \$this->env->loadTemplate("foo.twig")->display(array("foo" => true));
 } catch (Twig_Error_Loader \$e) {
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php
index 3dd57a6..b6841d3 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_MacroTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Macro::__construct
      */
     public function testConstructor()
     {
-        $body = new Twig_Node_Text('foo', 0);
-        $arguments = new Twig_Node(array(new Twig_Node_Expression_Name('foo', 0)), array(), 0);
-        $node = new Twig_Node_Macro('foo', $body, $arguments, 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $arguments = new Twig_Node(array(new Twig_Node_Expression_Name('foo', 1)), array(), 1);
+        $node = new Twig_Node_Macro('foo', $body, $arguments, 1);

         $this->assertEquals($body, $node->getNode('body'));
         $this->assertEquals($arguments, $node->getNode('arguments'));
@@ -38,16 +36,17 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $body = new Twig_Node_Text('foo', 0);
-        $arguments = new Twig_Node(array(new Twig_Node_Expression_Name('foo', 0)), array(), 0);
-        $node = new Twig_Node_Macro('foo', $body, $arguments, 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $arguments = new Twig_Node(array(new Twig_Node_Expression_Name('foo', 1)), array(), 1);
+        $node = new Twig_Node_Macro('foo', $body, $arguments, 1);

         return array(
             array($node, <<<EOF
-public function getfoo(\$foo = null)
+// line 1
+public function getfoo(\$_foo = null)
 {
     \$context = \$this->env->mergeGlobals(array(
-        "foo" => \$foo,
+        "foo" => \$_foo,
     ));

     \$blocks = array();
@@ -55,7 +54,7 @@ public function getfoo(\$foo = null)
     ob_start();
     try {
         echo "foo";
-    } catch(Exception \$e) {
+    } catch (Exception \$e) {
         ob_end_clean();

         throw \$e;
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php
index 592949b..dc3e2f1 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_ModuleTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Module::__construct
      */
     public function testConstructor()
     {
-        $body = new Twig_Node_Text('foo', 0);
-        $parent = new Twig_Node_Expression_Constant('layout.twig', 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $parent = new Twig_Node_Expression_Constant('layout.twig', 1);
         $blocks = new Twig_Node();
         $macros = new Twig_Node();
         $traits = new Twig_Node();
@@ -55,7 +53,7 @@ public function getTests()

         $tests = array();

-        $body = new Twig_Node_Text('foo', 0);
+        $body = new Twig_Node_Text('foo', 1);
         $extends = null;
         $blocks = new Twig_Node();
         $macros = new Twig_Node();
@@ -81,6 +79,7 @@ public function __construct(Twig_Environment \$env)

     protected function doDisplay(array \$context, array \$blocks = array())
     {
+        // line 1
         echo "foo";
     }

@@ -91,16 +90,16 @@ public function getTemplateName()

     public function getDebugInfo()
     {
-        return array ();
+        return array (  17 => 1,);
     }
 }
 EOF
         , $twig);

-        $import = new Twig_Node_Import(new Twig_Node_Expression_Constant('foo.twig', 0), new Twig_Node_Expression_AssignName('macro', 0), 0);
+        $import = new Twig_Node_Import(new Twig_Node_Expression_Constant('foo.twig', 1), new Twig_Node_Expression_AssignName('macro', 1), 1);

         $body = new Twig_Node(array($import));
-        $extends = new Twig_Node_Expression_Constant('layout.twig', 0);
+        $extends = new Twig_Node_Expression_Constant('layout.twig', 1);

         $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $filename);
         $tests[] = array($node, <<<EOF
@@ -126,6 +125,7 @@ protected function doGetParent(array \$context)

     protected function doDisplay(array \$context, array \$blocks = array())
     {
+        // line 1
         \$context["macro"] = \$this->env->loadTemplate("foo.twig");
         \$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
     }
@@ -142,7 +142,7 @@ public function isTraitable()

     public function getDebugInfo()
     {
-        return array ();
+        return array (  22 => 1,);
     }
 }
 EOF
@@ -150,9 +150,9 @@ public function getDebugInfo()

         $body = new Twig_Node();
         $extends = new Twig_Node_Expression_Conditional(
-                        new Twig_Node_Expression_Constant(true, 0),
-                        new Twig_Node_Expression_Constant('foo', 0),
-                        new Twig_Node_Expression_Constant('foo', 0),
+                        new Twig_Node_Expression_Constant(true, 1),
+                        new Twig_Node_Expression_Constant('foo', 1),
+                        new Twig_Node_Expression_Constant('foo', 1),
                         0
                     );

diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php
index 168663c..6fe43a4 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_PrintTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_PrintTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Print::__construct
      */
     public function testConstructor()
     {
-        $expr = new Twig_Node_Expression_Constant('foo', 0);
-        $node = new Twig_Node_Print($expr, 0);
+        $expr = new Twig_Node_Expression_Constant('foo', 1);
+        $node = new Twig_Node_Print($expr, 1);

         $this->assertEquals($expr, $node->getNode('expr'));
     }
@@ -36,7 +34,7 @@ public function testCompile($node, $source, $environment = null)
     public function getTests()
     {
         $tests = array();
-        $tests[] = array(new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 0), 0), 'echo "foo";');
+        $tests[] = array(new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 1), 1), "// line 1\necho \"foo\";");

         return $tests;
     }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php
index 1610873..db9dbf9 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_SandboxTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_SandboxTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Sandbox::__construct
      */
     public function testConstructor()
     {
-        $body = new Twig_Node_Text('foo', 0);
-        $node = new Twig_Node_Sandbox($body, 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $node = new Twig_Node_Sandbox($body, 1);

         $this->assertEquals($body, $node->getNode('body'));
     }
@@ -37,10 +35,11 @@ public function getTests()
     {
         $tests = array();

-        $body = new Twig_Node_Text('foo', 0);
-        $node = new Twig_Node_Sandbox($body, 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $node = new Twig_Node_Sandbox($body, 1);

         $tests[] = array($node, <<<EOF
+// line 1
 \$sandbox = \$this->env->getExtension('sandbox');
 if (!\$alreadySandboxed = \$sandbox->isSandboxed()) {
     \$sandbox->enableSandbox();
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedModuleTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedModuleTest.php
index 2ce0584..28fbddf 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedModuleTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedModuleTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_SandboxedModuleTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_SandboxedModuleTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_SandboxedModule::__construct
      */
     public function testConstructor()
     {
-        $body = new Twig_Node_Text('foo', 0);
-        $parent = new Twig_Node_Expression_Constant('layout.twig', 0);
+        $body = new Twig_Node_Text('foo', 1);
+        $parent = new Twig_Node_Expression_Constant('layout.twig', 1);
         $blocks = new Twig_Node();
         $macros = new Twig_Node();
         $traits = new Twig_Node();
@@ -51,7 +49,7 @@ public function getTests()

         $tests = array();

-        $body = new Twig_Node_Text('foo', 0);
+        $body = new Twig_Node_Text('foo', 1);
         $extends = null;
         $blocks = new Twig_Node();
         $macros = new Twig_Node();
@@ -80,10 +78,12 @@ public function __construct(Twig_Environment \$env)
     protected function doDisplay(array \$context, array \$blocks = array())
     {
         \$this->checkSecurity();
+        // line 1
         echo "foo";
     }

-    protected function checkSecurity() {
+    protected function checkSecurity()
+    {
         \$this->env->getExtension('sandbox')->checkSecurity(
             array('upper'),
             array('for'),
@@ -98,14 +98,14 @@ public function getTemplateName()

     public function getDebugInfo()
     {
-        return array ();
+        return array (  18 => 1,);
     }
 }
 EOF
         , $twig);

         $body = new Twig_Node();
-        $extends = new Twig_Node_Expression_Constant('layout.twig', 0);
+        $extends = new Twig_Node_Expression_Constant('layout.twig', 1);
         $blocks = new Twig_Node();
         $macros = new Twig_Node();
         $traits = new Twig_Node();
@@ -141,7 +141,8 @@ protected function doDisplay(array \$context, array \$blocks = array())
         \$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
     }

-    protected function checkSecurity() {
+    protected function checkSecurity()
+    {
         \$this->env->getExtension('sandbox')->checkSecurity(
             array('upper'),
             array('for'),
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php
index 85adddf..058e02b 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php
@@ -9,16 +9,14 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_SandboxedPrintTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_SandboxedPrintTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_SandboxedPrint::__construct
      */
     public function testConstructor()
     {
-        $node = new Twig_Node_SandboxedPrint($expr = new Twig_Node_Expression_Constant('foo', 0), 0);
+        $node = new Twig_Node_SandboxedPrint($expr = new Twig_Node_Expression_Constant('foo', 1), 1);

         $this->assertEquals($expr, $node->getNode('expr'));
     }
@@ -36,7 +34,8 @@ public function getTests()
     {
         $tests = array();

-        $tests[] = array(new Twig_Node_SandboxedPrint(new Twig_Node_Expression_Constant('foo', 0), 0), <<<EOF
+        $tests[] = array(new Twig_Node_SandboxedPrint(new Twig_Node_Expression_Constant('foo', 1), 1), <<<EOF
+// line 1
 echo \$this->env->getExtension('sandbox')->ensureToStringAllowed("foo");
 EOF
         );
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php
index 6319fb6..d64d671 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php
@@ -9,18 +9,16 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_SetTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Set::__construct
      */
     public function testConstructor()
     {
-        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 0)), array(), 0);
-        $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 0)), array(), 0);
-        $node = new Twig_Node_Set(false, $names, $values, 0);
+        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1);
+        $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1)), array(), 1);
+        $node = new Twig_Node_Set(false, $names, $values, 1);

         $this->assertEquals($names, $node->getNode('names'));
         $this->assertEquals($values, $node->getNode('values'));
@@ -40,30 +38,40 @@ public function getTests()
     {
         $tests = array();

-        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 0)), array(), 0);
-        $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 0)), array(), 0);
-        $node = new Twig_Node_Set(false, $names, $values, 0);
-        $tests[] = array($node, '$context["foo"] = "foo";');
+        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1);
+        $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1)), array(), 1);
+        $node = new Twig_Node_Set(false, $names, $values, 1);
+        $tests[] = array($node, <<<EOF
+// line 1
+\$context["foo"] = "foo";
+EOF
+        );

-        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 0)), array(), 0);
-        $values = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 0), 0)), array(), 0);
-        $node = new Twig_Node_Set(true, $names, $values, 0);
+        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1);
+        $values = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 1), 1)), array(), 1);
+        $node = new Twig_Node_Set(true, $names, $values, 1);
         $tests[] = array($node, <<<EOF
+// line 1
 ob_start();
 echo "foo";
 \$context["foo"] = ('' === \$tmp = ob_get_clean()) ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset());
 EOF
         );

-        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 0)), array(), 0);
-        $values = new Twig_Node_Text('foo', 0);
-        $node = new Twig_Node_Set(true, $names, $values, 0);
-        $tests[] = array($node, '$context["foo"] = (\'\' === $tmp = "foo") ? \'\' : new Twig_Markup($tmp, $this->env->getCharset());');
+        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1);
+        $values = new Twig_Node_Text('foo', 1);
+        $node = new Twig_Node_Set(true, $names, $values, 1);
+        $tests[] = array($node, <<<EOF
+// line 1
+\$context["foo"] = ('' === \$tmp = "foo") ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset());
+EOF
+        );

-        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 0), new Twig_Node_Expression_AssignName('bar', 0)), array(), 0);
-        $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 0), new Twig_Node_Expression_Name('bar', 0)), array(), 0);
-        $node = new Twig_Node_Set(false, $names, $values, 0);
+        $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1), new Twig_Node_Expression_AssignName('bar', 1)), array(), 1);
+        $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Name('bar', 1)), array(), 1);
+        $node = new Twig_Node_Set(false, $names, $values, 1);
         $tests[] = array($node, <<<EOF
+// line 1
 list(\$context["foo"], \$context["bar"]) = array("foo", {$this->getVariableGetter('bar')});
 EOF
         );
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php
index 55892f4..6735dc3 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php
@@ -9,17 +9,15 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_SpacelessTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Spaceless::__construct
      */
     public function testConstructor()
     {
-        $body = new Twig_Node(array(new Twig_Node_Text('<div>   <div>   foo   </div>   </div>', 0)));
-        $node = new Twig_Node_Spaceless($body, 0);
+        $body = new Twig_Node(array(new Twig_Node_Text('<div>   <div>   foo   </div>   </div>', 1)));
+        $node = new Twig_Node_Spaceless($body, 1);

         $this->assertEquals($body, $node->getNode('body'));
     }
@@ -35,11 +33,12 @@ public function testCompile($node, $source, $environment = null)

     public function getTests()
     {
-        $body = new Twig_Node(array(new Twig_Node_Text('<div>   <div>   foo   </div>   </div>', 0)));
-        $node = new Twig_Node_Spaceless($body, 0);
+        $body = new Twig_Node(array(new Twig_Node_Text('<div>   <div>   foo   </div>   </div>', 1)));
+        $node = new Twig_Node_Spaceless($body, 1);

         return array(
             array($node, <<<EOF
+// line 1
 ob_start();
 echo "<div>   <div>   foo   </div>   </div>";
 echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/TestCase.php b/core/vendor/twig/twig/test/Twig/Tests/Node/TestCase.php
deleted file mode 100644
index f142529..0000000
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/TestCase.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-/*
- * This file is part of Twig.
- *
- * (c) Fabien Potencier
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-abstract class Twig_Tests_Node_TestCase extends PHPUnit_Framework_TestCase
-{
-    abstract public function getTests();
-
-    /**
-     * @dataProvider getTests
-     */
-    public function testCompile($node, $source, $environment = null)
-    {
-        $this->assertNodeCompilation($source, $node, $environment);
-    }
-
-    public function assertNodeCompilation($source, Twig_Node $node, Twig_Environment $environment = null)
-    {
-        $compiler = $this->getCompiler($environment);
-        $compiler->compile($node);
-
-        $this->assertEquals($source, trim($compiler->getSource()));
-    }
-
-    protected function getCompiler(Twig_Environment $environment = null)
-    {
-        return new Twig_Compiler(null === $environment ? $this->getEnvironment() : $environment);
-    }
-
-    protected function getEnvironment()
-    {
-        return new Twig_Environment();
-    }
-
-    protected function getVariableGetter($name)
-    {
-        if (version_compare(phpversion(), '5.4.0RC1', '>=')) {
-            return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
-        }
-
-        return sprintf('$this->getContext($context, "%s")', $name);
-    }
-
-    protected function getAttributeGetter()
-    {
-        if (function_exists('twig_template_get_attributes')) {
-            return 'twig_template_get_attributes($this, ';
-        }
-
-        return '$this->getAttribute(';
-    }
-}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php b/core/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php
index 87e0337..6f85576 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php
@@ -9,16 +9,14 @@
  * file that was distributed with this source code.
  */

-require_once dirname(__FILE__).'/TestCase.php';
-
-class Twig_Tests_Node_TextTest extends Twig_Tests_Node_TestCase
+class Twig_Tests_Node_TextTest extends Twig_Test_NodeTestCase
 {
     /**
      * @covers Twig_Node_Text::__construct
      */
     public function testConstructor()
     {
-        $node = new Twig_Node_Text('foo', 0);
+        $node = new Twig_Node_Text('foo', 1);

         $this->assertEquals('foo', $node->getAttribute('data'));
     }
@@ -35,7 +33,7 @@ public function testCompile($node, $source, $environment = null)
     public function getTests()
     {
         $tests = array();
-        $tests[] = array(new Twig_Node_Text('foo', 0), 'echo "foo";');
+        $tests[] = array(new Twig_Node_Text('foo', 1), "// line 1\necho \"foo\";");

         return $tests;
     }
diff --git a/core/vendor/twig/twig/test/Twig/Tests/ParserTest.php b/core/vendor/twig/twig/test/Twig/Tests/ParserTest.php
index 76f257a..9c757ee 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/ParserTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/ParserTest.php
@@ -15,21 +15,21 @@ class Twig_Tests_ParserTest extends PHPUnit_Framework_TestCase
      */
     public function testSetMacroThrowsExceptionOnReservedMethods()
     {
-        $parser = new Twig_Parser(new Twig_Environment());
+        $parser = $this->getParser();
         $parser->setMacro('display', $this->getMock('Twig_Node_Macro', array(), array(), '', null));
     }

     /**
      * @expectedException        Twig_Error_Syntax
-     * @expectedExceptionMessage Unknown tag name "foo". Did you mean "for" at line 0
+     * @expectedExceptionMessage Unknown tag name "foo". Did you mean "for" at line 1
      */
     public function testUnkownTag()
     {
         $stream = new Twig_TokenStream(array(
-            new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 0),
-            new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 0),
-            new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 0),
-            new Twig_Token(Twig_Token::EOF_TYPE, '', 0),
+            new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1),
+            new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 1),
+            new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1),
+            new Twig_Token(Twig_Token::EOF_TYPE, '', 1),
         ));
         $parser = new Twig_Parser(new Twig_Environment());
         $parser->parse($stream);
@@ -40,7 +40,7 @@ public function testUnkownTag()
      */
     public function testFilterBodyNodes($input, $expected)
     {
-        $parser = $this->getParserForFilterBodyNodes();
+        $parser = $this->getParser();

         $this->assertEquals($expected, $parser->filterBodyNodes($input));
     }
@@ -49,15 +49,15 @@ public function getFilterBodyNodesData()
     {
         return array(
             array(
-                new Twig_Node(array(new Twig_Node_Text('   ', 0))),
+                new Twig_Node(array(new Twig_Node_Text('   ', 1))),
                 new Twig_Node(array()),
             ),
             array(
-                $input = new Twig_Node(array(new Twig_Node_Set(false, new Twig_Node(), new Twig_Node(), 0))),
+                $input = new Twig_Node(array(new Twig_Node_Set(false, new Twig_Node(), new Twig_Node(), 1))),
                 $input,
             ),
             array(
-                $input = new Twig_Node(array(new Twig_Node_Set(true, new Twig_Node(), new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 0))))), 0))),
+                $input = new Twig_Node(array(new Twig_Node_Set(true, new Twig_Node(), new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 1))))), 1))),
                 $input,
             ),
         );
@@ -69,7 +69,7 @@ public function getFilterBodyNodesData()
      */
     public function testFilterBodyNodesThrowsException($input)
     {
-        $parser = $this->getParserForFilterBodyNodes();
+        $parser = $this->getParser();

         $parser->filterBodyNodes($input);
     }
@@ -77,19 +77,19 @@ public function testFilterBodyNodesThrowsException($input)
     public function getFilterBodyNodesDataThrowsException()
     {
         return array(
-            array(new Twig_Node_Text('foo', 0)),
-            array(new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 0)))))),
+            array(new Twig_Node_Text('foo', 1)),
+            array(new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 1)))))),
         );
     }

     /**
      * @expectedException Twig_Error_Syntax
-     * @expectedExceptionMessage A template that extends another one cannot have a body but a byte order mark (BOM) has been detected; it must be removed at line 0.
+     * @expectedExceptionMessage A template that extends another one cannot have a body but a byte order mark (BOM) has been detected; it must be removed at line 1.
      */
     public function testFilterBodyNodesWithBOM()
     {
-        $parser = $this->getParserForFilterBodyNodes();
-        $parser->filterBodyNodes(new Twig_Node_Text(chr(0xEF).chr(0xBB).chr(0xBF), 0));
+        $parser = $this->getParser();
+        $parser->filterBodyNodes(new Twig_Node_Text(chr(0xEF).chr(0xBB).chr(0xBF), 1));
     }

     public function testParseIsReentrant()
@@ -103,19 +103,39 @@ public function testParseIsReentrant()
         $parser = new Twig_Parser($twig);

         $parser->parse(new Twig_TokenStream(array(
-            new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 0),
-            new Twig_Token(Twig_Token::NAME_TYPE, 'test', 0),
-            new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 0),
-            new Twig_Token(Twig_Token::VAR_START_TYPE, '', 0),
-            new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 0),
-            new Twig_Token(Twig_Token::VAR_END_TYPE, '', 0),
-            new Twig_Token(Twig_Token::EOF_TYPE, '', 0),
+            new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1),
+            new Twig_Token(Twig_Token::NAME_TYPE, 'test', 1),
+            new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1),
+            new Twig_Token(Twig_Token::VAR_START_TYPE, '', 1),
+            new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 1),
+            new Twig_Token(Twig_Token::VAR_END_TYPE, '', 1),
+            new Twig_Token(Twig_Token::EOF_TYPE, '', 1),
         )));

         $this->assertEquals(null, $parser->getParent());
     }

-    protected function getParserForFilterBodyNodes()
+    // The getVarName() must not depend on the template loaders,
+    // If this test does not throw any exception, that's good.
+    // see https://github.com/symfony/symfony/issues/4218
+    public function testGetVarName()
+    {
+        $twig = new Twig_Environment(null, array(
+            'autoescape' => false,
+            'optimizations' => 0,
+        ));
+
+        $twig->parse($twig->tokenize(<<<EOF
+{% from _self import foo %}
+
+{% macro foo() %}
+    {{ foo }}
+{% endmacro %}
+EOF
+        ));
+    }
+
+    protected function getParser()
     {
         $parser = new TestParser(new Twig_Environment());
         $parser->setParent(new Twig_Node());
@@ -141,11 +161,11 @@ public function parse(Twig_Token $token)
     {
         // simulate the parsing of another template right in the middle of the parsing of the current template
         $this->parser->parse(new Twig_TokenStream(array(
-            new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 0),
-            new Twig_Token(Twig_Token::NAME_TYPE, 'extends', 0),
-            new Twig_Token(Twig_Token::STRING_TYPE, 'base', 0),
-            new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 0),
-            new Twig_Token(Twig_Token::EOF_TYPE, '', 0),
+            new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1),
+            new Twig_Token(Twig_Token::NAME_TYPE, 'extends', 1),
+            new Twig_Token(Twig_Token::STRING_TYPE, 'base', 1),
+            new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1),
+            new Twig_Token(Twig_Token::EOF_TYPE, '', 1),
         )));

         $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
diff --git a/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php b/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php
index 4213e2b..9ed1eff 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/TemplateTest.php
@@ -11,17 +11,53 @@
 class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase
 {
     /**
-     * @expectedException        Twig_Error_Runtime
-     * @expectedExceptionMessage Impossible to access a key ("a") on a "string" variable
+     * @dataProvider getAttributeExceptions
      */
-    public function testAttributeOnAString()
+    public function testGetAttributeExceptions($template, $message, $useExt)
     {
-        $template = new Twig_TemplateTest(
-            new Twig_Environment(null, array('strict_variables' => true)),
-            false
+        $name = 'index_'.($useExt ? 1 : 0);
+        $templates = array(
+            $name => $template.$useExt, // appending $useExt makes the template content unique
         );

-        $template->getAttribute('string', 'a', array(), Twig_TemplateInterface::ARRAY_CALL, false);
+        $env = new Twig_Environment(new Twig_Loader_Array($templates), array('strict_variables' => true));
+        if (!$useExt) {
+            $env->addNodeVisitor(new CExtDisablingNodeVisitor());
+        }
+        $template = $env->loadTemplate($name);
+
+        $context = array(
+            'string'       => 'foo',
+            'array'        => array('foo' => 'foo'),
+            'array_access' => new Twig_TemplateArrayAccessObject(),
+        );
+
+        try {
+            $template->render($context);
+        } catch (Twig_Error_Runtime $e) {
+            $this->assertEquals(sprintf($message, $name), $e->getMessage());
+        }
+    }
+
+    public function getAttributeExceptions()
+    {
+        $tests = array(
+            array('{{ string["a"] }}', 'Impossible to access a key ("a") on a "string" variable in "%s" at line 1', false),
+            array('{{ array["a"] }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1', false),
+            array('{{ array_access["a"] }}', 'Key "a" in object (with ArrayAccess) of type "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1', false),
+            array('{{ string.a }}', 'Item "a" for "foo" does not exist in "%s" at line 1', false),
+            array('{{ array.a }}', 'Item "a" for "Array" does not exist in "%s" at line 1', false),
+            array('{{ array_access.a }}', 'Method "a" for object "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1', false),
+        );
+
+        if (function_exists('twig_template_get_attributes')) {
+            foreach (array_slice($tests, 0) as $test) {
+                $test[2] = true;
+                $tests[] = $test;
+            }
+        }
+
+        return $tests;
     }

     /**
@@ -29,10 +65,7 @@ public function testAttributeOnAString()
      */
     public function testGetAttribute($defined, $value, $object, $item, $arguments, $type, $useExt = false)
     {
-        $template = new Twig_TemplateTest(
-            new Twig_Environment(),
-            $useExt
-        );
+        $template = new Twig_TemplateTest(new Twig_Environment(), $useExt);

         $this->assertEquals($value, $template->getAttribute($object, $item, $arguments, $type));
     }
@@ -42,10 +75,7 @@ public function testGetAttribute($defined, $value, $object, $item, $arguments, $
      */
     public function testGetAttributeStrict($defined, $value, $object, $item, $arguments, $type, $useExt = false, $exceptionMessage = null)
     {
-        $template = new Twig_TemplateTest(
-            new Twig_Environment(null, array('strict_variables' => true)),
-            $useExt
-        );
+        $template = new Twig_TemplateTest(new Twig_Environment(null, array('strict_variables' => true)), $useExt);

         if ($defined) {
             $this->assertEquals($value, $template->getAttribute($object, $item, $arguments, $type));
@@ -67,10 +97,7 @@ public function testGetAttributeStrict($defined, $value, $object, $item, $argume
      */
     public function testGetAttributeDefined($defined, $value, $object, $item, $arguments, $type, $useExt = false)
     {
-        $template = new Twig_TemplateTest(
-            new Twig_Environment(),
-            $useExt
-        );
+        $template = new Twig_TemplateTest(new Twig_Environment(), $useExt);

         $this->assertEquals($defined, $template->getAttribute($object, $item, $arguments, $type, true));
     }
@@ -80,10 +107,7 @@ public function testGetAttributeDefined($defined, $value, $object, $item, $argum
      */
     public function testGetAttributeDefinedStrict($defined, $value, $object, $item, $arguments, $type, $useExt = false)
     {
-        $template = new Twig_TemplateTest(
-            new Twig_Environment(null, array('strict_variables' => true)),
-            $useExt
-        );
+        $template = new Twig_TemplateTest(new Twig_Environment(null, array('strict_variables' => true)), $useExt);

         $this->assertEquals($defined, $template->getAttribute($object, $item, $arguments, $type, true));
     }
@@ -102,6 +126,7 @@ public function getGetAttributeTests()
         $magicPropertyObject = new Twig_TemplateMagicPropertyObject();
         $propertyObject      = new Twig_TemplatePropertyObject();
         $propertyObject1     = new Twig_TemplatePropertyObjectAndIterator();
+        $propertyObject2     = new Twig_TemplatePropertyObjectAndArrayAccess();
         $methodObject        = new Twig_TemplateMethodObject();
         $magicMethodObject   = new Twig_TemplateMagicMethodObject();

@@ -129,6 +154,7 @@ public function getGetAttributeTests()
             array($methodObject,        $anyType),
             array($propertyObject,      $anyType),
             array($propertyObject1,     $anyType),
+            array($propertyObject2,     $anyType),
         );

         $tests = array();
@@ -194,7 +220,7 @@ public function getGetAttributeTests()
         // add twig_template_get_attributes tests

         if (function_exists('twig_template_get_attributes')) {
-            foreach(array_slice($tests, 0) as $test) {
+            foreach (array_slice($tests, 0) as $test) {
                 $test = array_pad($test, 7, null);
                 $test[6] = true;
                 $tests[] = $test;
@@ -203,11 +229,6 @@ public function getGetAttributeTests()

         return $tests;
     }
-
-    public function useExtGetAttribute()
-    {
-        return false;
-    }
 }

 class Twig_TemplateTest extends Twig_Template
@@ -318,6 +339,29 @@ public function getIterator()
     }
 }

+class Twig_TemplatePropertyObjectAndArrayAccess extends Twig_TemplatePropertyObject implements ArrayAccess
+{
+    private $data = array();
+
+    public function offsetExists($offset)
+    {
+        return array_key_exists($offset, $this->data);
+    }
+
+    public function offsetGet($offset)
+    {
+        return $this->offsetExists($offset) ? $this->data[$offset] : 'n/a';
+    }
+
+    public function offsetSet($offset, $value)
+    {
+    }
+
+    public function offsetUnset($offset)
+    {
+    }
+}
+
 class Twig_TemplateMethodObject
 {
     public function getDefined()
@@ -345,7 +389,7 @@ protected function getProtected()
         return 'protected';
     }

-    static public function getStatic()
+    public static function getStatic()
     {
         return 'static';
     }
@@ -354,24 +398,50 @@ static public function getStatic()
 class Twig_TemplateMethodAndPropObject
 {
     private $a = 'a_prop';
-    public function getA() {
+    public function getA()
+    {
         return 'a';
     }

     public $b = 'b_prop';
-    public function getB() {
+    public function getB()
+    {
         return 'b';
     }

     private $c = 'c_prop';
-    private function getC() {
+    private function getC()
+    {
         return 'c';
     }
 }

 class Twig_TemplateMagicMethodObject
 {
-    public function __call($method, $arguments) {
+    public function __call($method, $arguments)
+    {
         return '__call_'.$method;
     }
 }
+
+class CExtDisablingNodeVisitor implements Twig_NodeVisitorInterface
+{
+    public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
+    {
+        if ($node instanceof Twig_Node_Expression_GetAttr) {
+            $node->setAttribute('disable_c_ext', true);
+        }
+
+        return $node;
+    }
+
+    public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
+    {
+        return $node;
+    }
+
+    public function getPriority()
+    {
+        return 0;
+    }
+}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php b/core/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php
index 794a037..4edb8c3 100644
--- a/core/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php
+++ b/core/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php
@@ -11,19 +11,19 @@

 class Twig_Tests_TokenStreamTest extends PHPUnit_Framework_TestCase
 {
-    static protected $tokens;
+    protected static $tokens;

     public function setUp()
     {
         self::$tokens = array(
-            new Twig_Token(Twig_Token::TEXT_TYPE, 1, 0),
-            new Twig_Token(Twig_Token::TEXT_TYPE, 2, 0),
-            new Twig_Token(Twig_Token::TEXT_TYPE, 3, 0),
-            new Twig_Token(Twig_Token::TEXT_TYPE, 4, 0),
-            new Twig_Token(Twig_Token::TEXT_TYPE, 5, 0),
-            new Twig_Token(Twig_Token::TEXT_TYPE, 6, 0),
-            new Twig_Token(Twig_Token::TEXT_TYPE, 7, 0),
-            new Twig_Token(Twig_Token::EOF_TYPE, 0, 0),
+            new Twig_Token(Twig_Token::TEXT_TYPE, 1, 1),
+            new Twig_Token(Twig_Token::TEXT_TYPE, 2, 1),
+            new Twig_Token(Twig_Token::TEXT_TYPE, 3, 1),
+            new Twig_Token(Twig_Token::TEXT_TYPE, 4, 1),
+            new Twig_Token(Twig_Token::TEXT_TYPE, 5, 1),
+            new Twig_Token(Twig_Token::TEXT_TYPE, 6, 1),
+            new Twig_Token(Twig_Token::TEXT_TYPE, 7, 1),
+            new Twig_Token(Twig_Token::EOF_TYPE, 0, 1),
         );
     }

diff --git a/core/vendor/twig/twig/test/Twig/Tests/escapingTest.php b/core/vendor/twig/twig/test/Twig/Tests/escapingTest.php
new file mode 100644
index 0000000..2492b3a
--- /dev/null
+++ b/core/vendor/twig/twig/test/Twig/Tests/escapingTest.php
@@ -0,0 +1,320 @@
+<?php
+
+/**
+ * This class is adapted from code coming from Zend Framework.
+ *
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license   http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
+{
+    /**
+     * All character encodings supported by htmlspecialchars()
+     */
+    protected $htmlSpecialChars = array(
+        '\''    => '&#039;',
+        '"'     => '&quot;',
+        '<'     => '&lt;',
+        '>'     => '&gt;',
+        '&'     => '&amp;'
+    );
+
+    protected $htmlAttrSpecialChars = array(
+        '\''    => '&#x27;',
+        /* Characters beyond ASCII value 255 to unicode escape */
+        'Ā'     => '&#x0100;',
+        /* Immune chars excluded */
+        ','     => ',',
+        '.'     => '.',
+        '-'     => '-',
+        '_'     => '_',
+        /* Basic alnums exluded */
+        'a'     => 'a',
+        'A'     => 'A',
+        'z'     => 'z',
+        'Z'     => 'Z',
+        '0'     => '0',
+        '9'     => '9',
+        /* Basic control characters and null */
+        "\r"    => '&#x0D;',
+        "\n"    => '&#x0A;',
+        "\t"    => '&#x09;',
+        "\0"    => '&#xFFFD;', // should use Unicode replacement char
+        /* Encode chars as named entities where possible */
+        '<'     => '&lt;',
+        '>'     => '&gt;',
+        '&'     => '&amp;',
+        '"'     => '&quot;',
+        /* Encode spaces for quoteless attribute protection */
+        ' '     => '&#x20;',
+    );
+
+    protected $jsSpecialChars = array(
+        /* HTML special chars - escape without exception to hex */
+        '<'     => '\\x3C',
+        '>'     => '\\x3E',
+        '\''    => '\\x27',
+        '"'     => '\\x22',
+        '&'     => '\\x26',
+        /* Characters beyond ASCII value 255 to unicode escape */
+        'Ā'     => '\\u0100',
+        /* Immune chars excluded */
+        ','     => ',',
+        '.'     => '.',
+        '_'     => '_',
+        /* Basic alnums exluded */
+        'a'     => 'a',
+        'A'     => 'A',
+        'z'     => 'z',
+        'Z'     => 'Z',
+        '0'     => '0',
+        '9'     => '9',
+        /* Basic control characters and null */
+        "\r"    => '\\x0D',
+        "\n"    => '\\x0A',
+        "\t"    => '\\x09',
+        "\0"    => '\\x00',
+        /* Encode spaces for quoteless attribute protection */
+        ' '     => '\\x20',
+    );
+
+    protected $urlSpecialChars = array(
+        /* HTML special chars - escape without exception to percent encoding */
+        '<'     => '%3C',
+        '>'     => '%3E',
+        '\''    => '%27',
+        '"'     => '%22',
+        '&'     => '%26',
+        /* Characters beyond ASCII value 255 to hex sequence */
+        'Ā'     => '%C4%80',
+        /* Punctuation and unreserved check */
+        ','     => '%2C',
+        '.'     => '.',
+        '_'     => '_',
+        '-'     => '-',
+        ':'     => '%3A',
+        ';'     => '%3B',
+        '!'     => '%21',
+        /* Basic alnums excluded */
+        'a'     => 'a',
+        'A'     => 'A',
+        'z'     => 'z',
+        'Z'     => 'Z',
+        '0'     => '0',
+        '9'     => '9',
+        /* Basic control characters and null */
+        "\r"    => '%0D',
+        "\n"    => '%0A',
+        "\t"    => '%09',
+        "\0"    => '%00',
+        /* PHP quirks from the past */
+        ' '     => '%20',
+        '~'     => '~',
+        '+'     => '%2B',
+    );
+
+    protected $cssSpecialChars = array(
+        /* HTML special chars - escape without exception to hex */
+        '<'     => '\\3C ',
+        '>'     => '\\3E ',
+        '\''    => '\\27 ',
+        '"'     => '\\22 ',
+        '&'     => '\\26 ',
+        /* Characters beyond ASCII value 255 to unicode escape */
+        'Ā'     => '\\100 ',
+        /* Immune chars excluded */
+        ','     => '\\2C ',
+        '.'     => '\\2E ',
+        '_'     => '\\5F ',
+        /* Basic alnums exluded */
+        'a'     => 'a',
+        'A'     => 'A',
+        'z'     => 'z',
+        'Z'     => 'Z',
+        '0'     => '0',
+        '9'     => '9',
+        /* Basic control characters and null */
+        "\r"    => '\\D ',
+        "\n"    => '\\A ',
+        "\t"    => '\\9 ',
+        "\0"    => '\\0 ',
+        /* Encode spaces for quoteless attribute protection */
+        ' '     => '\\20 ',
+    );
+
+    protected $env;
+
+    public function setUp()
+    {
+        $this->env = new Twig_Environment();
+    }
+
+    public function testHtmlEscapingConvertsSpecialChars()
+    {
+        foreach ($this->htmlSpecialChars as $key => $value) {
+            $this->assertEquals($value, twig_escape_filter($this->env, $key, 'html'), 'Failed to escape: '.$key);
+        }
+    }
+
+    public function testHtmlAttributeEscapingConvertsSpecialChars()
+    {
+        foreach ($this->htmlAttrSpecialChars as $key => $value) {
+            $this->assertEquals($value, twig_escape_filter($this->env, $key, 'html_attr'), 'Failed to escape: '.$key);
+        }
+    }
+
+    public function testJavascriptEscapingConvertsSpecialChars()
+    {
+        foreach ($this->jsSpecialChars as $key => $value) {
+            $this->assertEquals($value, twig_escape_filter($this->env, $key, 'js'), 'Failed to escape: '.$key);
+        }
+    }
+
+    public function testJavascriptEscapingReturnsStringIfZeroLength()
+    {
+        $this->assertEquals('', twig_escape_filter($this->env, '', 'js'));
+    }
+
+    public function testJavascriptEscapingReturnsStringIfContainsOnlyDigits()
+    {
+        $this->assertEquals('123', twig_escape_filter($this->env, '123', 'js'));
+    }
+
+    public function testCssEscapingConvertsSpecialChars()
+    {
+        foreach ($this->cssSpecialChars as $key => $value) {
+            $this->assertEquals($value, twig_escape_filter($this->env, $key, 'css'), 'Failed to escape: '.$key);
+        }
+    }
+
+    public function testCssEscapingReturnsStringIfZeroLength()
+    {
+        $this->assertEquals('', twig_escape_filter($this->env, '', 'css'));
+    }
+
+    public function testCssEscapingReturnsStringIfContainsOnlyDigits()
+    {
+        $this->assertEquals('123', twig_escape_filter($this->env, '123', 'css'));
+    }
+
+    public function testUrlEscapingConvertsSpecialChars()
+    {
+        foreach ($this->urlSpecialChars as $key => $value) {
+            $this->assertEquals($value, twig_escape_filter($this->env, $key, 'url'), 'Failed to escape: '.$key);
+        }
+    }
+
+    /**
+     * Range tests to confirm escaped range of characters is within OWASP recommendation
+     */
+
+    /**
+     * Only testing the first few 2 ranges on this prot. function as that's all these
+     * other range tests require
+     */
+    public function testUnicodeCodepointConversionToUtf8()
+    {
+        $expected = " ~ޙ";
+        $codepoints = array(0x20, 0x7e, 0x799);
+        $result = '';
+        foreach ($codepoints as $value) {
+            $result .= $this->codepointToUtf8($value);
+        }
+        $this->assertEquals($expected, $result);
+    }
+
+    /**
+     * Convert a Unicode Codepoint to a literal UTF-8 character.
+     *
+     * @param int Unicode codepoint in hex notation
+     * @return string UTF-8 literal string
+     */
+    protected function codepointToUtf8($codepoint)
+    {
+        if ($codepoint < 0x80) {
+            return chr($codepoint);
+        }
+        if ($codepoint < 0x800) {
+            return chr($codepoint >> 6 & 0x3f | 0xc0)
+                . chr($codepoint & 0x3f | 0x80);
+        }
+        if ($codepoint < 0x10000) {
+            return chr($codepoint >> 12 & 0x0f | 0xe0)
+                . chr($codepoint >> 6 & 0x3f | 0x80)
+                . chr($codepoint & 0x3f | 0x80);
+        }
+        if ($codepoint < 0x110000) {
+            return chr($codepoint >> 18 & 0x07 | 0xf0)
+                . chr($codepoint >> 12 & 0x3f | 0x80)
+                . chr($codepoint >> 6 & 0x3f | 0x80)
+                . chr($codepoint & 0x3f | 0x80);
+        }
+        throw new Exception('Codepoint requested outside of Unicode range');
+    }
+
+    public function testJavascriptEscapingEscapesOwaspRecommendedRanges()
+    {
+        $immune = array(',', '.', '_'); // Exceptions to escaping ranges
+        for ($chr=0; $chr < 0xFF; $chr++) {
+            if ($chr >= 0x30 && $chr <= 0x39
+            || $chr >= 0x41 && $chr <= 0x5A
+            || $chr >= 0x61 && $chr <= 0x7A) {
+                $literal = $this->codepointToUtf8($chr);
+                $this->assertEquals($literal, twig_escape_filter($this->env, $literal, 'js'));
+            } else {
+                $literal = $this->codepointToUtf8($chr);
+                if (in_array($literal, $immune)) {
+                    $this->assertEquals($literal, twig_escape_filter($this->env, $literal, 'js'));
+                } else {
+                    $this->assertNotEquals(
+                        $literal,
+                        twig_escape_filter($this->env, $literal, 'js'),
+                        "$literal should be escaped!");
+                }
+            }
+        }
+    }
+
+    public function testHtmlAttributeEscapingEscapesOwaspRecommendedRanges()
+    {
+        $immune = array(',', '.', '-', '_'); // Exceptions to escaping ranges
+        for ($chr=0; $chr < 0xFF; $chr++) {
+            if ($chr >= 0x30 && $chr <= 0x39
+            || $chr >= 0x41 && $chr <= 0x5A
+            || $chr >= 0x61 && $chr <= 0x7A) {
+                $literal = $this->codepointToUtf8($chr);
+                $this->assertEquals($literal, twig_escape_filter($this->env, $literal, 'html_attr'));
+            } else {
+                $literal = $this->codepointToUtf8($chr);
+                if (in_array($literal, $immune)) {
+                    $this->assertEquals($literal, twig_escape_filter($this->env, $literal, 'html_attr'));
+                } else {
+                    $this->assertNotEquals(
+                        $literal,
+                        twig_escape_filter($this->env, $literal, 'html_attr'),
+                        "$literal should be escaped!");
+                }
+            }
+        }
+    }
+
+    public function testCssEscapingEscapesOwaspRecommendedRanges()
+    {
+        $immune = array(); // CSS has no exceptions to escaping ranges
+        for ($chr=0; $chr < 0xFF; $chr++) {
+            if ($chr >= 0x30 && $chr <= 0x39
+            || $chr >= 0x41 && $chr <= 0x5A
+            || $chr >= 0x61 && $chr <= 0x7A) {
+                $literal = $this->codepointToUtf8($chr);
+                $this->assertEquals($literal, twig_escape_filter($this->env, $literal, 'css'));
+            } else {
+                $literal = $this->codepointToUtf8($chr);
+                $this->assertNotEquals(
+                    $literal,
+                    twig_escape_filter($this->env, $literal, 'css'),
+                    "$literal should be escaped!");
+            }
+        }
+    }
+}
diff --git a/core/vendor/twig/twig/test/Twig/Tests/integrationTest.php b/core/vendor/twig/twig/test/Twig/Tests/integrationTest.php
deleted file mode 100644
index b905b56..0000000
--- a/core/vendor/twig/twig/test/Twig/Tests/integrationTest.php
+++ /dev/null
@@ -1,322 +0,0 @@
-<?php
-
-/*
- * This file is part of Twig.
- *
- * (c) Fabien Potencier
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-// This function is defined to check that escaping strategies
-// like html works even if a function with the same name is defined.
-function html()
-{
-    return 'foo';
-}
-
-class Twig_Tests_IntegrationTest extends PHPUnit_Framework_TestCase
-{
-    public function getTests()
-    {
-        $fixturesDir = realpath(dirname(__FILE__).'/Fixtures/');
-        $tests = array();
-
-        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fixturesDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
-            if (!preg_match('/\.test$/', $file)) {
-                continue;
-            }
-
-            $test = file_get_contents($file->getRealpath());
-
-            if (preg_match('/
-                    --TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*))+)\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) {
-                $message = $match[1];
-                $condition = $match[2];
-                $templates = $this->parseTemplates($match[3]);
-                $exception = $match[4];
-                $outputs = array(null, array(), null, '');
-            } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) {
-                $message = $match[1];
-                $condition = $match[2];
-                $templates = $this->parseTemplates($match[3]);
-                $exception = false;
-                preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, PREG_SET_ORDER);
-            } else {
-                throw new InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file)));
-            }
-
-            $tests[] = array(str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs);
-        }
-
-        return $tests;
-    }
-
-    /**
-     * @dataProvider getTests
-     */
-    public function testIntegration($file, $message, $condition, $templates, $exception, $outputs)
-    {
-        if ($condition) {
-            eval('$ret = '.$condition.';');
-            if (!$ret) {
-                $this->markTestSkipped($condition);
-            }
-        }
-
-        $loader = new Twig_Loader_Array($templates);
-
-        foreach ($outputs as $match) {
-            $config = array_merge(array(
-                'cache' => false,
-                'strict_variables' => true,
-            ), $match[2] ? eval($match[2].';') : array());
-            $twig = new Twig_Environment($loader, $config);
-            $twig->addExtension(new TestExtension());
-            $twig->addExtension(new Twig_Extension_Debug());
-            $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(), array(), array());
-            $twig->addExtension(new Twig_Extension_Sandbox($policy, false));
-            $twig->addGlobal('global', 'global');
-
-            try {
-                $template = $twig->loadTemplate('index.twig');
-            } catch (Exception $e) {
-                if (false !== $exception) {
-                    $this->assertEquals(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage())));
-
-                    return;
-                }
-
-                if ($e instanceof Twig_Error_Syntax) {
-                    $e->setTemplateFile($file);
-
-                    throw $e;
-                }
-
-                throw new Twig_Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e);
-            }
-
-            try {
-                $output = trim($template->render(eval($match[1].';')), "\n ");
-            } catch (Exception $e) {
-                if (false !== $exception) {
-                    $this->assertEquals(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage())));
-
-                    return;
-                }
-
-                if ($e instanceof Twig_Error_Syntax) {
-                    $e->setTemplateFile($file);
-                } else {
-                    $e = new Twig_Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e);
-                }
-
-                $output = trim(sprintf('%s: %s', get_class($e), $e->getMessage()));
-            }
-            $expected = trim($match[3], "\n ");
-
-            if ($expected != $output)  {
-                echo 'Compiled template that failed:';
-
-                foreach (array_keys($templates) as $name)  {
-                    echo "Template: $name\n";
-                    $source = $loader->getSource($name);
-                    echo $twig->compile($twig->parse($twig->tokenize($source, $name)));
-                }
-            }
-            $this->assertEquals($expected, $output, $message.' (in '.$file.')');
-        }
-    }
-
-    protected function parseTemplates($test)
-    {
-        $templates = array();
-        preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, PREG_SET_ORDER);
-        foreach ($matches as $match) {
-            $templates[($match[1] ? $match[1] : 'index.twig')] = $match[2];
-        }
-
-        return $templates;
-    }
-}
-
-function test_foo($value = 'foo')
-{
-    return $value;
-}
-
-class Foo implements Iterator
-{
-    const BAR_NAME = 'bar';
-
-    public $position = 0;
-    public $array = array(1, 2);
-
-    public function bar($param1 = null, $param2 = null)
-    {
-        return 'bar'.($param1 ? '_'.$param1 : '').($param2 ? '-'.$param2 : '');
-    }
-
-    public function getFoo()
-    {
-        return 'foo';
-    }
-
-    public function getSelf()
-    {
-        return $this;
-    }
-
-    public function is()
-    {
-        return 'is';
-    }
-
-    public function in()
-    {
-        return 'in';
-    }
-
-    public function not()
-    {
-        return 'not';
-    }
-
-    public function strToLower($value)
-    {
-        return strtolower($value);
-    }
-
-    public function rewind()
-    {
-        $this->position = 0;
-    }
-
-    public function current()
-    {
-        return $this->array[$this->position];
-    }
-
-    public function key()
-    {
-        return 'a';
-    }
-
-    public function next()
-    {
-        ++$this->position;
-    }
-
-    public function valid()
-    {
-        return isset($this->array[$this->position]);
-    }
-}
-
-class TestTokenParser_☃ extends Twig_TokenParser
-{
-    public function parse(Twig_Token $token)
-    {
-        $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
-
-        return new Twig_Node_Print(new Twig_Node_Expression_Constant('☃', -1), -1);
-    }
-
-    public function getTag()
-    {
-        return '☃';
-    }
-}
-
-class TestExtension extends Twig_Extension
-{
-    public function getTokenParsers()
-    {
-        return array(
-            new TestTokenParser_☃(),
-        );
-    }
-
-    public function getFilters()
-    {
-        return array(
-            '☃'                => new Twig_Filter_Method($this, '☃Filter'),
-            'escape_and_nl2br' => new Twig_Filter_Method($this, 'escape_and_nl2br', array('needs_environment' => true, 'is_safe' => array('html'))),
-            'nl2br'            => new Twig_Filter_Method($this, 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))),
-            'escape_something' => new Twig_Filter_Method($this, 'escape_something', array('is_safe' => array('something'))),
-            'preserves_safety' => new Twig_Filter_Method($this, 'preserves_safety', array('preserves_safety' => array('html'))),
-            '*_path'           => new Twig_Filter_Method($this, 'dynamic_path'),
-            '*_foo_*_bar'      => new Twig_Filter_Method($this, 'dynamic_foo'),
-        );
-    }
-
-    public function getFunctions()
-    {
-        return array(
-            '☃'           => new Twig_Function_Method($this, '☃Function'),
-            'safe_br'     => new Twig_Function_Method($this, 'br', array('is_safe' => array('html'))),
-            'unsafe_br'   => new Twig_Function_Method($this, 'br'),
-            '*_path'      => new Twig_Function_Method($this, 'dynamic_path'),
-            '*_foo_*_bar' => new Twig_Function_Method($this, 'dynamic_foo'),
-        );
-    }
-
-    public function ☃Filter($value)
-    {
-        return "☃{$value}☃";
-    }
-
-    public function ☃Function($value)
-    {
-        return "☃{$value}☃";
-    }
-
-    /**
-     * nl2br which also escapes, for testing escaper filters
-     */
-    public function escape_and_nl2br($env, $value, $sep = '<br />')
-    {
-        return $this->nl2br(twig_escape_filter($env, $value, 'html'), $sep);
-    }
-
-    /**
-     * nl2br only, for testing filters with pre_escape
-     */
-    public function nl2br($value, $sep = '<br />')
-    {
-        // not secure if $value contains html tags (not only entities)
-        // don't use
-        return str_replace("\n", "$sep\n", $value);
-    }
-
-    public function dynamic_path($element, $item)
-    {
-        return $element.'/'.$item;
-    }
-
-    public function dynamic_foo($foo, $bar, $item)
-    {
-        return $foo.'/'.$bar.'/'.$item;
-    }
-
-    public function escape_something($value)
-    {
-        return strtoupper($value);
-    }
-
-    public function preserves_safety($value)
-    {
-        return strtoupper($value);
-    }
-
-    public function br()
-    {
-        return '<br />';
-    }
-
-    public function getName()
-    {
-        return 'test';
-    }
-}
