diff --git a/composer.lock b/composer.lock
index 5a70a6e..c6ae6db 100644
--- a/composer.lock
+++ b/composer.lock
@@ -78,22 +78,30 @@
         },
         {
             "name": "doctrine/cache",
-            "version": "v1.0",
+            "version": "v1.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/cache.git",
-                "reference": "v1.0"
+                "reference": "d0e4447707a064a5814b18cb0dcc2f24185f6179"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://github.com/doctrine/cache/archive/v1.0.zip",
-                "reference": "v1.0",
+                "url": "https://api.github.com/repos/doctrine/cache/zipball/d0e4447707a064a5814b18cb0dcc2f24185f6179",
+                "reference": "d0e4447707a064a5814b18cb0dcc2f24185f6179",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.2"
             },
+            "conflict": {
+                "doctrine/common": ">2.2,<2.4"
+            },
             "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
             "autoload": {
                 "psr-0": {
                     "Doctrine\\Common\\Cache\\": "lib/"
@@ -123,9 +131,9 @@
                     "email": "kontakt@beberlei.de"
                 },
                 {
-                    "name": "Johannes M. Schmitt",
+                    "name": "Johannes Schmitt",
                     "email": "schmittjoh@gmail.com",
-                    "homepage": "https://github.com/schmittjoh",
+                    "homepage": "http://jmsyst.com",
                     "role": "Developer of wrapped JMSSerializerBundle"
                 }
             ],
@@ -135,7 +143,7 @@
                 "cache",
                 "caching"
             ],
-            "time": "2013-01-10 22:43:46"
+            "time": "2013-09-26 19:23:25"
         },
         {
             "name": "doctrine/collections",
@@ -206,16 +214,16 @@
         },
         {
             "name": "doctrine/common",
-            "version": "2.4.0-RC4",
+            "version": "v2.4.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/common.git",
-                "reference": "2.4.0-RC4"
+                "reference": "ceb18cf9b0230f3ea208b6238130fd415abda0a7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/common/zipball/2.4.0-RC4",
-                "reference": "2.4.0-RC4",
+                "url": "https://api.github.com/repos/doctrine/common/zipball/ceb18cf9b0230f3ea208b6238130fd415abda0a7",
+                "reference": "ceb18cf9b0230f3ea208b6238130fd415abda0a7",
                 "shasum": ""
             },
             "require": {
@@ -261,9 +269,9 @@
                     "email": "kontakt@beberlei.de"
                 },
                 {
-                    "name": "Johannes M. Schmitt",
+                    "name": "Johannes Schmitt",
                     "email": "schmittjoh@gmail.com",
-                    "homepage": "https://github.com/schmittjoh",
+                    "homepage": "http://jmsyst.com",
                     "role": "Developer of wrapped JMSSerializerBundle"
                 }
             ],
@@ -276,7 +284,7 @@
                 "persistence",
                 "spl"
             ],
-            "time": "2013-06-21 12:11:28"
+            "time": "2013-09-07 10:20:34"
         },
         {
             "name": "doctrine/inflector",
diff --git a/core/vendor/autoload.php b/core/vendor/autoload.php
index aac8b62..1bab766 100644
--- a/core/vendor/autoload.php
+++ b/core/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2::getLoader();
+return ComposerAutoloaderInit7db00cecc9870ea02f41febd7ee32993::getLoader();
diff --git a/core/vendor/composer/autoload_real.php b/core/vendor/composer/autoload_real.php
index b7dd370..98a158b 100644
--- a/core/vendor/composer/autoload_real.php
+++ b/core/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2
+class ComposerAutoloaderInit7db00cecc9870ea02f41febd7ee32993
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ public static function getLoader()
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit7db00cecc9870ea02f41febd7ee32993', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit7ffa68419492d19fe654de54c86ae5d2', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit7db00cecc9870ea02f41febd7ee32993', 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname(dirname($vendorDir));
diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json
index 8347a64..5597e26 100644
--- a/core/vendor/composer/installed.json
+++ b/core/vendor/composer/installed.json
@@ -980,69 +980,6 @@
         ]
     },
     {
-        "name": "doctrine/cache",
-        "version": "v1.0",
-        "version_normalized": "1.0.0.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/doctrine/cache.git",
-            "reference": "v1.0"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://github.com/doctrine/cache/archive/v1.0.zip",
-            "reference": "v1.0",
-            "shasum": ""
-        },
-        "require": {
-            "php": ">=5.3.2"
-        },
-        "time": "2013-01-10 22:43:46",
-        "type": "library",
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "Doctrine\\Common\\Cache\\": "lib/"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "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 M. Schmitt",
-                "email": "schmittjoh@gmail.com",
-                "homepage": "https://github.com/schmittjoh",
-                "role": "Developer of wrapped JMSSerializerBundle"
-            }
-        ],
-        "description": "Caching library offering an object-oriented API for many cache backends",
-        "homepage": "http://www.doctrine-project.org",
-        "keywords": [
-            "cache",
-            "caching"
-        ]
-    },
-    {
         "name": "doctrine/inflector",
         "version": "v1.0",
         "version_normalized": "1.0.0.0",
@@ -1108,82 +1045,6 @@
         ]
     },
     {
-        "name": "doctrine/common",
-        "version": "2.4.0-RC4",
-        "version_normalized": "2.4.0.0-RC4",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/doctrine/common.git",
-            "reference": "2.4.0-RC4"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/doctrine/common/zipball/2.4.0-RC4",
-            "reference": "2.4.0-RC4",
-            "shasum": ""
-        },
-        "require": {
-            "doctrine/annotations": "1.*",
-            "doctrine/cache": "1.*",
-            "doctrine/collections": "1.*",
-            "doctrine/inflector": "1.*",
-            "doctrine/lexer": "1.*",
-            "php": ">=5.3.2"
-        },
-        "time": "2013-06-21 12:11:28",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "2.4.x-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "Doctrine\\Common\\": "lib/"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "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 M. Schmitt",
-                "email": "schmittjoh@gmail.com",
-                "homepage": "https://github.com/schmittjoh",
-                "role": "Developer of wrapped JMSSerializerBundle"
-            }
-        ],
-        "description": "Common Library for Doctrine projects",
-        "homepage": "http://www.doctrine-project.org",
-        "keywords": [
-            "annotations",
-            "collections",
-            "eventmanager",
-            "persistence",
-            "spl"
-        ]
-    },
-    {
         "name": "guzzle/common",
         "version": "v3.7.1",
         "version_normalized": "3.7.1.0",
@@ -2110,5 +1971,152 @@
             "php",
             "spl"
         ]
+    },
+    {
+        "name": "doctrine/cache",
+        "version": "v1.2.0",
+        "version_normalized": "1.2.0.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/doctrine/cache.git",
+            "reference": "d0e4447707a064a5814b18cb0dcc2f24185f6179"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/doctrine/cache/zipball/d0e4447707a064a5814b18cb0dcc2f24185f6179",
+            "reference": "d0e4447707a064a5814b18cb0dcc2f24185f6179",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.2"
+        },
+        "conflict": {
+            "doctrine/common": ">2.2,<2.4"
+        },
+        "time": "2013-09-26 19:23:25",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "1.0.x-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Doctrine\\Common\\Cache\\": "lib/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "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": "Caching library offering an object-oriented API for many cache backends",
+        "homepage": "http://www.doctrine-project.org",
+        "keywords": [
+            "cache",
+            "caching"
+        ]
+    },
+    {
+        "name": "doctrine/common",
+        "version": "v2.4.1",
+        "version_normalized": "2.4.1.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/doctrine/common.git",
+            "reference": "ceb18cf9b0230f3ea208b6238130fd415abda0a7"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/doctrine/common/zipball/ceb18cf9b0230f3ea208b6238130fd415abda0a7",
+            "reference": "ceb18cf9b0230f3ea208b6238130fd415abda0a7",
+            "shasum": ""
+        },
+        "require": {
+            "doctrine/annotations": "1.*",
+            "doctrine/cache": "1.*",
+            "doctrine/collections": "1.*",
+            "doctrine/inflector": "1.*",
+            "doctrine/lexer": "1.*",
+            "php": ">=5.3.2"
+        },
+        "time": "2013-09-07 10:20:34",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.4.x-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-0": {
+                "Doctrine\\Common\\": "lib/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "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": [
+            "annotations",
+            "collections",
+            "eventmanager",
+            "persistence",
+            "spl"
+        ]
     }
 ]
diff --git a/core/vendor/doctrine/cache/.travis.yml b/core/vendor/doctrine/cache/.travis.yml
index 478e5d6..ecc3540 100644
--- a/core/vendor/doctrine/cache/.travis.yml
+++ b/core/vendor/doctrine/cache/.travis.yml
@@ -3,6 +3,7 @@ language: php
 php:
   - 5.3
   - 5.4
+  - 5.5
 
 before_script:
     - composer --prefer-source --dev install
diff --git a/core/vendor/doctrine/cache/README.md b/core/vendor/doctrine/cache/README.md
index 68a1087..a61b81e 100644
--- a/core/vendor/doctrine/cache/README.md
+++ b/core/vendor/doctrine/cache/README.md
@@ -1,3 +1,10 @@
 # Doctrine Cache
 
 Cache component extracted from the Doctrine Common project.
+
+## Changelog
+
+### v1.2
+
+* Added support for MongoDB as Cache Provider
+* Fix namespace version reset
diff --git a/core/vendor/doctrine/cache/build.properties b/core/vendor/doctrine/cache/build.properties
new file mode 100644
index 0000000..2d98c36
--- /dev/null
+++ b/core/vendor/doctrine/cache/build.properties
@@ -0,0 +1,3 @@
+# Version class and file
+project.version_class = Doctrine\\Common\\Cache\\Version
+project.version_file = lib/Doctrine/Common/Cache/Version.php
diff --git a/core/vendor/doctrine/cache/build.xml b/core/vendor/doctrine/cache/build.xml
new file mode 100644
index 0000000..4c11eb5
--- /dev/null
+++ b/core/vendor/doctrine/cache/build.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<project name="DoctrineCommonCache" default="build" basedir=".">
+    <property file="build.properties" />
+
+    <target name="php">
+        <exec executable="which" outputproperty="php_executable">
+            <arg value="php" />
+        </exec>
+    </target>
+
+    <target name="prepare">
+        <mkdir dir="build" />
+    </target>
+
+    <target name="build" depends="check-git-checkout-clean,prepare,php,composer">
+        <exec executable="${php_executable}">
+            <arg value="build/composer.phar" />
+            <arg value="archive" />
+            <arg value="--dir=build" />
+        </exec>
+    </target>
+
+    <target name="composer" depends="php,composer-check,composer-download">
+        <exec executable="${php_executable}">
+            <arg value="build/composer.phar" />
+            <arg value="install" />
+        </exec>
+    </target>
+
+    <target name="composer-check" depends="prepare">
+        <available file="build/composer.phar" property="composer.present"/>
+    </target>
+
+    <target name="composer-download" unless="composer.present">
+        <exec executable="wget">
+            <arg value="-Obuild/composer.phar" />
+            <arg value="http://getcomposer.org/composer.phar" />
+        </exec>
+    </target>
+
+    <target name="make-release" depends="check-git-checkout-clean,prepare,php">
+        <replace file="${project.version_file}" token="-DEV" value="" failOnNoReplacements="true" />
+        <exec executable="${php_executable}" outputproperty="doctrine.current_version" failonerror="true">
+            <arg value="-r" />
+            <arg value="require_once '${project.version_file}';echo ${project.version_class}::VERSION;" />
+        </exec>
+        <exec executable="${php_executable}" outputproperty="doctrine.next_version" failonerror="true">
+            <arg value="-r" />
+            <arg value="$parts = explode('.', str_ireplace(array('-DEV', '-ALPHA', '-BETA'), '', '${doctrine.current_version}'));
+                if (count($parts) != 3) {
+                    throw new \InvalidArgumentException('Version is assumed in format x.y.z, ${doctrine.current_version} given');
+                }
+                $parts[2]++;
+                echo implode('.', $parts);
+            " />
+        </exec>
+
+        <git-commit file="${project.version_file}" message="Release ${doctrine.current_version}" />
+        <git-tag version="${doctrine.current_version}" />
+        <replace file="${project.version_file}" token="${doctrine.current_version}" value="${doctrine.next_version}-DEV" />
+        <git-commit file="${project.version_file}" message="Bump version to ${doctrine.next_version}" />
+    </target>
+
+    <target name="check-git-checkout-clean">
+        <exec executable="git" failonerror="true">
+            <arg value="diff-index" />
+            <arg value="--quiet" />
+            <arg value="HEAD" />
+        </exec>
+    </target>
+
+    <macrodef name="git-commit">
+        <attribute name="file" default="NOT SET"/>
+        <attribute name="message" default="NOT SET"/>
+
+        <sequential>
+            <exec executable="git">
+                <arg value="add" />
+                <arg value="@{file}" />
+            </exec>
+            <exec executable="git">
+                <arg value="commit" />
+                <arg value="-m" />
+                <arg value="@{message}" />
+            </exec>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="git-tag">
+        <attribute name="version" default="NOT SET" />
+
+        <sequential>
+            <exec executable="git">
+                <arg value="tag" />
+                <arg value="-m" />
+                <arg value="v@{version}" />
+                <arg value="v@{version}" />
+            </exec>
+        </sequential>
+    </macrodef>
+</project>
diff --git a/core/vendor/doctrine/cache/composer.json b/core/vendor/doctrine/cache/composer.json
index 5c907c9..380540c 100644
--- a/core/vendor/doctrine/cache/composer.json
+++ b/core/vendor/doctrine/cache/composer.json
@@ -15,7 +15,15 @@
     "require": {
         "php": ">=5.3.2"
     },
+    "conflict": {
+        "doctrine/common": ">2.2,<2.4"
+    },
     "autoload": {
         "psr-0": { "Doctrine\\Common\\Cache\\": "lib/" }
+    },
+    "extra": {
+        "branch-alias": {
+            "dev-master": "1.0.x-dev"
+        }
     }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php
index 2d0cd23a..680440b 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -23,14 +22,13 @@
 /**
  * APC cache provider.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.0
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  David Abdemoulaie <dave@hobodave.com>
+ * @link   www.doctrine-project.org
+ * @since  2.0
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author David Abdemoulaie <dave@hobodave.com>
  */
 class ApcCache extends CacheProvider
 {
@@ -83,11 +81,11 @@ protected function doGetStats()
         $sma  = apc_sma_info();
 
         return array(
-            Cache::STATS_HITS              => $info['num_hits'],
-            Cache::STATS_MISSES            => $info['num_misses'],
-            Cache::STATS_UPTIME            => $info['start_time'],
-            Cache::STATS_MEMORY_USAGE      => $info['mem_size'],
-            Cache::STATS_MEMORY_AVAILIABLE => $sma['avail_mem'],
+            Cache::STATS_HITS             => $info['num_hits'],
+            Cache::STATS_MISSES           => $info['num_misses'],
+            Cache::STATS_UPTIME           => $info['start_time'],
+            Cache::STATS_MEMORY_USAGE     => $info['mem_size'],
+            Cache::STATS_MEMORY_AVAILABLE => $sma['avail_mem'],
         );
     }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php
index a7a70aa..e9f08a2 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php
@@ -1,7 +1,5 @@
 <?php
 /*
- *  $Id$
- *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -24,14 +22,13 @@
 /**
  * Array cache driver.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.0
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  David Abdemoulaie <dave@hobodave.com>
+ * @link   www.doctrine-project.org
+ * @since  2.0
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author David Abdemoulaie <dave@hobodave.com>
  */
 class ArrayCache extends CacheProvider
 {
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php
index d4e86f4..0785f26 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php
@@ -1,7 +1,5 @@
 <?php
 /*
- *  $Id$
- *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -24,35 +22,42 @@
 /**
  * Interface for cache drivers.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.0
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  Fabio B. Silva <fabio.bat.silva@gmail.com>
+ * @link   www.doctrine-project.org
+ * @since  2.0
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
  */
 interface Cache
 {
-    const STATS_HITS    = 'hits';
-    const STATS_MISSES  = 'misses';
-    const STATS_UPTIME  = 'uptime';
-    const STATS_MEMORY_USAGE        = 'memory_usage';
-    const STATS_MEMORY_AVAILIABLE   = 'memory_available';
+    const STATS_HITS             = 'hits';
+    const STATS_MISSES           = 'misses';
+    const STATS_UPTIME           = 'uptime';
+    const STATS_MEMORY_USAGE     = 'memory_usage';
+    const STATS_MEMORY_AVAILABLE = 'memory_available';
+    /**
+     * Only for backward compatibility (may be removed in next major release)
+     *
+     * @deprecated
+     */
+    const STATS_MEMORY_AVAILIABLE = 'memory_available';
 
     /**
      * Fetches an entry from the cache.
      *
-     * @param string $id cache id The id of the cache entry to fetch.
+     * @param string $id The id of the cache entry to fetch.
+     *
      * @return mixed The cached data or FALSE, if no cache entry exists for the given id.
      */
     function fetch($id);
 
     /**
-     * Test if an entry exists in the cache.
+     * Tests if an entry exists in the cache.
+     *
+     * @param string $id The cache id of the entry to check for.
      *
-     * @param string $id cache id The cache id of the entry to check for.
      * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.
      */
     function contains($id);
@@ -60,9 +65,11 @@ function contains($id);
     /**
      * Puts data into the cache.
      *
-     * @param string $id The cache id.
-     * @param mixed $data The cache entry/data.
-     * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
+     * @param string $id       The cache id.
+     * @param mixed  $data     The cache entry/data.
+     * @param int    $lifeTime The cache lifetime.
+     *                         If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
+     *
      * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
      */
     function save($id, $data, $lifeTime = 0);
@@ -70,13 +77,14 @@ function save($id, $data, $lifeTime = 0);
     /**
      * Deletes a cache entry.
      *
-     * @param string $id cache id
+     * @param string $id The cache id.
+     *
      * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
      */
     function delete($id);
 
     /**
-     * Retrieves cached information from data store
+     * Retrieves cached information from the data store.
      *
      * The server's statistics array has the following values:
      *
@@ -95,8 +103,9 @@ function delete($id);
      * - <b>memory_available</b>
      * Memory allowed to use for storage.
      *
-     * @since   2.2
-     * @return  array Associative array with server's statistics if available, NULL otherwise.
+     * @since 2.2
+     *
+     * @return array|null An associative array with server's statistics if available, NULL otherwise.
      */
     function getStats();
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
index 4221a62..ce88e49 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -23,40 +22,46 @@
 /**
  * Base class for cache provider implementations.
  *
- * @since   2.2
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  Fabio B. Silva <fabio.bat.silva@gmail.com>
+ * @since  2.2
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
  */
 abstract class CacheProvider implements Cache
 {
     const DOCTRINE_NAMESPACE_CACHEKEY = 'DoctrineNamespaceCacheKey[%s]';
 
     /**
-     * @var string The namespace to prefix all cache ids with
+     * The namespace to prefix all cache ids with.
+     *
+     * @var string
      */
     private $namespace = '';
 
     /**
-     * @var string The namespace version
+     * The namespace version.
+     *
+     * @var string
      */
     private $namespaceVersion;
 
     /**
-     * Set the namespace to prefix all cache ids with.
+     * Sets the namespace to prefix all cache ids with.
      *
      * @param string $namespace
+     *
      * @return void
      */
     public function setNamespace($namespace)
     {
-        $this->namespace = (string) $namespace;
+        $this->namespace        = (string) $namespace;
+        $this->namespaceVersion = null;
     }
 
     /**
-     * Retrieve the namespace that prefixes all cache ids.
+     * Retrieves the namespace that prefixes all cache ids.
      *
      * @return string
      */
@@ -106,7 +111,7 @@ public function getStats()
     }
 
     /**
-     * Deletes all cache entries.
+     * Flushes all cache entries.
      *
      * @return boolean TRUE if the cache entries were successfully flushed, FALSE otherwise.
      */
@@ -116,7 +121,7 @@ public function flushAll()
     }
 
     /**
-     * Delete all cache entries.
+     * Deletes all cache entries.
      *
      * @return boolean TRUE if the cache entries were successfully deleted, FALSE otherwise.
      */
@@ -131,10 +136,11 @@ public function deleteAll()
     }
 
     /**
-     * Prefix the passed id with the configured namespace value
+     * Prefixes the passed id with the configured namespace value.
+     *
+     * @param string $id The id to namespace.
      *
-     * @param string $id  The id to namespace
-     * @return string $id The namespaced id
+     * @return string The namespaced id.
      */
     private function getNamespacedId($id)
     {
@@ -144,9 +150,9 @@ private function getNamespacedId($id)
     }
 
     /**
-     * Namespace cache key
+     * Returns the namespace cache key.
      *
-     * @return string $namespaceCacheKey
+     * @return string
      */
     private function getNamespaceCacheKey()
     {
@@ -154,9 +160,9 @@ private function getNamespaceCacheKey()
     }
 
     /**
-     * Namespace version
+     * Returns the namespace version.
      *
-     * @return string $namespaceVersion
+     * @return string
      */
     private function getNamespaceVersion()
     {
@@ -181,15 +187,17 @@ private function getNamespaceVersion()
     /**
      * Fetches an entry from the cache.
      *
-     * @param string $id cache id The id of the cache entry to fetch.
-     * @return string The cached data or FALSE, if no cache entry exists for the given id.
+     * @param string $id The id of the cache entry to fetch.
+     *
+     * @return string|bool The cached data or FALSE, if no cache entry exists for the given id.
      */
     abstract protected function doFetch($id);
 
     /**
-     * Test if an entry exists in the cache.
+     * Tests if an entry exists in the cache.
+     *
+     * @param string $id The cache id of the entry to check for.
      *
-     * @param string $id cache id The cache id of the entry to check for.
      * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.
      */
     abstract protected function doContains($id);
@@ -197,35 +205,37 @@ private function getNamespaceVersion()
     /**
      * Puts data into the cache.
      *
-     * @param string $id The cache id.
-     * @param string $data The cache entry/data.
-     * @param bool|int $lifeTime The lifetime. If != false, sets a specific lifetime for this
-     *                           cache entry (null => infinite lifeTime).
+     * @param string $id       The cache id.
+     * @param string $data     The cache entry/data.
+     * @param int    $lifeTime The lifetime. If != 0, sets a specific lifetime for this
+     *                           cache entry (0 => infinite lifeTime).
      *
      * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
      */
-    abstract protected function doSave($id, $data, $lifeTime = false);
+    abstract protected function doSave($id, $data, $lifeTime = 0);
 
     /**
      * Deletes a cache entry.
      *
-     * @param string $id cache id
+     * @param string $id The cache id.
+     *
      * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
      */
     abstract protected function doDelete($id);
 
     /**
-     * Deletes all cache entries.
+     * Flushes all cache entries.
      *
      * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
      */
     abstract protected function doFlush();
 
-     /**
-     * Retrieves cached information from data store
+    /**
+     * Retrieves cached information from the data store.
+     *
+     * @since 2.2
      *
-     * @since   2.2
-     * @return  array An associative array with server's statistics if available, NULL otherwise.
+     * @return array|null An associative array with server's statistics if available, NULL otherwise.
      */
     abstract protected function doGetStats();
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php
index f0e5f90..c21691d 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CouchbaseCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,16 +24,14 @@
 /**
  * Couchbase cache provider.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.4
- * @author  Michael Nitschinger <michael@nitschinger.at>
+ * @link   www.doctrine-project.org
+ * @since  2.4
+ * @author Michael Nitschinger <michael@nitschinger.at>
  */
 class CouchbaseCache extends CacheProvider
 {
-
     /**
-     * @var Couchbase
+     * @var Couchbase|null
      */
     private $couchbase;
 
@@ -42,6 +39,8 @@ class CouchbaseCache extends CacheProvider
      * Sets the Couchbase instance to use.
      *
      * @param Couchbase $couchbase
+     *
+     * @return void
      */
     public function setCouchbase(Couchbase $couchbase)
     {
@@ -51,7 +50,7 @@ public function setCouchbase(Couchbase $couchbase)
     /**
      * Gets the Couchbase instance used by the cache.
      *
-     * @return Couchbase
+     * @return Couchbase|null
      */
     public function getCouchbase()
     {
@@ -115,9 +114,8 @@ protected function doGetStats()
             Cache::STATS_HITS   => $stats['get_hits'],
             Cache::STATS_MISSES => $stats['get_misses'],
             Cache::STATS_UPTIME => $stats['uptime'],
-            Cache::STATS_MEMORY_USAGE       => $stats['bytes'],
-            Cache::STATS_MEMORY_AVAILIABLE  => $stats['limit_maxbytes'],
+            Cache::STATS_MEMORY_USAGE     => $stats['bytes'],
+            Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'],
         );
     }
-
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
index da650b4..1aa4d79 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -23,26 +22,30 @@
 /**
  * Base file cache driver.
  *
- * @since   2.3
- * @author  Fabio B. Silva <fabio.bat.silva@gmail.com>
+ * @since  2.3
+ * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
  */
 abstract class FileCache extends CacheProvider
 {
     /**
-     * @var string Cache directory.
+     * The cache directory.
+     *
+     * @var string
      */
     protected $directory;
 
     /**
-     * @var string Cache file extension.
+     * The cache file extension.
+     *
+     * @var string|null
      */
     protected $extension;
 
     /**
-     * Constructor
+     * Constructor.
      *
-     * @param string $directory Cache directory.
-     * @param string $directory Cache file extension.
+     * @param string      $directory The cache directory.
+     * @param string|null $extension The cache file extension.
      *
      * @throws \InvalidArgumentException
      */
@@ -68,7 +71,7 @@ public function __construct($directory, $extension = null)
 
     /**
      * Gets the cache directory.
-     * 
+     *
      * @return string
      */
     public function getDirectory()
@@ -78,8 +81,8 @@ public function getDirectory()
 
     /**
      * Gets the cache file extension.
-     * 
-     * @return string
+     *
+     * @return string|null
      */
     public function getExtension()
     {
@@ -87,12 +90,16 @@ public function getExtension()
     }
 
     /**
+     * @param string $id
+     *
      * @return string
      */
     protected function getFilename($id)
     {
-        $path = implode(str_split(md5($id), 12), DIRECTORY_SEPARATOR);
+        $hash = hash('sha256', $id);
+        $path = implode(str_split($hash, 16), DIRECTORY_SEPARATOR);
         $path = $this->directory . DIRECTORY_SEPARATOR . $path;
+        $id   = preg_replace('@[\\\/:"*?<>|]+@', '', $id);
 
         return $path . DIRECTORY_SEPARATOR . $id . $this->extension;
     }
@@ -110,12 +117,7 @@ protected function doDelete($id)
      */
     protected function doFlush()
     {
-        $pattern  = '/^.+\\' . $this->extension . '$/i';
-        $iterator = new \RecursiveDirectoryIterator($this->directory);
-        $iterator = new \RecursiveIteratorIterator($iterator);
-        $iterator = new \RegexIterator($iterator, $pattern);
-
-        foreach ($iterator as $name => $file) {
+        foreach ($this->getIterator() as $name => $file) {
             @unlink($name);
         }
 
@@ -127,6 +129,30 @@ protected function doFlush()
      */
     protected function doGetStats()
     {
-        return null;
+        $usage = 0;
+        foreach ($this->getIterator() as $name => $file) {
+            $usage += $file->getSize();
+        }
+
+        $free = disk_free_space($this->directory);
+
+        return array(
+            Cache::STATS_HITS               => null,
+            Cache::STATS_MISSES             => null,
+            Cache::STATS_UPTIME             => null,
+            Cache::STATS_MEMORY_USAGE       => $usage,
+            Cache::STATS_MEMORY_AVAILABLE   => $free,
+        );
+    }
+
+    /**
+     * @return \Iterator
+     */
+    private function getIterator()
+    {
+        $pattern = '/^.+\\' . $this->extension . '$/i';
+        $iterator = new \RecursiveDirectoryIterator($this->directory);
+        $iterator = new \RecursiveIteratorIterator($iterator);
+        return new \RegexIterator($iterator, $pattern);
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php
index a431438..23aaa37 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -23,8 +22,8 @@
 /**
  * Filesystem cache driver.
  *
- * @since   2.3
- * @author  Fabio B. Silva <fabio.bat.silva@gmail.com>
+ * @since  2.3
+ * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
  */
 class FilesystemCache extends FileCache
 {
@@ -109,6 +108,6 @@ protected function doSave($id, $data, $lifeTime = 0)
             mkdir($filepath, 0777, true);
         }
 
-        return file_put_contents($filename, $lifeTime . PHP_EOL . $data);
+        return file_put_contents($filename, $lifeTime . PHP_EOL . $data) !== false;
     }
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php
index 5687b96..f839a65 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,19 +24,18 @@
 /**
  * Memcache cache provider.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.0
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  David Abdemoulaie <dave@hobodave.com>
+ * @link   www.doctrine-project.org
+ * @since  2.0
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author David Abdemoulaie <dave@hobodave.com>
  */
 class MemcacheCache extends CacheProvider
 {
     /**
-     * @var Memcache
+     * @var Memcache|null
      */
     private $memcache;
 
@@ -45,6 +43,8 @@ class MemcacheCache extends CacheProvider
      * Sets the memcache instance to use.
      *
      * @param Memcache $memcache
+     *
+     * @return void
      */
     public function setMemcache(Memcache $memcache)
     {
@@ -54,7 +54,7 @@ public function setMemcache(Memcache $memcache)
     /**
      * Gets the memcache instance used by the cache.
      *
-     * @return Memcache
+     * @return Memcache|null
      */
     public function getMemcache()
     {
@@ -114,8 +114,8 @@ protected function doGetStats()
             Cache::STATS_HITS   => $stats['get_hits'],
             Cache::STATS_MISSES => $stats['get_misses'],
             Cache::STATS_UPTIME => $stats['uptime'],
-            Cache::STATS_MEMORY_USAGE       => $stats['bytes'],
-            Cache::STATS_MEMORY_AVAILIABLE  => $stats['limit_maxbytes'],
+            Cache::STATS_MEMORY_USAGE     => $stats['bytes'],
+            Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'],
         );
     }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php
index 75f1345..f7e5500 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,19 +24,18 @@
 /**
  * Memcached cache provider.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.2
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  David Abdemoulaie <dave@hobodave.com>
+ * @link   www.doctrine-project.org
+ * @since  2.2
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author David Abdemoulaie <dave@hobodave.com>
  */
 class MemcachedCache extends CacheProvider
 {
     /**
-     * @var Memcached
+     * @var Memcached|null
      */
     private $memcached;
 
@@ -45,6 +43,8 @@ class MemcachedCache extends CacheProvider
      * Sets the memcache instance to use.
      *
      * @param Memcached $memcached
+     *
+     * @return void
      */
     public function setMemcached(Memcached $memcached)
     {
@@ -54,7 +54,7 @@ public function setMemcached(Memcached $memcached)
     /**
      * Gets the memcached instance used by the cache.
      *
-     * @return Memcached
+     * @return Memcached|null
      */
     public function getMemcached()
     {
@@ -117,8 +117,8 @@ protected function doGetStats()
             Cache::STATS_HITS   => $stats['get_hits'],
             Cache::STATS_MISSES => $stats['get_misses'],
             Cache::STATS_UPTIME => $stats['uptime'],
-            Cache::STATS_MEMORY_USAGE       => $stats['bytes'],
-            Cache::STATS_MEMORY_AVAILIABLE  => $stats['limit_maxbytes'],
+            Cache::STATS_MEMORY_USAGE     => $stats['bytes'],
+            Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'],
         );
     }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
new file mode 100644
index 0000000..0c7ac0a
--- /dev/null
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
@@ -0,0 +1,191 @@
+<?php
+/*
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the MIT license. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+namespace Doctrine\Common\Cache;
+
+use MongoBinData;
+use MongoCollection;
+use MongoDate;
+
+/**
+ * MongoDB cache provider.
+ *
+ * @since  1.1
+ * @author Jeremy Mikola <jmikola@gmail.com>
+ */
+class MongoDBCache extends CacheProvider
+{
+    /**
+     * The data field will store the serialized PHP value.
+     */
+    const DATA_FIELD = 'd';
+
+    /**
+     * The expiration field will store a MongoDate value indicating when the
+     * cache entry should expire.
+     *
+     * With MongoDB 2.2+, entries can be automatically deleted by MongoDB by
+     * indexing this field wit the "expireAfterSeconds" option equal to zero.
+     * This will direct MongoDB to regularly query for and delete any entries
+     * whose date is older than the current time. Entries without a date value
+     * in this field will be ignored.
+     *
+     * The cache provider will also check dates on its own, in case expired
+     * entries are fetched before MongoDB's TTLMonitor pass can expire them.
+     *
+     * @see http://docs.mongodb.org/manual/tutorial/expire-data/
+     */
+    const EXPIRATION_FIELD = 'e';
+
+    /**
+     * @var MongoCollection
+     */
+    private $collection;
+
+    /**
+     * Constructor.
+     *
+     * This provider will default to the write concern and read preference
+     * options set on the MongoCollection instance (or inherited from MongoDB or
+     * MongoClient). Using an unacknowledged write concern (< 1) may make the
+     * return values of delete() and save() unreliable. Reading from secondaries
+     * may make contain() and fetch() unreliable.
+     *
+     * @see http://www.php.net/manual/en/mongo.readpreferences.php
+     * @see http://www.php.net/manual/en/mongo.writeconcerns.php
+     * @param MongoCollection $collection
+     */
+    public function __construct(MongoCollection $collection)
+    {
+        $this->collection = $collection;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doFetch($id)
+    {
+        $document = $this->collection->findOne(array('_id' => $id), array(self::DATA_FIELD, self::EXPIRATION_FIELD));
+
+        if ($document === null) {
+            return false;
+        }
+
+        if ($this->isExpired($document)) {
+            $this->doDelete($id);
+            return false;
+        }
+
+        return unserialize($document[self::DATA_FIELD]->bin);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doContains($id)
+    {
+        $document = $this->collection->findOne(array('_id' => $id), array(self::EXPIRATION_FIELD));
+
+        if ($document === null) {
+            return false;
+        }
+
+        if ($this->isExpired($document)) {
+            $this->doDelete($id);
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doSave($id, $data, $lifeTime = 0)
+    {
+        $result = $this->collection->update(
+            array('_id' => $id),
+            array('$set' => array(
+                self::EXPIRATION_FIELD => ($lifeTime > 0 ? new MongoDate(time() + $lifeTime) : null),
+                self::DATA_FIELD => new MongoBinData(serialize($data), MongoBinData::BYTE_ARRAY),
+            )),
+            array('upsert' => true, 'multiple' => false)
+        );
+
+        return isset($result['ok']) ? $result['ok'] == 1 : true;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doDelete($id)
+    {
+        $result = $this->collection->remove(array('_id' => $id));
+
+        return isset($result['n']) ? $result['n'] == 1 : true;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doFlush()
+    {
+        // Use remove() in lieu of drop() to maintain any collection indexes
+        $result = $this->collection->remove();
+
+        return isset($result['ok']) ? $result['ok'] == 1 : true;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doGetStats()
+    {
+        $serverStatus = $this->collection->db->command(array(
+            'serverStatus' => 1,
+            'locks' => 0,
+            'metrics' => 0,
+            'recordStats' => 0,
+            'repl' => 0,
+        ));
+
+        $collStats = $this->collection->db->command(array('collStats' => 1));
+
+        return array(
+            Cache::STATS_HITS => null,
+            Cache::STATS_MISSES => null,
+            Cache::STATS_UPTIME => (isset($serverStatus['uptime']) ? (integer) $serverStatus['uptime'] : null),
+            Cache::STATS_MEMORY_USAGE => (isset($collStats['size']) ? (integer) $collStats['size'] : null),
+            Cache::STATS_MEMORY_AVAILABLE  => null,
+        );
+    }
+
+    /**
+     * Check if the document is expired.
+     *
+     * @param array $document
+     * @return boolean
+     */
+    private function isExpired(array $document)
+    {
+        return isset($document[self::EXPIRATION_FIELD]) &&
+            $document[self::EXPIRATION_FIELD] instanceof MongoDate &&
+            $document[self::EXPIRATION_FIELD]->sec < time();
+    }
+}
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php
index 1d69d3d..f017d83 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -23,8 +22,8 @@
 /**
  * Php file cache driver.
  *
- * @since   2.3
- * @author  Fabio B. Silva <fabio.bat.silva@gmail.com>
+ * @since  2.3
+ * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
  */
 class PhpFileCache extends FileCache
 {
@@ -103,6 +102,6 @@ protected function doSave($id, $data, $lifeTime = 0)
         $value  = var_export($value, true);
         $code   = sprintf('<?php return %s;', $value);
 
-        return file_put_contents($filename, $code);
+        return file_put_contents($filename, $code) !== false;
     }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php
index 5d4814b..3f95a24 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,15 +24,14 @@
 /**
  * Redis cache provider.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.2
- * @author  Osman Ungur <osmanungur@gmail.com>
+ * @link   www.doctrine-project.org
+ * @since  2.2
+ * @author Osman Ungur <osmanungur@gmail.com>
  */
 class RedisCache extends CacheProvider
 {
     /**
-     * @var Redis
+     * @var Redis|null
      */
     private $redis;
 
@@ -41,17 +39,19 @@ class RedisCache extends CacheProvider
      * Sets the redis instance to use.
      *
      * @param Redis $redis
+     *
+     * @return void
      */
     public function setRedis(Redis $redis)
     {
-        $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);
+        $redis->setOption(Redis::OPT_SERIALIZER, $this->getSerializerValue());
         $this->redis = $redis;
     }
 
     /**
      * Gets the redis instance used by the cache.
      *
-     * @return Redis
+     * @return Redis|null
      */
     public function getRedis()
     {
@@ -79,11 +79,10 @@ protected function doContains($id)
      */
     protected function doSave($id, $data, $lifeTime = 0)
     {
-        $result = $this->redis->set($id, $data);
         if ($lifeTime > 0) {
-            $this->redis->expire($id, $lifeTime);        
+            return $this->redis->setex($id, $lifeTime, $data);
         }
-        return $result;
+        return $this->redis->set($id, $data);
     }
 
     /**
@@ -112,8 +111,20 @@ protected function doGetStats()
             Cache::STATS_HITS   => false,
             Cache::STATS_MISSES => false,
             Cache::STATS_UPTIME => $info['uptime_in_seconds'],
-            Cache::STATS_MEMORY_USAGE       => $info['used_memory'],
-            Cache::STATS_MEMORY_AVAILIABLE  => false
+            Cache::STATS_MEMORY_USAGE      => $info['used_memory'],
+            Cache::STATS_MEMORY_AVAILABLE  => false
         );
     }
+
+    /**
+     * Returns the serializer constant to use. If Redis is compiled with
+     * igbinary support, that is used. Otherwise the default PHP serializer is
+     * used.
+     *
+     * @return integer One of the Redis::SERIALIZER_* constants
+     */
+    protected function getSerializerValue()
+    {
+        return defined('Redis::SERIALIZER_IGBINARY') ? Redis::SERIALIZER_IGBINARY : Redis::SERIALIZER_PHP;
+    }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php
new file mode 100644
index 0000000..b8dbfd5
--- /dev/null
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php
@@ -0,0 +1,250 @@
+<?php
+/*
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the MIT license. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+namespace Doctrine\Common\Cache;
+
+use Riak\Bucket;
+use Riak\Connection;
+use Riak\Input;
+use Riak\Exception;
+use Riak\Object;
+
+/**
+ * Riak cache provider.
+ *
+ * @link   www.doctrine-project.org
+ * @since  1.1
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ */
+class RiakCache extends CacheProvider
+{
+    const EXPIRES_HEADER = 'X-Riak-Meta-Expires';
+
+    /**
+     * @var \Riak\Bucket
+     */
+    private $bucket;
+
+    /**
+     * Sets the riak bucket instance to use.
+     *
+     * @param \Riak\Bucket $bucket
+     */
+    public function __construct(Bucket $bucket)
+    {
+        $this->bucket = $bucket;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doFetch($id)
+    {
+        try {
+            $response = $this->bucket->get(urlencode($id));
+
+            // No objects found
+            if ( ! $response->hasObject()) {
+                return false;
+            }
+
+            // Check for attempted siblings
+            $object = ($response->hasSiblings())
+                ? $this->resolveConflict($id, $response->getVClock(), $response->getObjectList())
+                : $response->getFirstObject();
+
+            // Check for expired object
+            if ($this->isExpired($object)) {
+                $this->bucket->delete($object);
+
+                return false;
+            }
+
+            return unserialize($object->getContent());
+        } catch (Exception\RiakException $e) {
+            // Covers:
+            // - Riak\ConnectionException
+            // - Riak\CommunicationException
+            // - Riak\UnexpectedResponseException
+            // - Riak\NotFoundException
+        }
+
+        return false;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doContains($id)
+    {
+        try {
+            // We only need the HEAD, not the entire object
+            $input = new Input\GetInput();
+
+            $input->setReturnHead(true);
+
+            $response = $this->bucket->get(urlencode($id), $input);
+
+            // No objects found
+            if ( ! $response->hasObject()) {
+                return false;
+            }
+
+            $object = $response->getFirstObject();
+
+            // Check for expired object
+            if ($this->isExpired($object)) {
+                $this->bucket->delete($object);
+
+                return false;
+            }
+
+            return true;
+        } catch (Exception\RiakException $e) {
+            // Do nothing
+        }
+
+        return false;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doSave($id, $data, $lifeTime = 0)
+    {
+        try {
+            $object = new Object(urlencode($id));
+
+            $object->setContent(serialize($data));
+
+            if ($lifeTime > 0) {
+                $object->addMetadata(self::EXPIRES_HEADER, (string) (time() + $lifeTime));
+            }
+
+            $this->bucket->put($object);
+
+            return true;
+        } catch (Exception\RiakException $e) {
+            // Do nothing
+        }
+
+        return false;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doDelete($id)
+    {
+        try {
+            $this->bucket->delete(urlencode($id));
+
+            return true;
+        } catch (Exception\BadArgumentsException $e) {
+            // Key did not exist on cluster already
+        } catch (Exception\RiakException $e) {
+            // Covers:
+            // - Riak\Exception\ConnectionException
+            // - Riak\Exception\CommunicationException
+            // - Riak\Exception\UnexpectedResponseException
+        }
+
+        return false;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doFlush()
+    {
+        try {
+            $keyList = $this->bucket->getKeyList();
+
+            foreach ($keyList as $key) {
+                $this->bucket->delete($key);
+            }
+
+            return true;
+        } catch (Exception\RiakException $e) {
+            // Do nothing
+        }
+
+        return false;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doGetStats()
+    {
+        // Only exposed through HTTP stats API, not Protocol Buffers API
+        return null;
+    }
+
+    /**
+     * Check if a given Riak Object have expired.
+     *
+     * @param \Riak\Object $object
+     *
+     * @return boolean
+     */
+    private function isExpired(Object $object)
+    {
+        $metadataMap = $object->getMetadataMap();
+
+        return isset($metadataMap[self::EXPIRES_HEADER])
+            && $metadataMap[self::EXPIRES_HEADER] < time();
+    }
+
+    /**
+     * On-read conflict resolution. Applied approach here is last write wins.
+     * Specific needs may override this method to apply alternate conflict resolutions.
+     *
+     * {@internal Riak does not attempt to resolve a write conflict, and store
+     * it as sibling of conflicted one. By following this approach, it is up to
+     * the next read to resolve the conflict. When this happens, your fetched
+     * object will have a list of siblings (read as a list of objects).
+     * In our specific case, we do not care about the intermediate ones since
+     * they are all the same read from storage, and we do apply a last sibling
+     * (last write) wins logic.
+     * If by any means our resolution generates another conflict, it'll up to
+     * next read to properly solve it.}
+     *
+     * @param string $id
+     * @param string $vClock
+     * @param array  $objectList
+     *
+     * @return \Riak\Object
+     */
+    protected function resolveConflict($id, $vClock, array $objectList)
+    {
+        // Our approach here is last-write wins
+        $winner = $objectList[count($objectList)];
+
+        $putInput = new Input\PutInput();
+        $putInput->setVClock($vClock);
+
+        $mergedObject = new Object(urlencode($id));
+        $mergedObject->setContent($winner->getContent());
+
+        $this->bucket->put($mergedObject, $putInput);
+
+        return $mergedObject;
+    }
+}
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php
new file mode 100644
index 0000000..204bd41
--- /dev/null
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php
@@ -0,0 +1,25 @@
+<?php
+/*
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the MIT license. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+namespace Doctrine\Common\Cache;
+
+class Version
+{
+    const VERSION = '1.2.0';
+}
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php
index 777d0fd..ae32772 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -23,14 +22,13 @@
 /**
  * WinCache cache provider.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.2
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  David Abdemoulaie <dave@hobodave.com>
+ * @link   www.doctrine-project.org
+ * @since  2.2
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author David Abdemoulaie <dave@hobodave.com>
  */
 class WinCacheCache extends CacheProvider
 {
@@ -83,11 +81,11 @@ protected function doGetStats()
         $meminfo = wincache_ucache_meminfo();
 
         return array(
-            Cache::STATS_HITS              => $info['total_hit_count'],
-            Cache::STATS_MISSES            => $info['total_miss_count'],
-            Cache::STATS_UPTIME            => $info['total_cache_uptime'],
-            Cache::STATS_MEMORY_USAGE      => $meminfo['memory_total'],
-            Cache::STATS_MEMORY_AVAILIABLE => $meminfo['memory_free'],
+            Cache::STATS_HITS             => $info['total_hit_count'],
+            Cache::STATS_MISSES           => $info['total_miss_count'],
+            Cache::STATS_UPTIME           => $info['total_cache_uptime'],
+            Cache::STATS_MEMORY_USAGE     => $meminfo['memory_total'],
+            Cache::STATS_MEMORY_AVAILABLE => $meminfo['memory_free'],
         );
     }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php
index 8733e26..833b02a 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/XcacheCache.php
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -23,14 +22,13 @@
 /**
  * Xcache cache driver.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.0
- * @author  Benjamin Eberlei <kontakt@beberlei.de>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author  Jonathan Wage <jonwage@gmail.com>
- * @author  Roman Borschel <roman@code-factory.org>
- * @author  David Abdemoulaie <dave@hobodave.com>
+ * @link   www.doctrine-project.org
+ * @since  2.0
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @author Jonathan Wage <jonwage@gmail.com>
+ * @author Roman Borschel <roman@code-factory.org>
+ * @author David Abdemoulaie <dave@hobodave.com>
  */
 class XcacheCache extends CacheProvider
 {
@@ -79,10 +77,11 @@ protected function doFlush()
     }
 
     /**
-     * Checks that xcache.admin.enable_auth is Off
+     * Checks that xcache.admin.enable_auth is Off.
      *
-     * @throws \BadMethodCallException When xcache.admin.enable_auth is On
      * @return void
+     *
+     * @throws \BadMethodCallException When xcache.admin.enable_auth is On.
      */
     protected function checkAuthorization()
     {
@@ -103,8 +102,8 @@ protected function doGetStats()
             Cache::STATS_HITS   => $info['hits'],
             Cache::STATS_MISSES => $info['misses'],
             Cache::STATS_UPTIME => null,
-            Cache::STATS_MEMORY_USAGE       => $info['size'],
-            Cache::STATS_MEMORY_AVAILIABLE  => $info['avail'],
+            Cache::STATS_MEMORY_USAGE      => $info['size'],
+            Cache::STATS_MEMORY_AVAILABLE  => $info['avail'],
         );
     }
 }
diff --git a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php
index fc90bc6..6e35ac8 100644
--- a/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php
+++ b/core/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ZendDataCache.php
@@ -22,11 +22,10 @@
 /**
  * Zend Data Cache cache driver.
  *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link    www.doctrine-project.org
- * @since   2.0
- * @author  Ralph Schindler <ralph.schindler@zend.com>
- * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
+ * @link   www.doctrine-project.org
+ * @since  2.0
+ * @author Ralph Schindler <ralph.schindler@zend.com>
+ * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
  */
 class ZendDataCache extends CacheProvider
 {
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php
index 6cad891..a6c3097 100644
--- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/ArrayCacheTest.php
@@ -18,4 +18,9 @@ public function testGetStats()
 
         $this->assertNull($stats);
     }
+
+    protected function isSharedStorage()
+    {
+        return false;
+    }
 }
\ No newline at end of file
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php
new file mode 100644
index 0000000..eaedd99
--- /dev/null
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/BaseFileCacheTest.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace Doctrine\Tests\Common\Cache;
+
+use RecursiveDirectoryIterator;
+use RecursiveIteratorIterator;
+
+abstract class BaseFileCacheTest extends CacheTest
+{
+    protected $directory;
+
+    public function setUp()
+    {
+        do {
+            $this->directory = sys_get_temp_dir() . '/doctrine_cache_'. uniqid();
+        } while (file_exists($this->directory));
+    }
+
+    public function tearDown()
+    {
+        if ( ! is_dir($this->directory)) {
+            return;
+        }
+
+        $iterator = new RecursiveDirectoryIterator($this->directory);
+
+        foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) {
+            if ($file->isFile()) {
+                @unlink($file->getRealPath());
+            } elseif ($file->isDir()) {
+                @rmdir($file->getRealPath());
+            }
+        }
+    }
+
+    protected function isSharedStorage()
+    {
+        return false;
+    }
+}
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php
index ea7f753..5242574 100644
--- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php
@@ -3,69 +3,194 @@
 namespace Doctrine\Tests\Common\Cache;
 
 use Doctrine\Common\Cache\Cache;
+use ArrayObject;
 
 abstract class CacheTest extends \Doctrine\Tests\DoctrineTestCase
 {
-    public function testBasics()
+    /**
+     * @dataProvider provideCrudValues
+     */
+    public function testBasicCrudOperations($value)
     {
         $cache = $this->_getCacheDriver();
 
-        // Test save
-        $cache->save('test_key', 'testing this out');
-
-        // Test contains to test that save() worked
-        $this->assertTrue($cache->contains('test_key'));
+        // Test saving a value, checking if it exists, and fetching it back
+        $this->assertTrue($cache->save('key', 'value'));
+        $this->assertTrue($cache->contains('key'));
+        $this->assertEquals('value', $cache->fetch('key'));
 
-        // Test fetch
-        $this->assertEquals('testing this out', $cache->fetch('test_key'));
+        // Test updating the value of a cache entry
+        $this->assertTrue($cache->save('key', 'value-changed'));
+        $this->assertTrue($cache->contains('key'));
+        $this->assertEquals('value-changed', $cache->fetch('key'));
 
-        // Test delete
-        $cache->save('test_key2', 'test2');
-        $cache->delete('test_key2');
-        $this->assertFalse($cache->contains('test_key2'));
+        // Test deleting a value
+        $this->assertTrue($cache->delete('key'));
+        $this->assertFalse($cache->contains('key'));
     }
 
-    public function testObjects()
+    public function provideCrudValues()
     {
-        $cache = $this->_getCacheDriver();
-
-        // Fetch/save test with objects (Is cache driver serializes/unserializes objects correctly ?)
-        $cache->save('test_object_key', new \ArrayObject());
-        $this->assertTrue($cache->fetch('test_object_key') instanceof \ArrayObject);
+        return array(
+            'array' => array(array('one', 2, 3.0)),
+            'string' => array('value'),
+            'integer' => array(1),
+            'float' => array(1.5),
+            'object' => array(new ArrayObject()),
+        );
     }
 
     public function testDeleteAll()
     {
         $cache = $this->_getCacheDriver();
-        $cache->save('test_key1', '1');
-        $cache->save('test_key2', '2');
-        $cache->deleteAll();
 
-        $this->assertFalse($cache->contains('test_key1'));
-        $this->assertFalse($cache->contains('test_key2'));
+        $this->assertTrue($cache->save('key1', 1));
+        $this->assertTrue($cache->save('key2', 2));
+        $this->assertTrue($cache->deleteAll());
+        $this->assertFalse($cache->contains('key1'));
+        $this->assertFalse($cache->contains('key2'));
+    }
+
+    public function testDeleteAllAndNamespaceVersioningBetweenCaches()
+    {
+        if ( ! $this->isSharedStorage()) {
+            $this->markTestSkipped('The ' . __CLASS__ .' does not use shared storage');
+        }
+
+        $cache1 = $this->_getCacheDriver();
+        $cache2 = $this->_getCacheDriver();
+
+        $this->assertTrue($cache1->save('key1', 1));
+        $this->assertTrue($cache2->save('key2', 2));
+
+        /* Both providers are initialized with the same namespace version, so
+         * they can see entries set by each other.
+         */
+        $this->assertTrue($cache1->contains('key1'));
+        $this->assertTrue($cache1->contains('key2'));
+        $this->assertTrue($cache2->contains('key1'));
+        $this->assertTrue($cache2->contains('key2'));
+
+        /* Deleting all entries through one provider will only increment the
+         * namespace version on that object (and in the cache itself, which new
+         * instances will use to initialize). The second provider will retain
+         * its original version and still see stale data.
+         */
+        $this->assertTrue($cache1->deleteAll());
+        $this->assertFalse($cache1->contains('key1'));
+        $this->assertFalse($cache1->contains('key2'));
+        $this->assertTrue($cache2->contains('key1'));
+        $this->assertTrue($cache2->contains('key2'));
+
+        /* A new cache provider should not see the deleted entries, since its
+         * namespace version will be initialized.
+         */
+        $cache3 = $this->_getCacheDriver();
+        $this->assertFalse($cache3->contains('key1'));
+        $this->assertFalse($cache3->contains('key2'));
     }
 
     public function testFlushAll()
     {
         $cache = $this->_getCacheDriver();
-        $cache->save('test_key1', '1');
-        $cache->save('test_key2', '2');
-        $cache->flushAll();
 
-        $this->assertFalse($cache->contains('test_key1'));
-        $this->assertFalse($cache->contains('test_key2'));
+        $this->assertTrue($cache->save('key1', 1));
+        $this->assertTrue($cache->save('key2', 2));
+        $this->assertTrue($cache->flushAll());
+        $this->assertFalse($cache->contains('key1'));
+        $this->assertFalse($cache->contains('key2'));
+    }
+
+    public function testFlushAllAndNamespaceVersioningBetweenCaches()
+    {
+        if ( ! $this->isSharedStorage()) {
+            $this->markTestSkipped('The ' . __CLASS__ .' does not use shared storage');
+        }
+
+        $cache1 = $this->_getCacheDriver();
+        $cache2 = $this->_getCacheDriver();
+
+        /* Deleting all elements from the first provider should increment its
+         * namespace version before saving the first entry.
+         */
+        $cache1->deleteAll();
+        $this->assertTrue($cache1->save('key1', 1));
+
+        /* The second provider will be initialized with the same namespace
+         * version upon its first save operation.
+         */
+        $this->assertTrue($cache2->save('key2', 2));
+
+        /* Both providers have the same namespace version and can see entires
+         * set by each other.
+         */
+        $this->assertTrue($cache1->contains('key1'));
+        $this->assertTrue($cache1->contains('key2'));
+        $this->assertTrue($cache2->contains('key1'));
+        $this->assertTrue($cache2->contains('key2'));
+
+        /* Flushing all entries through one cache will remove all entries from
+         * the cache but leave their namespace version as-is.
+         */
+        $this->assertTrue($cache1->flushAll());
+        $this->assertFalse($cache1->contains('key1'));
+        $this->assertFalse($cache1->contains('key2'));
+        $this->assertFalse($cache2->contains('key1'));
+        $this->assertFalse($cache2->contains('key2'));
+
+        /* Inserting a new entry will use the same, incremented namespace
+         * version, and it will be visible to both providers.
+         */
+        $this->assertTrue($cache1->save('key1', 1));
+        $this->assertTrue($cache1->contains('key1'));
+        $this->assertTrue($cache2->contains('key1'));
+
+        /* A new cache provider will be initialized with the original namespace
+         * version and not share any visibility with the first two providers.
+         */
+        $cache3 = $this->_getCacheDriver();
+        $this->assertFalse($cache3->contains('key1'));
+        $this->assertFalse($cache3->contains('key2'));
+        $this->assertTrue($cache3->save('key3', 3));
+        $this->assertTrue($cache3->contains('key3'));
     }
 
     public function testNamespace()
     {
         $cache = $this->_getCacheDriver();
-        $cache->setNamespace('test_');
+
+        $cache->setNamespace('ns1_');
+
+        $this->assertTrue($cache->save('key1', 1));
+        $this->assertTrue($cache->contains('key1'));
+
+        $cache->setNamespace('ns2_');
+
+        $this->assertFalse($cache->contains('key1'));
+    }
+
+    public function testDeleteAllNamespace()
+    {
+        $cache = $this->_getCacheDriver();
+
+        $cache->setNamespace('ns1');
+        $this->assertFalse($cache->contains('key1'));
         $cache->save('key1', 'test');
+        $this->assertTrue($cache->contains('key1'));
 
+        $cache->setNamespace('ns2');
+        $this->assertFalse($cache->contains('key1'));
+        $cache->save('key1', 'test');
         $this->assertTrue($cache->contains('key1'));
 
-        $cache->setNamespace('test2_');
+        $cache->setNamespace('ns1');
+        $this->assertTrue($cache->contains('key1'));
+        $cache->deleteAll();
+        $this->assertFalse($cache->contains('key1'));
 
+        $cache->setNamespace('ns2');
+        $this->assertTrue($cache->contains('key1'));
+        $cache->deleteAll();
         $this->assertFalse($cache->contains('key1'));
     }
 
@@ -77,26 +202,39 @@ public function testGetStats()
         $cache = $this->_getCacheDriver();
         $stats = $cache->getStats();
 
-        $this->assertArrayHasKey(Cache::STATS_HITS,   $stats);
+        $this->assertArrayHasKey(Cache::STATS_HITS, $stats);
         $this->assertArrayHasKey(Cache::STATS_MISSES, $stats);
         $this->assertArrayHasKey(Cache::STATS_UPTIME, $stats);
         $this->assertArrayHasKey(Cache::STATS_MEMORY_USAGE, $stats);
-        $this->assertArrayHasKey(Cache::STATS_MEMORY_AVAILIABLE, $stats);
+        $this->assertArrayHasKey(Cache::STATS_MEMORY_AVAILABLE, $stats);
     }
 
-    /**
-     * Make sure that all supported caches return "false" instead of "null" to be compatible
-     * with ORM integration.
-     */
-    public function testFalseOnFailedFetch()
+    public function testFetchMissShouldReturnFalse()
     {
         $cache = $this->_getCacheDriver();
+
+        /* Ensure that caches return boolean false instead of null on a fetch
+         * miss to be compatible with ORM integration.
+         */
         $result = $cache->fetch('nonexistent_key');
+
         $this->assertFalse($result);
         $this->assertNotNull($result);
     }
 
     /**
+     * Return whether multiple cache providers share the same storage.
+     *
+     * This is used for skipping certain tests for shared storage behavior.
+     *
+     * @return boolean
+     */
+    protected function isSharedStorage()
+    {
+        return true;
+    }
+
+    /**
      * @return \Doctrine\Common\Cache\CacheProvider
      */
     abstract protected function _getCacheDriver();
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php
new file mode 100644
index 0000000..6f9df81
--- /dev/null
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php
@@ -0,0 +1,107 @@
+<?php
+
+namespace Doctrine\Tests\Common\Cache;
+
+/**
+ * @group DCOM-101
+ */
+class FileCacheTest extends \Doctrine\Tests\DoctrineTestCase
+{
+    /**
+     * @var \Doctrine\Common\Cache\FileCache
+     */
+    private $driver;
+
+    protected function setUp()
+    {
+        $this->driver = $this->getMock(
+            'Doctrine\Common\Cache\FileCache',
+            array('doFetch', 'doContains', 'doSave'),
+            array(), '', false
+        );
+    }
+
+    public function getProviderFileName()
+    {
+         return array(
+            //The characters :\/<>"*?| are not valid in Windows filenames.
+            array('key:1', 'key1'),
+            array('key\2', 'key2'),
+            array('key/3', 'key3'),
+            array('key<4', 'key4'),
+            array('key>5', 'key5'),
+            array('key"6', 'key6'),
+            array('key*7', 'key7'),
+            array('key?8', 'key8'),
+            array('key|9', 'key9'),
+            array('key[0]','key[0]'),
+        );
+    }
+
+    /**
+     * @dataProvider getProviderFileName
+     */
+    public function testInvalidFilename($key, $expected)
+    {
+        $cache  = $this->driver;
+        $method = new \ReflectionMethod($cache, 'getFilename');
+
+        $method->setAccessible(true);
+
+        $value  = $method->invoke($cache, $key);
+        $actual = pathinfo($value, PATHINFO_FILENAME);
+
+        $this->assertEquals($expected, $actual);
+    }
+
+    public function testFilenameCollision()
+    {
+        $data['key:0']  = 'key0';
+        $data['key\0']  = 'key0';
+        $data['key/0']  = 'key0';
+        $data['key<0']  = 'key0';
+        $data['key>0']  = 'key0';
+        $data['key"0']  = 'key0';
+        $data['key*0']  = 'key0';
+        $data['key?0']  = 'key0';
+        $data['key|0']  = 'key0';
+
+        $paths  = array();
+        $cache  = $this->driver;
+        $method = new \ReflectionMethod($cache, 'getFilename');
+
+        $method->setAccessible(true);
+
+        foreach ($data as $key => $expected) {
+            $path   = $method->invoke($cache, $key);
+            $actual = pathinfo($path, PATHINFO_FILENAME);
+
+            $this->assertNotContains($path, $paths);
+            $this->assertEquals($expected, $actual);
+
+            $paths[] = $path;
+        }
+    }
+
+    public function testFilenameShouldCreateThePathWithFourSubDirectories()
+    {
+        $cache          = $this->driver;
+        $method         = new \ReflectionMethod($cache, 'getFilename');
+        $key            = 'item-key';
+        $expectedDir[]  = '84e0e2e893febb73';
+        $expectedDir[]  = '7a0fee0c89d53f4b';
+        $expectedDir[]  = 'b7fcb44c57cdf3d3';
+        $expectedDir[]  = '2ce7363f5d597760';
+        $expectedDir    = implode(DIRECTORY_SEPARATOR, $expectedDir);
+
+        $method->setAccessible(true);
+
+        $path       = $method->invoke($cache, $key);
+        $filename   = pathinfo($path, PATHINFO_FILENAME);
+        $dirname    = pathinfo($path, PATHINFO_DIRNAME);
+
+        $this->assertEquals('item-key', $filename);
+        $this->assertEquals(DIRECTORY_SEPARATOR . $expectedDir, $dirname);
+        $this->assertEquals(DIRECTORY_SEPARATOR . $expectedDir . DIRECTORY_SEPARATOR . $key, $path);
+    }
+}
\ No newline at end of file
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php
index f782e3c..e3b74cd 100644
--- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FilesystemCacheTest.php
@@ -2,29 +2,14 @@
 
 namespace Doctrine\Tests\Common\Cache;
 
+use Doctrine\Common\Cache\Cache;
 use Doctrine\Common\Cache\FilesystemCache;
 
 /**
  * @group DCOM-101
  */
-class FilesystemCacheTest extends CacheTest
+class FilesystemCacheTest extends BaseFileCacheTest
 {
-    /**
-     * @var \Doctrine\Common\Cache\FilesystemCache
-     */
-    private $driver;
-
-    protected function _getCacheDriver()
-    {
-        $dir = sys_get_temp_dir() . "/doctrine_cache_". uniqid();
-        $this->assertFalse(is_dir($dir));
-        
-        $this->driver = new FilesystemCache($dir);
-        $this->assertTrue(is_dir($dir));
-
-        return $this->driver;
-    }
-
     public function testLifetime()
     {
         $cache = $this->_getCacheDriver();
@@ -76,22 +61,15 @@ public function testGetStats()
         $cache = $this->_getCacheDriver();
         $stats = $cache->getStats();
 
-        $this->assertNull($stats);
+        $this->assertNull($stats[Cache::STATS_HITS]);
+        $this->assertNull($stats[Cache::STATS_MISSES]);
+        $this->assertNull($stats[Cache::STATS_UPTIME]);
+        $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]);
+        $this->assertGreaterThan(0, $stats[Cache::STATS_MEMORY_AVAILABLE]);
     }
 
-    public function tearDown()
+    protected function _getCacheDriver()
     {
-        $dir        = $this->driver->getDirectory();
-        $ext        = $this->driver->getExtension();
-        $iterator   = new \RecursiveDirectoryIterator($dir);
-
-        foreach (new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST) as $file) {
-            if ($file->isFile()) {
-                @unlink($file->getRealPath());
-            } else {
-                @rmdir($file->getRealPath());
-            }
-        }
+        return new FilesystemCache($this->directory);
     }
-
-}
\ No newline at end of file
+}
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php
index 36c180c..b0da1b9 100644
--- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php
@@ -3,25 +3,35 @@
 namespace Doctrine\Tests\Common\Cache;
 
 use Doctrine\Common\Cache\MemcacheCache;
+use Memcache;
 
 class MemcacheCacheTest extends CacheTest
 {
-    private $_memcache;
+    private $memcache;
 
     public function setUp()
     {
-        if (extension_loaded('memcache')) {
-            $this->_memcache = new \Memcache;
-            $ok = @$this->_memcache->connect('localhost', 11211);
-            if (!$ok) {
-                $this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcache');
-            }
-        } else {
+        if ( ! extension_loaded('memcache')) {
             $this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcache');
         }
+
+        $this->memcache = new Memcache();
+
+        if (@$this->memcache->connect('localhost', 11211) === false) {
+            unset($this->memcache);
+            $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to memcache');
+        }
     }
 
-    public function testNoExpire() {
+    public function tearDown()
+    {
+        if ($this->memcache instanceof Memcache) {
+            $this->memcache->flush();
+        }
+    }
+
+    public function testNoExpire()
+    {
         $cache = $this->_getCacheDriver();
         $cache->save('noexpire', 'value', 0);
         sleep(1);
@@ -38,8 +48,7 @@ public function testLongLifetime()
     protected function _getCacheDriver()
     {
         $driver = new MemcacheCache();
-        $driver->setMemcache($this->_memcache);
+        $driver->setMemcache($this->memcache);
         return $driver;
     }
-
 }
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php
index ecbe5a6..071329f 100644
--- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php
@@ -3,6 +3,7 @@
 namespace Doctrine\Tests\Common\Cache;
 
 use Doctrine\Common\Cache\MemcachedCache;
+use Memcached;
 
 class MemcachedCacheTest extends CacheTest
 {
@@ -10,21 +11,29 @@ class MemcachedCacheTest extends CacheTest
 
     public function setUp()
     {
-        if (extension_loaded('memcached')) {
-            $this->memcached = new \Memcached();
-            $this->memcached->setOption(\Memcached::OPT_COMPRESSION, false);
-            $this->memcached->addServer('127.0.0.1', 11211);
-
-            $fh = @fsockopen('127.0.0.1', 11211);
-            if (!$fh) {
-                $this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcache');
-            }
-        } else {
-            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcache');
+        if ( ! extension_loaded('memcached')) {
+            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of memcached');
+        }
+
+        $this->memcached = new Memcached();
+        $this->memcached->setOption(Memcached::OPT_COMPRESSION, false);
+        $this->memcached->addServer('127.0.0.1', 11211);
+
+        if (@fsockopen('127.0.0.1', 11211) === false) {
+            unset($this->memcached);
+            $this->markTestSkipped('The ' . __CLASS__ .' cannot connect to memcache');
         }
     }
 
-    public function testNoExpire() {
+    public function tearDown()
+    {
+        if ($this->memcached instanceof Memcached) {
+            $this->memcached->flush();
+        }
+    }
+
+    public function testNoExpire()
+    {
         $cache = $this->_getCacheDriver();
         $cache->save('noexpire', 'value', 0);
         sleep(1);
@@ -35,8 +44,7 @@ public function testLongLifetime()
     {
         $cache = $this->_getCacheDriver();
         $cache->save('key', 'value', 30 * 24 * 3600 + 1);
-
-        $this->assertTrue($cache->contains('key'), 'Memcached provider should support TTL > 30 days');
+        $this->assertTrue($cache->contains('key'), 'Memcache provider should support TTL > 30 days');
     }
 
     protected function _getCacheDriver()
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php
new file mode 100644
index 0000000..8c2f6e0
--- /dev/null
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php
@@ -0,0 +1,61 @@
+<?php
+
+namespace Doctrine\Tests\Common\Cache;
+
+use Doctrine\Common\Cache\Cache;
+use Doctrine\Common\Cache\MongoDBCache;
+use MongoClient;
+use MongoCollection;
+
+class MongoDBCacheTest extends CacheTest
+{
+    /**
+     * @var MongoCollection
+     */
+    private $collection;
+
+    public function setUp()
+    {
+        if ( ! version_compare(phpversion('mongo'), '1.3.0', '>=')) {
+            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of mongo >= 1.3.0');
+        }
+
+        $mongo = new MongoClient();
+        $this->collection = $mongo->selectCollection('doctrine_common_cache', 'test');
+    }
+
+    public function tearDown()
+    {
+        if ($this->collection instanceof MongoCollection) {
+            $this->collection->drop();
+        }
+    }
+
+    public function testSaveWithNonUtf8String()
+    {
+        // Invalid 2-octet sequence
+        $data = "\xc3\x28";
+
+        $cache = $this->_getCacheDriver();
+
+        $this->assertTrue($cache->save('key', $data));
+        $this->assertEquals($data, $cache->fetch('key'));
+    }
+
+    public function testGetStats()
+    {
+        $cache = $this->_getCacheDriver();
+        $stats = $cache->getStats();
+
+        $this->assertNull($stats[Cache::STATS_HITS]);
+        $this->assertNull($stats[Cache::STATS_MISSES]);
+        $this->assertGreaterThan(0, $stats[Cache::STATS_UPTIME]);
+        $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]);
+        $this->assertNull($stats[Cache::STATS_MEMORY_AVAILABLE]);
+    }
+
+    protected function _getCacheDriver()
+    {
+        return new MongoDBCache($this->collection);
+    }
+}
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php
index 5085f46..f49ce25 100644
--- a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/PhpFileCacheTest.php
@@ -2,34 +2,14 @@
 
 namespace Doctrine\Tests\Common\Cache;
 
+use Doctrine\Common\Cache\Cache;
 use Doctrine\Common\Cache\PhpFileCache;
 
 /**
  * @group DCOM-101
  */
-class PhpFileCacheTest extends CacheTest
+class PhpFileCacheTest extends BaseFileCacheTest
 {
-    /**
-     * @var \Doctrine\Common\Cache\PhpFileCache
-     */
-    private $driver;
-
-    protected function _getCacheDriver()
-    {
-        $dir = sys_get_temp_dir() . "/doctrine_cache_". uniqid();
-        $this->assertFalse(is_dir($dir));
-
-        $this->driver = new PhpFileCache($dir);
-        $this->assertTrue(is_dir($dir));
-
-        return $this->driver;
-    }
-
-    public function testObjects()
-    {
-        $this->markTestSkipped('PhpFileCache does not support saving objects that dont implement __set_state()');
-    }
-
     public function testLifetime()
     {
         $cache = $this->_getCacheDriver();
@@ -98,28 +78,17 @@ public function testGetStats()
         $cache = $this->_getCacheDriver();
         $stats = $cache->getStats();
 
-        $this->assertNull($stats);
+        $this->assertNull($stats[Cache::STATS_HITS]);
+        $this->assertNull($stats[Cache::STATS_MISSES]);
+        $this->assertNull($stats[Cache::STATS_UPTIME]);
+        $this->assertEquals(0, $stats[Cache::STATS_MEMORY_USAGE]);
+        $this->assertGreaterThan(0, $stats[Cache::STATS_MEMORY_AVAILABLE]);
     }
 
-    public function tearDown()
+    protected function _getCacheDriver()
     {
-        if (!$this->driver) {
-            return;
-        }
-
-        $dir        = $this->driver->getDirectory();
-        $ext        = $this->driver->getExtension();
-        $iterator   = new \RecursiveDirectoryIterator($dir);
-
-        foreach (new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST) as $file) {
-            if ($file->isFile()) {
-                @unlink($file->getRealPath());
-            } else {
-                @rmdir($file->getRealPath());
-            }
-        }
+        return new PhpFileCache($this->directory);
     }
-
 }
 
 class NotSetStateClass
diff --git a/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php
new file mode 100644
index 0000000..dce8cc0
--- /dev/null
+++ b/core/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php
@@ -0,0 +1,64 @@
+<?php
+
+namespace Doctrine\Tests\Common\Cache;
+
+use Riak\Bucket;
+use Riak\Connection;
+use Riak\Exception;
+use Doctrine\Common\Cache\RiakCache;
+
+/**
+ * RiakCache test
+ *
+ * @group Riak
+ */
+class RiakCacheTest extends CacheTest
+{
+    /**
+     * @var \Riak\Connection
+     */
+    private $connection;
+
+    /**
+     * @var \Riak\Bucket
+     */
+    private $bucket;
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setUp()
+    {
+        if ( ! extension_loaded('riak')) {
+            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of Riak');
+        }
+
+        try {
+            $this->connection = new Connection('127.0.0.1', 8087);
+            $this->bucket     = new Bucket($this->connection, 'test');
+        } catch (Exception\RiakException $e) {
+            $this->markTestSkipped('The ' . __CLASS__ .' requires the use of Riak');
+        }
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function testGetStats()
+    {
+        $cache = $this->_getCacheDriver();
+        $stats = $cache->getStats();
+
+        $this->assertNull($stats);
+    }
+
+    /**
+     * Retrieve RiakCache instance.
+     *
+     * @return \Doctrine\Common\Cache\RiakCache
+     */
+    protected function _getCacheDriver()
+    {
+        return new RiakCache($this->bucket);
+    }
+}
diff --git a/core/vendor/doctrine/common/.gitignore b/core/vendor/doctrine/common/.gitignore
index 4815ac9..fc873f9 100644
--- a/core/vendor/doctrine/common/.gitignore
+++ b/core/vendor/doctrine/common/.gitignore
@@ -5,3 +5,5 @@ dist/
 tests/Doctrine/Tests/Common/Proxy/generated/
 vendor/
 .idea
+doctrine-common-*.tar
+doctrine-common-*.tar.gz
diff --git a/core/vendor/doctrine/common/.travis.yml b/core/vendor/doctrine/common/.travis.yml
index f7fe5c3..333d36b 100644
--- a/core/vendor/doctrine/common/.travis.yml
+++ b/core/vendor/doctrine/common/.travis.yml
@@ -1,8 +1,5 @@
 language: php
 
-env:
-  - OPCODE_CACHE=apc
-
 php:
   - 5.3.3
   - 5.3
@@ -11,4 +8,3 @@ php:
 
 before_script:
     - composer --prefer-source install
-    - php ./bin/travis-setup.php $OPCODE_CACHE
diff --git a/core/vendor/doctrine/common/bin/travis-setup.php b/core/vendor/doctrine/common/bin/travis-setup.php
deleted file mode 100644
index b51e267..0000000
--- a/core/vendor/doctrine/common/bin/travis-setup.php
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-/*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * This software consists of voluntary contributions made by many individuals
- * and is licensed under the MIT license. For more information, see
- * <http://www.doctrine-project.org>.
- */
-
-/**
- * Install PHP extensions required for testing by Travis CI.
- *
- * @author Victor Berchet <victor@suumit.com>
- * @since 2.2
- */
-$installer = new PhpExtensions();
-
-if (isset($argv[1]) && 'APC' === strtoupper($argv[1])) {
-    $installer->install('apc');
-} else {
-    $installer->install('xcache');
-}
-
-$installer->install('memcache');
-$installer->install('memcached');
-
-class PhpExtensions
-{
-    protected $extensions;
-    protected $phpVersion;
-    protected $iniPath;
-
-    public function __construct()
-    {
-        $this->phpVersion = phpversion();
-        $this->iniPath = php_ini_loaded_file();
-        $this->extensions = array(
-        'memcache' => array(
-            'url'        => 'http://pecl.php.net/get/memcache-2.2.6.tgz',
-            'php_version' => array(),
-            'cfg'         => array('--enable-memcache'),
-            'ini'         => array('extension=memcache.so'),
-        ),
-        'memcached' => array(
-            'url'        => 'http://pecl.php.net/get/memcached-1.0.2.tgz',
-            'php_version' => array(
-                // memcached 1.0.2 does not build on PHP 5.4
-                array('<', '5.4'),
-            ),
-            'cfg'         => array(),
-            'ini'         => array('extension=memcached.so'),
-        ),
-        'apc' => array(
-            'url'        => 'http://pecl.php.net/get/APC-3.1.9.tgz',
-            'php_version' => array(
-                // apc 3.1.9 causes a segfault on PHP 5.4
-                array('<', '5.4'),
-            ),
-            'cfg'         => array(),
-            'ini'         => array(
-                'extension=apc.so',
-                'apc.enabled=1',
-                'apc.enable_cli=1'
-            ),
-        ),
-        'xcache' => array(
-            'url'        => 'http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz',
-            'php_version' => array(
-                // xcache does not build with Travis CI (as of 2012-01-09)
-                array('<', '5'),
-            ),
-            'cfg'         => array('--enable-xcache'),
-            'ini'         => array(
-                'extension=xcache.so',
-                'xcache.cacher=false',
-                'xcache.admin.enable_auth=0',
-                'xcache.var_size=1M',
-            ),
-        ),
-    );
-    }
-
-    public function install($name)
-    {
-        if (array_key_exists($name, $this->extensions)) {
-            $extension = $this->extensions[$name];
-
-
-            echo "== extension: $name ==\n";
-
-            foreach ($extension['php_version'] as $version) {
-                if (!version_compare($this->phpVersion, $version[1], $version[0])) {
-                    printf(
-                        "=> not installed, requires a PHP version %s %s (%s installed)\n",
-                        $version[0],
-                        $version[1],
-                        $this->phpVersion
-                    );
-
-                    return;
-                }
-            }
-
-            $this->system(sprintf("wget %s > /dev/null 2>&1", $extension['url']));
-            $file = basename($extension['url']);
-            $this->system(sprintf("tar -xzf %s > /dev/null 2>&1", $file));
-            $folder = basename($file, ".tgz");
-            $folder = basename($folder, ".tar.gz");
-            $this->system(sprintf(
-                'sh -c "cd %s && phpize && ./configure %s && make && sudo make install" > /dev/null 2>&1',
-                $folder,
-                implode(' ', $extension['cfg'])
-            ));
-            foreach ($extension['ini'] as $ini) {
-                $this->system(sprintf("echo %s >> %s", $ini, $this->iniPath));
-            }
-            printf("=> installed (%s)\n", $folder);
-        }
-    }
-
-    private function system($cmd)
-    {
-        $ret = 0;
-        system($cmd, $ret);
-        if (0 !== $ret) {
-            printf("=> Command '%s' failed !", $cmd);
-            
-            exit($ret);
-        }
-    }
-}
diff --git a/core/vendor/doctrine/common/build.properties b/core/vendor/doctrine/common/build.properties
index ff311a4..ef51d20 100644
--- a/core/vendor/doctrine/common/build.properties
+++ b/core/vendor/doctrine/common/build.properties
@@ -1,6 +1,3 @@
-# Project Name
-project.name=DoctrineCommon
-
 # Version class and file
-project.version_class = Doctrine\Common\Version
+project.version_class = Doctrine\\Common\\Version
 project.version_file = lib/Doctrine/Common/Version.php
diff --git a/core/vendor/doctrine/common/build.xml b/core/vendor/doctrine/common/build.xml
index 9d9100d..429b768 100644
--- a/core/vendor/doctrine/common/build.xml
+++ b/core/vendor/doctrine/common/build.xml
@@ -1,59 +1,101 @@
 <?xml version="1.0"?>
-<project name="Doctrine2" default="build" basedir=".">
-    <taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
-    <import file="${project.basedir}/lib/vendor/doctrine-build-common/packaging.xml" />
-
+<project name="DoctrineCommon" default="build" basedir=".">
     <property file="build.properties" />
-    
-    <!-- 
-        Fileset for artifacts shared across all distributed packages.
-    -->
-    <fileset id="shared-artifacts" dir=".">
-        <include name="LICENSE"/>
-        <include name="COPYRIGHT"/>
-        <include name="CHANGELOG"/>
-    </fileset>
-
-    <!-- 
-        Fileset for the sources of the Doctrine Common package.
-    -->
-    <fileset id="common-sources" dir="./lib">
-        <include name="Doctrine/Common/**"/>
-    </fileset>
-
-    <!--
-        Builds Common package, preparing it for distribution.
-    -->
-    <target name="copy-files" depends="prepare">
-        <copy todir="${build.dir}/${project.name}-${version}">
-            <fileset refid="shared-artifacts"/>
-        </copy>
-        <copy todir="${build.dir}/${project.name}-${version}">
-            <fileset refid="common-sources"/>
-        </copy>
-    </target>
-
-    <!-- 
-        Builds distributable PEAR packages.
-    -->
-    <target name="define-pear-package" depends="copy-files">
-        <d51pearpkg2 baseinstalldir="/" dir="${build.dir}/${project.name}-${version}">
-           <name>DoctrineCommon</name>
-           <summary>Doctrine Common PHP Extensions</summary>
-           <channel>pear.doctrine-project.org</channel>
-           <description>The Doctrine Common package contains shared code between the other packages.</description>
-           <lead user="jwage" name="Jonathan H. Wage" email="jonwage@gmail.com" />
-           <lead user="guilhermeblanco" name="Guilherme Blanco" email="guilhermeblanco@gmail.com" />
-           <lead user="romanb" name="Roman Borschel" email="roman@code-factory.org" />
-           <lead user="beberlei" name="Benjamin Eberlei" email="kontakt@beberlei.de" />
-           <license>MIT</license>
-           <version release="${pear.version}" api="${pear.version}" />
-           <stability release="${pear.stability}" api="${pear.stability}" />
-           <notes>-</notes>
-           <dependencies>
-               <php minimum_version="5.3.0" />
-               <pear minimum_version="1.6.0" recommended_version="1.6.1" />
-           </dependencies>
-        </d51pearpkg2>
+
+    <target name="php">
+        <exec executable="which" outputproperty="php_executable">
+            <arg value="php" />
+        </exec>
+    </target>
+
+    <target name="prepare">
+        <mkdir dir="build" />
+    </target>
+
+    <target name="build" depends="check-git-checkout-clean,prepare,php,composer">
+        <exec executable="${php_executable}">
+            <arg value="build/composer.phar" />
+            <arg value="archive" />
+            <arg value="--dir=build" />
+        </exec>
     </target>
+
+    <target name="composer" depends="php,composer-check,composer-download">
+        <exec executable="${php_executable}">
+            <arg value="build/composer.phar" />
+            <arg value="install" />
+        </exec>
+    </target>
+
+    <target name="composer-check" depends="prepare">
+        <available file="build/composer.phar" property="composer.present"/>
+    </target>
+
+    <target name="composer-download" unless="composer.present">
+        <exec executable="wget">
+            <arg value="-Obuild/composer.phar" />
+            <arg value="http://getcomposer.org/composer.phar" />
+        </exec>
+    </target>
+
+    <target name="make-release" depends="check-git-checkout-clean,prepare,php">
+        <replace file="${project.version_file}" token="-DEV" value="" failOnNoReplacements="true" />
+        <exec executable="${php_executable}" outputproperty="doctrine.current_version" failonerror="true">
+            <arg value="-r" />
+            <arg value="require_once '${project.version_file}';echo ${project.version_class}::VERSION;" />
+        </exec>
+        <exec executable="${php_executable}" outputproperty="doctrine.next_version" failonerror="true">
+            <arg value="-r" />
+            <arg value="$parts = explode('.', str_ireplace(array('-DEV', '-ALPHA', '-BETA'), '', '${doctrine.current_version}'));
+                if (count($parts) != 3) {
+                    throw new \InvalidArgumentException('Version is assumed in format x.y.z, ${doctrine.current_version} given');
+                }
+                $parts[2]++;
+                echo implode('.', $parts);
+            " />
+        </exec>
+
+        <git-commit file="${project.version_file}" message="Release ${doctrine.current_version}" />
+        <git-tag version="${doctrine.current_version}" />
+        <replace file="${project.version_file}" token="${doctrine.current_version}" value="${doctrine.next_version}-DEV" />
+        <git-commit file="${project.version_file}" message="Bump version to ${doctrine.next_version}" />
+    </target>
+
+    <target name="check-git-checkout-clean">
+        <exec executable="git" failonerror="true">
+            <arg value="diff-index" />
+            <arg value="--quiet" />
+            <arg value="HEAD" />
+        </exec>
+    </target>
+
+    <macrodef name="git-commit">
+        <attribute name="file" default="NOT SET"/>
+        <attribute name="message" default="NOT SET"/>
+
+        <sequential>
+            <exec executable="git">
+                <arg value="add" />
+                <arg value="@{file}" />
+            </exec>
+            <exec executable="git">
+                <arg value="commit" />
+                <arg value="-m" />
+                <arg value="@{message}" />
+            </exec>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="git-tag">
+        <attribute name="version" default="NOT SET" />
+
+        <sequential>
+            <exec executable="git">
+                <arg value="tag" />
+                <arg value="-m" />
+                <arg value="v@{version}" />
+                <arg value="v@{version}" />
+            </exec>
+        </sequential>
+    </macrodef>
 </project>
diff --git a/core/vendor/doctrine/common/composer.json b/core/vendor/doctrine/common/composer.json
index 24f9a2c..b8c36b5 100644
--- a/core/vendor/doctrine/common/composer.json
+++ b/core/vendor/doctrine/common/composer.json
@@ -27,5 +27,8 @@
         "branch-alias": {
             "dev-master": "2.4.x-dev"
         }
+    },
+    "archive": {
+        "exclude": ["!vendor", "tests", "*phpunit.xml", ".travis.yml", "build.xml", "build.properties", "composer.phar"]
     }
 }
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php
index b8ba677..adb6c7b 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php
@@ -32,6 +32,43 @@
 abstract class AbstractProxyFactory
 {
     /**
+     * Never autogenerate a proxy and rely that it was generated by some
+     * process before deployment.
+     *
+     * @var integer
+     */
+    const AUTOGENERATE_NEVER = 0;
+
+    /**
+     * Always generates a new proxy in every request.
+     *
+     * This is only sane during development.
+     *
+     * @var integer
+     */
+    const AUTOGENERATE_ALWAYS = 1;
+
+    /**
+     * Autogenerate the proxy class when the proxy file does not exist.
+     *
+     * This strategy causes a file exists call whenever any proxy is used the
+     * first time in a request.
+     *
+     * @var integer
+     */
+    const AUTOGENERATE_FILE_NOT_EXISTS = 2;
+
+    /**
+     * Generate the proxy classes using eval().
+     *
+     * This strategy is only sane for development, and even then it gives me
+     * the creeps a little.
+     *
+     * @var integer
+     */
+    const AUTOGENERATE_EVAL = 3;
+
+    /**
      * @var \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
      */
     private $metadataFactory;
@@ -54,13 +91,13 @@
     /**
      * @param \Doctrine\Common\Proxy\ProxyGenerator                     $proxyGenerator
      * @param \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory $metadataFactory
-     * @param bool                                                      $autoGenerate
+     * @param bool|int                                                  $autoGenerate
      */
     public function __construct(ProxyGenerator $proxyGenerator, ClassMetadataFactory $metadataFactory, $autoGenerate)
     {
         $this->proxyGenerator  = $proxyGenerator;
         $this->metadataFactory = $metadataFactory;
-        $this->autoGenerate    = $autoGenerate;
+        $this->autoGenerate    = (int)$autoGenerate;
     }
 
     /**
@@ -158,11 +195,27 @@ private function getProxyDefinition($className)
         if ( ! class_exists($proxyClassName, false)) {
             $fileName  = $this->proxyGenerator->getProxyFileName($className);
 
-            if ($this->autoGenerate) {
-                $this->proxyGenerator->generateProxyClass($classMetadata);
+            switch ($this->autoGenerate) {
+                case self::AUTOGENERATE_NEVER:
+                    require $fileName;
+                    break;
+
+                case self::AUTOGENERATE_FILE_NOT_EXISTS:
+                    if ( ! file_exists($fileName)) {
+                        $this->proxyGenerator->generateProxyClass($classMetadata, $fileName);
+                    }
+                    require $fileName;
+                    break;
+
+                case self::AUTOGENERATE_ALWAYS:
+                    $this->proxyGenerator->generateProxyClass($classMetadata, $fileName);
+                    require $fileName;
+                    break;
+
+                case self::AUTOGENERATE_EVAL:
+                    $this->proxyGenerator->generateProxyClass($classMetadata, false);
+                    break;
             }
-
-            require $fileName;
         }
 
         return $this->definitions[$className];
diff --git a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
index 483ab67..25f3ed1 100644
--- a/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
+++ b/core/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
@@ -254,11 +254,11 @@ public function setProxyClassTemplate($proxyClassTemplate)
      * Generates a proxy class file.
      *
      * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class    Metadata for the original class.
-     * @param string                                             $fileName Filename (full path) for the generated class.
+     * @param string|bool                                        $fileName Filename (full path) for the generated class. If none is given, eval() is used.
      *
      * @throws UnexpectedValueException
      */
-    public function generateProxyClass(ClassMetadata $class, $fileName = null)
+    public function generateProxyClass(ClassMetadata $class, $fileName = false)
     {
         preg_match_all('(<([a-zA-Z]+)>)', $this->proxyClassTemplate, $placeholderMatches);
 
@@ -277,8 +277,18 @@ public function generateProxyClass(ClassMetadata $class, $fileName = null)
             }
         }
 
-        $proxyCode       = strtr($this->proxyClassTemplate, $placeholders);
-        $fileName        = $fileName ?: $this->getProxyFileName($class->getName());
+        $proxyCode = strtr($this->proxyClassTemplate, $placeholders);
+
+        if ( ! $fileName) {
+            $proxyClassName = $this->generateNamespace($class) . '\\' . $this->generateProxyShortClassName($class);
+
+            if ( ! class_exists($proxyClassName)) {
+                eval(substr($proxyCode, 5));
+            }
+
+            return;
+        }
+
         $parentDirectory = dirname($fileName);
 
         if ( ! is_dir($parentDirectory) && (false === @mkdir($parentDirectory, 0775, true))) {
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php
index e0c21ee..4d5a613 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyClassGeneratorTest.php
@@ -61,8 +61,7 @@ protected function setUp()
             return;
         }
 
-        $this->proxyGenerator->generateProxyClass($this->metadata);
-        require_once $this->proxyGenerator->getProxyFileName($this->metadata->getName());
+        $this->generateAndRequire($this->proxyGenerator, $this->metadata);
     }
 
     public function testReferenceProxyRespectsMethodsParametersTypeHinting()
@@ -107,14 +106,11 @@ public function testNonNamespacedProxyGeneration()
     public function testClassWithSleepProxyGeneration()
     {
         if (!class_exists('Doctrine\Tests\Common\ProxyProxy\__CG__\SleepClass', false)) {
-            $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata');
-            $reflClass = new ReflectionClass('Doctrine\Tests\Common\Proxy\SleepClass');
-            $metadata->expects($this->any())->method('getReflectionClass')->will($this->returnValue($reflClass));
-            $metadata->expects($this->any())->method('getIdentifierFieldNames')->will($this->returnValue(array('id')));
-            $metadata->expects($this->any())->method('getName')->will($this->returnValue($reflClass->getName()));
+            $className = 'Doctrine\Tests\Common\Proxy\SleepClass';
+            $metadata = $this->createClassMetadata($className, array('id'));
             $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true);
-            $proxyGenerator->generateProxyClass($metadata);
-            require_once $proxyGenerator->getProxyFileName($metadata->getName());
+
+            $this->generateAndRequire($proxyGenerator, $metadata);
         }
 
         $classCode = file_get_contents(__DIR__ . '/generated/__CG__DoctrineTestsCommonProxySleepClass.php');
@@ -122,6 +118,13 @@ public function testClassWithSleepProxyGeneration()
         $this->assertEquals(1, substr_count($classCode, 'parent::__sleep()'));
     }
 
+    private function generateAndRequire($proxyGenerator, $metadata)
+    {
+        $proxyGenerator->generateProxyClass($metadata, $proxyGenerator->getProxyFileName($metadata->getName()));
+
+        require_once $proxyGenerator->getProxyFileName($metadata->getName());
+    }
+
     public function testClassWithCallableTypeHintOnProxiedMethod()
     {
         if (PHP_VERSION_ID < 50400) {
@@ -129,16 +132,11 @@ public function testClassWithCallableTypeHintOnProxiedMethod()
         }
 
         if (!class_exists('Doctrine\Tests\Common\ProxyProxy\__CG__\CallableTypeHintClass', false)) {
-            $metadata       = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata');
-            $reflClass      = new ReflectionClass('Doctrine\Tests\Common\Proxy\CallableTypeHintClass');
-            $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true);
-
-            $metadata->expects($this->any())->method('getReflectionClass')->will($this->returnValue($reflClass));
-            $metadata->expects($this->any())->method('getIdentifierFieldNames')->will($this->returnValue(array('id')));
-            $metadata->expects($this->any())->method('getName')->will($this->returnValue($reflClass->getName()));
+            $className = 'Doctrine\Tests\Common\Proxy\CallableTypeHintClass';
+            $metadata = $this->createClassMetadata($className, array('id'));
 
-            $proxyGenerator->generateProxyClass($metadata);
-            require_once $proxyGenerator->getProxyFileName($metadata->getName());
+            $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true);
+            $this->generateAndRequire($proxyGenerator, $metadata);
         }
 
         $classCode = file_get_contents(__DIR__ . '/generated/__CG__DoctrineTestsCommonProxyCallableTypeHintClass.php');
@@ -149,11 +147,7 @@ public function testClassWithCallableTypeHintOnProxiedMethod()
     public function testClassWithInvalidTypeHintOnProxiedMethod()
     {
         $className = 'Doctrine\Tests\Common\Proxy\InvalidTypeHintClass';
-        $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata');
-        $reflClass = new ReflectionClass($className);
-        $metadata->expects($this->any())->method('getReflectionClass')->will($this->returnValue($reflClass));
-        $metadata->expects($this->any())->method('getIdentifierFieldNames')->will($this->returnValue(array()));
-        $metadata->expects($this->any())->method('getName')->will($this->returnValue($className));
+        $metadata = $this->createClassMetadata($className, array('id'));
         $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true);
 
         $this->setExpectedException(
@@ -182,4 +176,34 @@ public function testInvalidPlaceholderThrowsException()
         $generator = new ProxyGenerator(__DIR__ . '/generated', 'SomeNamespace');
         $generator->setPlaceholder('<somePlaceholder>', array());
     }
+
+    public function testUseEvalIfNoFilenameIsGiven()
+    {
+        $proxyGenerator = new ProxyGenerator(__DIR__ . '/generated', __NAMESPACE__ . 'Proxy', true);
+
+        $className = __NAMESPACE__ . '\\EvalBase';
+
+        $metadata = $this->createClassMetadata($className, array('id'));
+
+        $proxyGenerator->generateProxyClass($metadata);
+
+        $reflClass = new ReflectionClass('Doctrine\Tests\Common\ProxyProxy\__CG__\Doctrine\Tests\Common\Proxy\EvalBase');
+
+        $this->assertContains("eval()'d code", $reflClass->getFileName());
+    }
+
+    private function createClassMetadata($className, array $ids)
+    {
+        $metadata = $this->getMock('Doctrine\Common\Persistence\Mapping\ClassMetadata');
+        $reflClass = new ReflectionClass($className);
+        $metadata->expects($this->any())->method('getReflectionClass')->will($this->returnValue($reflClass));
+        $metadata->expects($this->any())->method('getIdentifierFieldNames')->will($this->returnValue($ids));
+        $metadata->expects($this->any())->method('getName')->will($this->returnValue($className));
+
+        return $metadata;
+    }
+}
+
+class EvalBase
+{
 }
diff --git a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php
index 935db31..a63f8bd 100644
--- a/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php
+++ b/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php
@@ -299,7 +299,7 @@ private function generateProxyClass($className)
             ->method('getTypeOfField')
             ->will($this->returnValue('string'));
 
-        $this->proxyGenerator->generateProxyClass($metadata);
+        $this->proxyGenerator->generateProxyClass($metadata, $this->proxyGenerator->getProxyFileName($className));
         require_once $this->proxyGenerator->getProxyFileName($className);
 
         return $proxyClassName;
