diff --git a/core/composer.json b/core/composer.json
index 459c00c..28d46e0 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -9,7 +9,7 @@
     "symfony/http-foundation": "<2.4",
     "symfony/http-kernel": "<2.4",
     "symfony/routing": "<2.4",
-    "symfony/serializer": "2.2.0-BETA2",
+    "symfony/serializer": "<2.4",
     "symfony/validator": "<2.4",
     "symfony/yaml": "<2.4",
     "twig/twig": "1.*@stable",
diff --git a/core/composer.lock b/core/composer.lock
index 6eb40a1..8acb460 100644
--- a/core/composer.lock
+++ b/core/composer.lock
@@ -1,5 +1,5 @@
 {
-    "hash": "c087560024f328e26e2ed57c9b2aa703",
+    "hash": "fb8595c6fbaaa5bf51bf7efeb67d73bc",
     "packages": [
         {
             "name": "doctrine/common",
@@ -25,6 +25,7 @@
                     "dev-master": "2.3.x-dev"
                 }
             },
+            "installation-source": "dist",
             "autoload": {
                 "psr-0": {
                     "Doctrine\\Common": "lib/"
@@ -97,6 +98,7 @@
             },
             "time": "2013-01-13 01:20:04",
             "type": "library",
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "EasyRdf_": "lib/"
@@ -150,6 +152,7 @@
                     "dev-master": "3.0-dev"
                 }
             },
+            "installation-source": "dist",
             "autoload": {
                 "psr-0": {
                     "Guzzle\\Common": ""
@@ -197,6 +200,7 @@
                     "dev-master": "3.0-dev"
                 }
             },
+            "installation-source": "dist",
             "autoload": {
                 "psr-0": {
                     "Guzzle\\Http": ""
@@ -248,6 +252,7 @@
                     "dev-master": "3.0-dev"
                 }
             },
+            "installation-source": "dist",
             "autoload": {
                 "psr-0": {
                     "Guzzle\\Parser": ""
@@ -293,6 +298,7 @@
                     "dev-master": "3.0-dev"
                 }
             },
+            "installation-source": "dist",
             "autoload": {
                 "psr-0": {
                     "Guzzle\\Stream": ""
@@ -354,6 +360,7 @@
                     "dev-master": "1.1-dev"
                 }
             },
+            "installation-source": "dist",
             "autoload": {
                 "psr-0": {
                     "Assetic": "src/"
@@ -405,6 +412,7 @@
                     "dev-master": "1.0-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Cmf\\Component\\Routing": ""
@@ -455,6 +463,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\ClassLoader\\": ""
@@ -510,6 +519,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\DependencyInjection\\": ""
@@ -564,6 +574,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\EventDispatcher\\": ""
@@ -611,6 +622,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\HttpFoundation\\": ""
@@ -682,6 +694,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\HttpKernel\\": ""
@@ -724,6 +737,7 @@
             },
             "time": "2012-12-06 10:00:55",
             "type": "library",
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\Process": ""
@@ -782,6 +796,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\Routing\\": ""
@@ -806,29 +821,30 @@
         },
         {
             "name": "symfony/serializer",
-            "version": "v2.2.0-BETA2",
+            "version": "dev-master",
             "target-dir": "Symfony/Component/Serializer",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Serializer",
-                "reference": "v2.2.0-BETA2"
+                "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://github.com/symfony/Serializer/archive/v2.2.0-BETA2.zip",
-                "reference": "v2.2.0-BETA2",
+                "url": "https://github.com/symfony/Serializer/archive/ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0.zip",
+                "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3"
             },
-            "time": "2013-01-19 07:50:02",
+            "time": "2012-12-19 07:09:49",
             "type": "library",
             "extra": {
                 "branch-alias": {
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\Serializer\\": ""
@@ -884,6 +900,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\Translation\\": ""
@@ -944,6 +961,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\Validator\\": ""
@@ -991,6 +1009,7 @@
                     "dev-master": "2.2-dev"
                 }
             },
+            "installation-source": "source",
             "autoload": {
                 "psr-0": {
                     "Symfony\\Component\\Yaml\\": ""
@@ -1037,6 +1056,7 @@
                     "dev-master": "1.11-dev"
                 }
             },
+            "installation-source": "dist",
             "autoload": {
                 "psr-0": {
                     "Twig_": "lib/"
@@ -1069,7 +1089,6 @@
     ],
     "minimum-stability": "dev",
     "stability-flags": {
-        "symfony/serializer": 10,
         "twig/twig": 0,
         "doctrine/common": 0,
         "guzzle/http": 0,
diff --git a/core/includes/config.inc b/core/includes/config.inc
index ce6f0b7..06e0e67 100644
--- a/core/includes/config.inc
+++ b/core/includes/config.inc
@@ -317,16 +317,3 @@ function config_get_entity_type_by_name($name) {
   });
   return key($entities);
 }
-
-/*
- * Returns the typed config manager service.
- *
- * Use the typed data manager service for creating typed configuration objects.
- *
- * @see Drupal\Core\TypedData\TypedDataManager::create()
- *
- * @return Drupal\Core\TypedData\TypedConfigManager
- */
-function config_typed() {
-  return drupal_container()->get('config.typed');
-}
diff --git a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php b/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
deleted file mode 100644
index f801c28..0000000
--- a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\Schema\ArrayElement.
- */
-
-namespace Drupal\Core\Config\Schema;
-
-use \ArrayAccess;
-use \ArrayIterator;
-use \Countable;
-use \IteratorAggregate;
-use \Traversable;
-
-/**
- * Defines a generic configuration element that contains multiple properties.
- */
-abstract class ArrayElement extends Element implements IteratorAggregate, ArrayAccess, Countable {
-
-  /**
-   * Parsed elements.
-   */
-  protected $elements;
-
-  /**
-   * Gets an array of contained elements.
-   *
-   * @return array
-   *   Array of \Drupal\Core\Config\Schema\ArrayElement objects.
-   */
-  protected function getElements() {
-    if (!isset($this->elements)) {
-      $this->elements = $this->parse();
-    }
-    return $this->elements;
-  }
-
-  /**
-   * Gets valid configuration data keys.
-   *
-   * @return array
-   *   Array of valid configuration data keys.
-   */
-  protected function getAllKeys() {
-    return is_array($this->value) ? array_keys($this->value) : array();
-  }
-
-  /**
-   * Builds an array of contained elements.
-   *
-   * @return array
-   *   Array of \Drupal\Core\Config\Schema\ArrayElement objects.
-   */
-  protected abstract function parse();
-
-  /**
-   * Implements TypedDataInterface::validate().
-   */
-  public function validate() {
-    foreach ($this->getElements() as $element) {
-      if (!$element->validate()) {
-        return FALSE;
-      }
-    }
-    return TRUE;
-  }
-
-  /**
-   * Implements ArrayAccess::offsetExists().
-   */
-  public function offsetExists($offset) {
-    return array_key_exists($offset, $this->getElements());
-  }
-
-  /**
-   * Implements ArrayAccess::offsetGet().
-   */
-  public function offsetGet($offset) {
-    $elements = $this->getElements();
-    return $elements[$offset];
-  }
-
-  /**
-   * Implements ArrayAccess::offsetSet().
-   */
-  public function offsetSet($offset, $value) {
-    if ($value instanceof TypedDataInterface) {
-      $value = $value->getValue();
-    }
-    $this->value[$offset] = $value;
-    unset($this->elements);
-  }
-
-  /**
-   * Implements ArrayAccess::offsetUnset().
-   */
-  public function offsetUnset($offset) {
-    unset($this->value[$offset]);
-    unset($this->elements);
-  }
-
-  /**
-   * Implements Countable::count().
-   */
-  public function count() {
-    return count($this->getElements());
-  }
-
-  /**
-   * Implements IteratorAggregate::getIterator();
-   */
-  public function getIterator() {
-    return new ArrayIterator($this->getElements());
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Config/Schema/Element.php b/core/lib/Drupal/Core/Config/Schema/Element.php
deleted file mode 100644
index efe7147..0000000
--- a/core/lib/Drupal/Core/Config/Schema/Element.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\Schema\Element.
- */
-
-namespace Drupal\Core\Config\Schema;
-
-use Drupal\Core\TypedData\ContextAwareTypedData;
-
-/**
- * Defines a generic configuration element.
- */
-abstract class Element extends ContextAwareTypedData {
-
-  /**
-   * The configuration value.
-   *
-   * @var mixed
-   */
-  protected $value;
-
-  /**
-   * Create typed config object.
-   */
-  protected function parseElement($key, $data, $definition) {
-    return config_typed()->create($definition, $data, $key, $this);
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Config/Schema/Mapping.php b/core/lib/Drupal/Core/Config/Schema/Mapping.php
deleted file mode 100644
index c09d9ad..0000000
--- a/core/lib/Drupal/Core/Config/Schema/Mapping.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\Schema\Mapping.
- */
-
-namespace Drupal\Core\Config\Schema;
-
-use Drupal\Component\Utility\NestedArray;
-use Drupal\Core\TypedData\ComplexDataInterface;
-use \InvalidArgumentException;
-
-/**
- * Defines a mapping configuration element.
- *
- * Wraps configuration data and metadata allowing access to configuration data
- * using the ComplexDataInterface API. This object may contain any number and
- * type of nested properties.
- */
-class Mapping extends ArrayElement implements ComplexDataInterface {
-
-  /**
-   * Overrides ArrayElement::parse()
-   */
-  protected function parse() {
-    $elements = array();
-    foreach ($this->definition['mapping'] as $key => $definition) {
-      if (isset($this->value[$key])) {
-        $elements[$key] = $this->parseElement($key, $this->value[$key], $definition);
-      }
-    }
-    return $elements;
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::get().
-   */
-  public function get($property_name) {
-    $elements = $this->getElements();
-    if (isset($elements[$property_name])) {
-      return $elements[$property_name];
-    }
-    else {
-      throw new InvalidArgumentException(format_string("The configuration property @key doesn't exist.", array(
-          '@key' => $property_name,
-      )));
-    }
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::set().
-   */
-  public function set($property_name, $value) {
-    // Set the data into the configuration array but behave according to the
-    // interface specification when we've got a null value.
-    if (isset($value)) {
-      $this->value[$property_name] = $value;
-      return $this->get($property_name);
-    }
-    else {
-      // In these objects, when clearing the value, the property is gone.
-      // As this needs to return a property, we get it before we delete it.
-      $property = $this->get($property_name);
-      unset($this->value[$property_name]);
-      $property->setValue($value);
-      return $property;
-    }
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::getProperties().
-   */
-  public function getProperties($include_computed = FALSE) {
-    return $this->getElements();
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::getPropertyValues().
-   */
-  public function getPropertyValues() {
-    return $this->getValue();
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::setPropertyValues().
-   */
-  public function setPropertyValues($values) {
-    foreach ($values as $name => $value) {
-      $this->value[$name] = $value;
-    }
-    return $this;
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinition().
-   */
-  public function getPropertyDefinition($name) {
-    if (isset($this->definition['mapping'][$name])) {
-      return $this->definition['mapping'][$name];
-    }
-    else {
-      return FALSE;
-    }
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions().
-   */
-  public function getPropertyDefinitions() {
-    $list = array();
-    foreach ($this->getAllKeys() as $key) {
-      $list[$key] = $this->getPropertyDefinition($key);
-    }
-    return $list;
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ComplexDataInterface::isEmpty().
-   */
-  public function isEmpty() {
-    return empty($this->value);
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Config/Schema/Parser.php b/core/lib/Drupal/Core/Config/Schema/Parser.php
deleted file mode 100644
index 9569244..0000000
--- a/core/lib/Drupal/Core/Config/Schema/Parser.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\Schema\Parser.
- */
-
-namespace Drupal\Core\Config\Schema;
-
-/**
- * Parser.
- */
-class Parser {
-
-  /**
-   * Parse configuration data against schema data.
-   */
-  static function parse($data, $definition, $name = NULL, $parent = NULL) {
-    // Set default type depending on data and context.
-    if (!isset($definition['type'])) {
-      if (is_array($data) || !$context) {
-        $definition += array('type' => 'any');
-      }
-      else {
-        $definition += array('type' => 'str');
-      }
-    }
-    // Create typed data object.
-    config_typed()->create($definition, $data, $name, $parent);
-  }
-
-  /**
-   * Validate configuration data against schema data.
-   */
-  static function validate($config_data, $schema_data) {
-    return self::parse($config_data, $schema_data)->validate();
-  }
-
-  static function getDefinition($type, $data) {
-    return config_definition($type);
-  }
-}
-
diff --git a/core/lib/Drupal/Core/Config/Schema/Property.php b/core/lib/Drupal/Core/Config/Schema/Property.php
deleted file mode 100644
index d7e4b60..0000000
--- a/core/lib/Drupal/Core/Config/Schema/Property.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\Schema\Sequence.
- */
-
-namespace Drupal\Core\Config\Schema;
-
-/**
- * Generic configuration property.
- */
-class Property extends Element {
-
-  /**
-   * Implements TypedDataInterface::validate().
-   */
-  public function validate() {
-    return isset($this->value);
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Config/Schema/SchemaDiscovery.php b/core/lib/Drupal/Core/Config/Schema/SchemaDiscovery.php
deleted file mode 100644
index 9a08992..0000000
--- a/core/lib/Drupal/Core/Config/Schema/SchemaDiscovery.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Config\Schema\SchemaDiscovery.
- */
-
-namespace Drupal\Core\Config\Schema;
-
-use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
-use Drupal\Component\Utility\NestedArray;
-
-/**
- * A discovery mechanism that reads plugin definitions from schema data
- * in YAML format.
- */
-class SchemaDiscovery implements DiscoveryInterface {
-
-  /**
-   * A storage controller instance for reading configuration schema data.
-   *
-   * @var Drupal\Core\Config\StorageInterface
-   */
-  protected $storage;
-
-  /**
-   * The array of plugin definitions, keyed by plugin id.
-   *
-   * @var array
-   */
-  protected $definitions = array();
-
-  /**
-   * Public constructor.
-   *
-   * @param Drupal\Core\Config\StorageInterface $storage
-   *   The storage controller object to use for reading schema data
-   */
-  public function __construct($storage) {
-    $this->storage = $storage;
-    // Load definitions for all enabled modules.
-    foreach (module_list() as $module) {
-      $this->loadSchema($module);
-    }
-    // @todo Load definitions for all enabled themes.
-
-  }
-
-  /**
-   * Implements Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinition().
-   */
-  public function getDefinition($base_plugin_id) {
-    if (isset($this->definitions[$base_plugin_id])) {
-      $type = $base_plugin_id;
-    }
-    elseif (strpos($base_plugin_id, '.') && ($name = $this->getFallbackName($base_plugin_id)) && isset($this->definitions[$name])) {
-      // Found a generic name, replacing the last element by '*'.
-      $type = $name;
-    }
-    else {
-      // If we don't have definition, return the 'default' element.
-      // This should map to 'undefined' type by default, unless overridden.
-      $type = 'default';
-    }
-    $definition = $this->definitions[$type];
-    // Check whether this type is an extension of another one and compile it.
-    if (isset($definition['type'])) {
-      $merge = $this->getDefinition($definition['type']);
-      $definition = NestedArray::mergeDeep($merge, $definition);
-      // Unset type so we try the merge only once per type.
-      unset($definition['type']);
-      $this->definitions[$type] = $definition;
-    }
-    return $definition;
-  }
-
-  /**
-   * Implements Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinitions().
-   */
-  public function getDefinitions() {
-    return $this->definitions;
-  }
-
-  /**
-   * Load schema for module / theme.
-   */
-  protected function loadSchema($component) {
-    if ($schema = $this->storage->read($component . '.schema')) {
-      foreach ($schema as $type => $definition) {
-        $this->definitions[$type] = $definition;
-
-      }
-    }
-  }
-
-  /**
-   * Gets fallback metadata name.
-   *
-   * @param string $name
-   *   Configuration name or key.
-   *
-   * @return string
-   *   Same name with the last part replaced by the filesystem marker.
-   */
-  protected static function getFallbackName($name) {
-    $replaced = preg_replace('/\.[^.]+$/', '.' . '*', $name);
-    if ($replaced != $name) {
-      return $replaced;
-    }
-  }
-}
diff --git a/core/lib/Drupal/Core/Config/Schema/Sequence.php b/core/lib/Drupal/Core/Config/Schema/Sequence.php
deleted file mode 100644
index 0301b0c..0000000
--- a/core/lib/Drupal/Core/Config/Schema/Sequence.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\Schema\Sequence.
- */
-
-namespace Drupal\Core\Config\Schema;
-
-use Drupal\Core\TypedData\ListInterface;
-
-/**
- * Defines a configuration element of type Sequence.
- */
-class Sequence extends ArrayElement implements ListInterface {
-
-  /**
-   * Overrides ArrayElement::parse()
-   */
-  protected function parse() {
-    $definition = $definition = $this->getItemDefinition();
-    $elements = array();
-    foreach ($this->value as $key => $value) {
-      $elements[$key] = $this->parseElement($key, $value, $definition);
-    }
-    return $elements;
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ListInterface::isEmpty().
-   */
-  public function isEmpty() {
-    return empty($this->value);
-  }
-
-  /**
-   * Implements Drupal\Core\TypedData\ListInterface::getItemDefinition().
-   */
-  public function getItemDefinition() {
-    return $this->definition['sequence'][0];
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Config/TypedConfigElementFactory.php b/core/lib/Drupal/Core/Config/TypedConfigElementFactory.php
deleted file mode 100644
index 7ff5129..0000000
--- a/core/lib/Drupal/Core/Config/TypedConfigElementFactory.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\TypedConfigElementFactory.
- */
-
-namespace Drupal\Core\Config;
-
-use Drupal\Core\TypedData\TypedDataFactory;
-
-/**
- * A factory for typed config element objects.
- *
- * This factory merges the type definition into the element definition prior to
- * creating the instance.
- */
-class TypedConfigElementFactory extends TypedDataFactory {
-
-  /**
-   * Overrides Drupal\Core\TypedData\TypedDataFactory::createInstance().
-   */
-  public function createInstance($plugin_id, array $configuration, $name = NULL, $parent = NULL) {
-    $type_definition = $this->discovery->getDefinition($plugin_id);
-    $configuration += $type_definition;
-    return parent::createInstance($plugin_id, $configuration, $name, $parent);
-  }
-}
diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php
deleted file mode 100644
index c06ec51..0000000
--- a/core/lib/Drupal/Core/Config/TypedConfigManager.php
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Config\TypedConfigManager.
- */
-
-namespace Drupal\Core\Config;
-
-use Drupal\Core\Config\Schema\SchemaDiscovery;
-use Drupal\Core\TypedData\TypedDataManager;
-
-/**
- * Manages config type plugins.
- */
-class TypedConfigManager extends TypedDataManager {
-
-  /**
-   * A storage controller instance for reading configuration data.
-   *
-   * @var Drupal\Core\Config\StorageInterface
-   */
-  protected $storage;
-
-  /**
-   * Creates a new typed configuration manager.
-   *
-   * @param Drupal\Core\Config\StorageInterface $storage
-   *   The storage controller object to use for reading schema data
-   */
-  public function __construct($storage) {
-    $this->storage = $storage;
-    $this->discovery = new SchemaDiscovery($storage);
-    $this->factory = new TypedConfigElementFactory($this->discovery);
-  }
-
-  /**
-   * Gets typed configuration data.
-   *
-   * @param string $name
-   *   Configuration object name.
-   *
-   * @return Drupal\Core\Config\Schema\Element
-   *   Typed configuration element.
-   */
-  public function get($name) {
-    $data = $this->storage->read($name);
-    $definition = $this->getDefinition($name);
-    return $this->create($definition, $data);
-  }
-
-  /**
-   * Overrides Drupal\Core\TypedData\TypedDataManager::create()
-   *
-   * Fills in default type and does variable replacement.
-   */
-  public function create(array $definition, $value = NULL, $name = NULL, $parent = NULL) {
-    if (!isset($definition['type'])) {
-      // Set default type 'str' if possible. If not it will be 'any'.
-      if (is_string($value)) {
-        $definition['type'] = 'str';
-      }
-      else {
-        $definition['type'] = 'any';
-      }
-    }
-    elseif (strpos($definition['type'], ']')) {
-      // Replace variable names in definition.
-      $replace = is_array($value) ? $value : array();
-      if (isset($parent)) {
-        $replace['%parent'] = $parent->getValue();
-      }
-      if (isset($name)) {
-        $replace['%key'] = $name;
-      }
-      $definition['type'] = $this->replaceName($definition['type'], $replace);
-    }
-    // Create typed config object.
-    return parent::create($definition, $value, $name, $parent);
-  }
-
-  /**
-   * Replaces variables in configuration name.
-   *
-   * The configuration name may contain one or more variables to be replaced,
-   * enclosed in square brackets like '[name]' and will follow the replacement
-   * rules defined by the replaceVariable() method.
-   *
-   * @param string $name
-   *   Configuration name with variables in square brackets.
-   * @param mixed $data
-   *   Configuration data for the element.
-   * @return string
-   *   Configuration name with variables replaced.
-   */
-  protected static function replaceName($name, $data) {
-    if (preg_match_all("/\[(.*)\]/U", $name, $matches)) {
-      // Build our list of '[value]' => replacement.
-      foreach (array_combine($matches[0], $matches[1]) as $key => $value) {
-        $replace[$key] = self::replaceVariable($value, $data);
-      }
-      return strtr($name, $replace);
-    }
-    else {
-      return $name;
-    }
-  }
-
-  /**
-   * Replaces variable values in included names with configuration data.
-   *
-   * Variable values are nested configuration keys that will be replaced by
-   * their value or some of these special strings:
-   * - '%key', will be replaced by the element's key.
-   * - '%parent', to reference the parent element.
-   *
-   * There may be nested configuration keys separated by dots or more complex
-   * patterns like '%parent.name' which references the 'name' value of the
-   * parent element.
-   *
-   * Example patterns:
-   * - 'name.subkey', indicates a nested value of the current element.
-   * - '%parent.name', will be replaced by the 'name' value of the parent.
-   * - '%parent.%key', will be replaced by the parent element's key.
-   *
-   * @param string $value
-   *   Variable value to be replaced.
-   *
-   * @return string
-   *   The replaced value if a replacement found or the original value if not.
-   */
-  protected static function replaceVariable($value, $data) {
-    $parts = explode('.', $value);
-    // Process each value part, one at a time.
-    while ($name = array_shift($parts)) {
-      if (!is_array($data) || !isset($data[$name])) {
-        // Key not found, return original value
-        return $value;
-      }
-      elseif (!$parts) {
-        // If no more parts left, this is the final property.
-        return (string)$data[$name];
-      }
-      else {
-        // Get nested value and continue processing.
-        $data = $data[$name];
-      }
-    }
-  }
-
-}
diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php
index 4684695..a15279e 100644
--- a/core/lib/Drupal/Core/CoreBundle.php
+++ b/core/lib/Drupal/Core/CoreBundle.php
@@ -60,10 +60,6 @@ public function build(ContainerBuilder $container) {
       ->register('config.storage.staging', 'Drupal\Core\Config\FileStorage')
       ->addArgument(config_get_config_directory(CONFIG_STAGING_DIRECTORY));
 
-    // Register the typed configuration data manager.
-    $container->register('config.typed', 'Drupal\Core\Config\TypedConfigManager')
-      ->addArgument(new Reference('config.storage'));
-
     // Register the service for the default database connection.
     $container->register('database', 'Drupal\Core\Database\Connection')
       ->setFactoryClass('Drupal\Core\Database\Database')
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 42e4d77..739ccbc 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -120,11 +120,6 @@
  *   entity.
  * - menu_path_wildcard: (optional) A string identifying the menu loader in the
  *   router path.
- * - permission_granularity: (optional) Specifies whether a module exposing
- *   permissions for the current entity type should use entity-type level
- *   granularity, bundle level granularity or just skip this entity. The allowed
- *   values are respectively "entity_type", "bundle" or FALSE. Defaults to
- *   "entity_type".
  *
  * The defaults for the plugin definition are provided in
  * \Drupal\Core\Entity\EntityManager::defaults.
@@ -164,7 +159,6 @@ class EntityManager extends PluginManagerBase {
     'access_controller_class' => 'Drupal\Core\Entity\EntityAccessController',
     'static_cache' => TRUE,
     'translation' => array(),
-    'permission_granularity' => 'entity_type',
   );
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/Query/ConditionAggregateBase.php b/core/lib/Drupal/Core/Entity/Query/ConditionAggregateBase.php
new file mode 100644
index 0000000..831f234
--- /dev/null
+++ b/core/lib/Drupal/Core/Entity/Query/ConditionAggregateBase.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * @file
+ * Contains \Drupal\Core\Entity\Query\ConditionAggregateBase.
+ */
+namespace Drupal\Core\Entity\Query;
+
+
+abstract class ConditionAggregateBase extends ConditionFundamentals implements ConditionAggregateInterface {
+  /**
+   * Implements \Drupal\Core\Entity\Query\ConditionAggregateInterface::condition().
+   */
+  public function condition($field, $function = NULL, $value = NULL, $operator = NULL, $langcode = NULL) {
+    $this->conditions[] = array(
+      'field' => $field,
+      'function' => $function,
+      'value' => $value,
+      'operator' => $operator,
+      'langcode' => $langcode,
+    );
+
+    return $this;
+  }
+}
\ No newline at end of file
diff --git a/core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php b/core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php
new file mode 100644
index 0000000..8390feb
--- /dev/null
+++ b/core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Created by JetBrains PhpStorm.
+ * User: chx
+ * Date: 1/28/13
+ * Time: 1:50 AM
+ * To change this template use File | Settings | File Templates.
+ */
+
+namespace Drupal\Core\Entity\Query;
+
+
+interface ConditionAggregateInterface {
+
+  /**
+   * Gets the current conjunction.
+   *
+   * @return string
+   *   Can be AND or OR.
+   */
+  public function getConjunction();
+
+  /**
+   * Implements \Countable::count().
+   *
+   * Returns the size of this conditional. The size of the conditional is the
+   * size of its conditional array minus one, because one element is the the
+   * conjunction.
+   */
+  public function count();
+
+  /**
+   * Adds a condition.
+   *
+   * @param string|ConditionAggregateInterface $field
+   * @param string function
+   * @param mixed $value
+   * @param string $operator
+   * @param string $langcode
+   * @return ConditionAggregateInterface
+   * @see \Drupal\Core\Entity\Query\QueryInterface::condition()
+   */
+  public function condition($field, $function = NULL, $value = NULL, $operator = NULL, $langcode = NULL);
+
+  /**
+   * Queries for the existence of a field.
+   *
+   * @param $field
+   * @param string $langcode
+   * @return ConditionInterface
+   * @see \Drupal\Core\Entity\Query\QueryInterface::exists()
+   */
+  public function exists($field, $function, $langcode = NULL);
+
+  /**
+   * Queries for the nonexistence of a field.
+   *
+   * @param string $field
+   * @return ConditionInterface;
+   * @see \Drupal\Core\Entity\Query\QueryInterface::notexists()
+   */
+  public function notExists($field, $function, $langcode = NULL);
+
+  /**
+   * Gets a complete list of all conditions in this conditional clause.
+   *
+   * This method returns by reference. That allows alter hooks to access the
+   * data structure directly and manipulate it before it gets compiled.
+   *
+   * @return array
+   */
+  public function &conditions();
+
+  /**
+   * Compiles this conditional clause.
+   *
+   * @param $query
+   *   The query object this conditional clause belongs to.
+   */
+  public function compile($query);
+
+}
\ No newline at end of file
diff --git a/core/lib/Drupal/Core/Entity/Query/ConditionBase.php b/core/lib/Drupal/Core/Entity/Query/ConditionBase.php
index 2c428a4..4ef756b 100644
--- a/core/lib/Drupal/Core/Entity/Query/ConditionBase.php
+++ b/core/lib/Drupal/Core/Entity/Query/ConditionBase.php
@@ -7,41 +7,8 @@
 
 namespace Drupal\Core\Entity\Query;
 
-/**
- * Common code for all implementations of the entity query condition interface.
- */
-abstract class ConditionBase implements ConditionInterface {
 
-  /**
-   * Array of conditions.
-   *
-   * @var array
-   */
-  protected $conditions = array();
-
-  /**
-   * Constructs a Condition object.
-   *
-   * @param string $conjunction
-   *   The operator to use to combine conditions: 'AND' or 'OR'.
-   */
-  public function __construct($conjunction = 'AND') {
-    $this->conjunction = $conjunction;
-  }
-
-  /**
-   * Implements \Drupal\Core\Entity\Query\ConditionInterface::getConjunction().
-   */
-  public function getConjunction() {
-    return $this->conjunction;
-  }
-
-  /**
-   * Implements \Countable::count().
-   */
-  public function count() {
-    return count($this->conditions) - 1;
-  }
+abstract class ConditionBase extends ConditionFundamentals implements ConditionInterface {
 
   /**
    * Implements \Drupal\Core\Entity\Query\ConditionInterface::compile().
@@ -56,23 +23,4 @@ public function condition($field, $value = NULL, $operator = NULL, $langcode = N
 
     return $this;
   }
-
-  /**
-   * Implements \Drupal\Core\Entity\Query\ConditionInterface::conditions().
-   */
-  public function &conditions() {
-    return $this->conditions;
-  }
-
-  /**
-   * Makes sure condition groups are cloned as well.
-   */
-  function __clone() {
-    foreach ($this->conditions as $key => $condition) {
-      if ($condition['field'] instanceOf ConditionInterface) {
-        $this->conditions[$key]['field'] = clone($condition['field']);
-      }
-    }
-  }
-
-}
+}
\ No newline at end of file
diff --git a/core/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php b/core/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php
new file mode 100644
index 0000000..0b04143
--- /dev/null
+++ b/core/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Entity\Query\ConditionFundamentals.
+ */
+
+namespace Drupal\Core\Entity\Query;
+
+/**
+ * Common code for all implementations of the entity query condition interfaces.
+ */
+abstract class ConditionFundamentals {
+
+  /**
+   * Array of conditions.
+   *
+   * @var array
+   */
+  protected $conditions = array();
+
+  /**
+   * Constructs a Condition object.
+   *
+   * @param string $conjunction
+   *   The operator to use to combine conditions: 'AND' or 'OR'.
+   */
+  public function __construct($conjunction = 'AND') {
+    $this->conjunction = $conjunction;
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\ConditionInterface::getConjunction().
+   */
+  public function getConjunction() {
+    return $this->conjunction;
+  }
+
+  /**
+   * Implements \Countable::count().
+   */
+  public function count() {
+    return count($this->conditions) - 1;
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\ConditionInterface::conditions().
+   */
+  public function &conditions() {
+    return $this->conditions;
+  }
+
+  /**
+   * Makes sure condition groups are cloned as well.
+   */
+  function __clone() {
+    foreach ($this->conditions as $key => $condition) {
+      if ($condition['field'] instanceOf ConditionInterface) {
+        $this->conditions[$key]['field'] = clone($condition['field']);
+      }
+    }
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php b/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php
index d55cced..ab5bf82 100644
--- a/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php
+++ b/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php
@@ -32,7 +32,7 @@ public function count();
   /**
    * Adds a condition.
    *
-   * @param string $field
+   * @param string|ConditionInterface $field
    * @param mixed $value
    * @param string $operator
    * @param string $langcode
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php b/core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php
new file mode 100644
index 0000000..b9549f2
--- /dev/null
+++ b/core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php
@@ -0,0 +1,118 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Entity\Query\QueryAggregateInterface.
+ */
+
+namespace Drupal\Core\Entity\Query;
+
+
+interface QueryAggregateInterface extends QueryInterface {
+
+  /**
+   * Specify a field and a function to aggregate on. Available functions:
+   * SUM,AVG,MIN,MAX.COUNT.
+   *
+   * @todo What about GROUP_CONCAT support?
+   *
+   * @param $field
+   * @param $function
+   * @param null $alias
+   *
+   * @return \Drupal\Core\Entity\Query\QueryAggregateInterface
+   */
+  public function aggregate($field, $function, $langcode = NULL, &$alias = NULL);
+
+  /**
+   * Specify the field to group on.
+   *
+   * @param $field
+   *
+   * @return \Drupal\Core\Entity\Query\QueryAggregateInterface
+   */
+  public function groupBy($field);
+
+  /**
+   * @param $field
+   * @param null $function
+   * @param null $value
+   * @param null $operator
+   *
+   * @return \Drupal\Core\Entity\Query\QueryAggregateInterface
+   */
+  public function conditionAggregate($field, $function = NULL, $value = NULL, $operator = '=', $langcode = NULL);
+
+  /**
+   * Queries for the existence of a field.
+   *
+   * @param $field
+   *   Name of a field.
+   * @param $function
+   *   The aggregate function. This is only marked optional for interface
+   *   compatibility, it is illegal to leave it out.
+   * @param $langcode
+   *   Language code (optional).
+   * @return \Drupal\Core\Entity\Query\QueryInterface
+   */
+  public function exists($field, $function = NULL, $langcode = NULL);
+
+  /**
+   * Queries for the nonexistence of a field.
+   *
+   * @param $field.
+   *   Name of a field.
+   * @param $function
+   *   The aggregate function. This is only marked optional for interface
+   *   compatibility, it is illegal to leave it out.
+   * @param $langcode
+   *   Language code (optional).
+   * @return \Drupal\Core\Entity\Query\QueryInterface
+   */
+  public function notExists($field, $function = NULL, $langcode = NULL);
+
+  /**
+   * Creates an object holding a group of conditions.
+   *
+   * See andConditionAggregateGroup() and orConditionAggregateGroup() for more.
+   *
+   * @param $conjunction
+   *   - AND (default): this is the equivalent of andConditionAggregateGroup().
+   *   - OR: this is the equivalent of andConditionAggregateGroup().
+   *
+   * return ConditionInterface
+   *   An object holding a group of conditions.
+   */
+  public function conditionAggregateGroupFactory($conjunction = 'AND');
+
+  /**
+   * @param $field
+   * @param $function
+   * @param $direction
+   *
+   * @return \Drupal\Core\Entity\Query\QueryAggregateInterface
+   */
+  public function sortAggregate($field, $function, $direction = 'ASC', $langcode = NULL);
+
+  /**
+   * Executes the aggregate query.
+   *
+   * @return array
+   *   A list of result row arrays. Each result row contains the aggregate
+   *   results as keys and also the groupBy columns as keys:
+   * @code
+   * $result = $query
+   *   ->aggregate('nid', 'count')
+   *   ->condition('status', 1)
+   *   ->groupby('type')
+   *   ->executeAggregate();
+   * @endcode
+   * Will return:
+   * @code
+   * $result[0] = array('count_nid' => 3, 'type' => 'page');
+   * $result[1] = array('count_nid' => 1, 'type' => 'poll');
+   * $result[2] = array('count_nid' => 4, 'type' => 'story');
+   * @endcode
+   */
+  public function execute();
+}
diff --git a/core/lib/Drupal/Core/Entity/Query/QueryBase.php b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
index 77dc07d..5f13e42 100644
--- a/core/lib/Drupal/Core/Entity/Query/QueryBase.php
+++ b/core/lib/Drupal/Core/Entity/Query/QueryBase.php
@@ -12,7 +12,7 @@
 /**
  * The base entity query class.
  */
-abstract class QueryBase implements QueryInterface {
+abstract class QueryBase {
 
   /**
    * The entity type this query runs against.
@@ -22,7 +22,7 @@
   protected $entityType;
 
   /**
-   * The sort data.
+   * The list of sorts.
    *
    * @var array
    */
@@ -43,6 +43,34 @@
   protected $condition;
 
   /**
+   * The list of aggregate expressions.
+   *
+   * @var array
+   */
+  protected $aggregate = array();
+
+  /**
+   * The list of columns to group on.
+   *
+   * @var array
+   */
+  protected $groupBy = array();
+
+  /**
+   * Aggregate Conditions
+   *
+   * @var ConditionAggregateInterface
+   */
+  protected $conditionAggregate;
+
+  /**
+   * The list of sorts over the aggregate results.
+   *
+   * @var array
+   */
+  protected $sortAggregate = array();
+
+  /**
    * The query range.
    *
    * @var array
@@ -50,6 +78,20 @@
   protected $range = array();
 
   /**
+   * The query metadata for alter purposes.
+   *
+   * @var array
+   */
+  protected $alterMetaData;
+
+  /**
+   * The query tags.
+   *
+   * @var array
+   */
+  protected $alterTags;
+
+  /**
    * Whether access check is requested or not. Defaults to TRUE.
    *
    * @var bool
@@ -81,6 +123,9 @@ public function __construct($entity_type, $conjunction) {
     $this->entityType = $entity_type;
     $this->conjunction = $conjunction;
     $this->condition = $this->conditionGroupFactory($conjunction);
+    if (method_exists($this, 'conditionAggregateGroupFactory')) {
+      $this->conditionAggregate = $this->conditionAggregateGroupFactory($conjunction);
+    }
   }
 
   /**
@@ -142,8 +187,9 @@ public function orConditionGroup() {
   /**
    * Implements \Drupal\Core\Entity\Query\QueryInterface::sort().
    */
-  public function sort($property, $direction = 'ASC', $langcode = NULL) {
-    $this->sort[$property] = array(
+  public function sort($field, $direction = 'ASC', $langcode = NULL) {
+    $this->sort[] = array(
+      'field' => $field,
       'direction' => $direction,
       'langcode' => $langcode,
     );
@@ -283,4 +329,72 @@ public function addMetaData($key, $object) {
   public function getMetaData($key) {
     return isset($this->alterMetaData[$key]) ? $this->alterMetaData[$key] : NULL;
   }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::aggregate()
+   */
+  public function aggregate($field, $function, $langcode = NULL, &$alias = NULL) {
+    if (!isset($alias)) {
+      $alias = $this->getAlias($field, $function);
+    }
+
+    $this->aggregate[$alias] = array(
+      'field' => $field,
+      'function' => $function,
+      'alias' => $alias,
+      'langcode' => $langcode,
+    );
+
+    return $this;
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::conditionAggregate()
+   */
+  public function conditionAggregate($field, $function = NULL, $value = NULL, $operator = '=', $langcode = NULL) {
+    $this->aggregate($field, $function, $langcode);
+    return $this->conditionAggregate->condition($field, $function, $value, $operator, $langcode);
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::sortAggregate()
+   */
+  public function sortAggregate($field, $function, $direction = 'ASC', $langcode = NULL) {
+    $alias = $this->getAlias($field, $function);
+
+    $this->sortAggregate[$alias] = array(
+      'field' => $field,
+      'function' => $function,
+      'direction' => $direction,
+      'langcode' => $langcode,
+    );
+    $this->aggregate($field, $function, $langcode, $alias);
+
+    return $this;
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::execute()
+   */
+  public function groupBy($field, $langcode = NULL) {
+    $this->groupBy[] = array(
+      'field' => $field,
+      'langcode' => $langcode,
+    );
+
+    return $this;
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::conditioNGroupFactory()
+   */
+  abstract function conditionGroupFactory($conjunction = 'AND');
+
+  /**
+   * Helper generating an alias.
+   */
+  function getAlias($field, $function) {
+    return $function . '.__eqa__'. $field;
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php b/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php
index 642352d..06a5415 100644
--- a/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php
+++ b/core/lib/Drupal/Core/Serialization/ComplexDataNormalizer.php
@@ -32,7 +32,7 @@ class ComplexDataNormalizer extends NormalizerBase {
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize().
    */
-  public function normalize($object, $format = NULL, array $context = array()) {
+  public function normalize($object, $format = NULL) {
     $attributes = array();
     foreach ($object as $name => $field) {
       $attributes[$name] = $this->serializer->normalize($field, $format);
diff --git a/core/lib/Drupal/Core/Serialization/ListNormalizer.php b/core/lib/Drupal/Core/Serialization/ListNormalizer.php
index d590b7b..ee20fb6 100644
--- a/core/lib/Drupal/Core/Serialization/ListNormalizer.php
+++ b/core/lib/Drupal/Core/Serialization/ListNormalizer.php
@@ -31,7 +31,7 @@ class ListNormalizer extends NormalizerBase {
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize().
    */
-  public function normalize($object, $format = NULL, array $context = array()) {
+  public function normalize($object, $format = NULL) {
     $attributes = array();
     foreach ($object as $fieldItem) {
       $attributes[] = $this->serializer->normalize($fieldItem, $format);
diff --git a/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php b/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php
index cf2a879..0376771 100644
--- a/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php
+++ b/core/lib/Drupal/Core/Serialization/TypedDataNormalizer.php
@@ -25,7 +25,7 @@ class TypedDataNormalizer extends NormalizerBase {
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize().
    */
-  public function normalize($object, $format = NULL, array $context = array()) {
+  public function normalize($object, $format = NULL) {
     return $object->getValue();
   }
 
diff --git a/core/lib/Drupal/Core/Serialization/XmlEncoder.php b/core/lib/Drupal/Core/Serialization/XmlEncoder.php
index d79a6d9..7235af3 100644
--- a/core/lib/Drupal/Core/Serialization/XmlEncoder.php
+++ b/core/lib/Drupal/Core/Serialization/XmlEncoder.php
@@ -44,9 +44,9 @@ public function __construct() {
   /**
    * Implements \Symfony\Component\Serializer\Encoder\EncoderInterface::encode().
    */
-  public function encode($data, $format, array $context = array()){
-    $normalized = $this->serializer->normalize($data, $format, $context);
-    return $this->baseEncoder->encode($normalized, $format, $context);
+  public function encode($data, $format){
+    $normalized = $this->serializer->normalize($data, $format);
+    return $this->baseEncoder->encode($normalized, $format);
   }
 
   /**
@@ -59,8 +59,8 @@ public function supportsEncoding($format) {
   /**
    * Implements \Symfony\Component\Serializer\Encoder\EncoderInterface::decode().
    */
-  public function decode($data, $format, array $context = array()){
-    return $this->baseEncoder->decode($data, $format, $context);
+  public function decode($data, $format){
+    return $this->baseEncoder->decode($data, $format);
   }
 
   /**
diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js
index f578d4a..230f588 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -1244,7 +1244,7 @@ $.extend(Drupal.theme, {
     return '<div class="indentation">&nbsp;</div>';
   },
   tableDragChangedWarning: function () {
-    return '<div class="tabledrag-changed-warning messages warning" role="alert">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t('Changes made in this table will not be saved until the form is submitted.') + '</div>';
+    return '<div class="tabledrag-changed-warning messages warning">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t('Changes made in this table will not be saved until the form is submitted.') + '</div>';
   }
 });
 
diff --git a/core/modules/block/block.api.php b/core/modules/block/block.api.php
index c9b3b1f..c889e68 100644
--- a/core/modules/block/block.api.php
+++ b/core/modules/block/block.api.php
@@ -99,29 +99,5 @@ function hook_block_view_NAME_alter(array &$build, \Drupal\block\BlockInterface
 }
 
 /**
- * Define access for a specific block instance.
- *
- * This hook is invoked by the access methods of the block plugin system and
- * should be used to alter the block access rules defined by a module from
- * another module.
- *
- * @param \Drupal\block\Plugin\Core\Entity\Block $block
- *   The block instance.
- *
- * @return bool
- *   TRUE will allow access whereas FALSE will deny access to the block.
- *
- * @see \Drupal\block\BlockBase::access()
- * @see \Drupal\block\BlockBase::blockAccess()
- */
-function hook_block_access(\Drupal\block\Plugin\Core\Entity\Block $block) {
-  // Example code that would prevent displaying the 'Powered by Drupal' block in
-  // a region different than the footer.
-  if ($block->get('plugin') == 'system_powered_by_block' && $block->get('region') != 'footer') {
-    return FALSE;
-  }
-}
-
-/**
  * @} End of "addtogroup hooks".
  */
diff --git a/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php b/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php
index 6a5bb66..890dde9 100644
--- a/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php
+++ b/core/modules/block/lib/Drupal/block/Plugin/system/plugin_ui/BlockPluginUI.php
@@ -93,14 +93,12 @@ public function form($form, &$form_state, $facet = NULL) {
           '#links' => $values,
         );
       }
+      $form['left']['plugin_library'] = array(
+        '#theme' => 'table',
+        '#header' => $this->tableHeader(),
+        '#rows' => $rows,
+      );
     }
-    // Sort rows alphabetically.
-    sort($rows);
-    $form['left']['plugin_library'] = array(
-      '#theme' => 'table',
-      '#header' => $this->tableHeader(),
-      '#rows' => $rows,
-    );
     return $form;
   }
 
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index a46506e..248759f 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -166,11 +166,10 @@ function book_menu() {
     'type' => MENU_SUGGESTED_ITEM,
     'file' => 'book.pages.inc',
   );
-  $items['book/export/%/%node'] = array(
+  $items['book/export/%/%'] = array(
     'page callback' => 'book_export',
     'page arguments' => array(2, 3),
-    'access callback' => 'book_export_access',
-    'access arguments' => array(3),
+    'access arguments' => array('access printer-friendly version'),
     'type' => MENU_CALLBACK,
     'file' => 'book.pages.inc',
   );
@@ -197,16 +196,6 @@ function book_menu() {
 }
 
 /**
- * Access callback: Determines if the book export page is accessible.
- *
- * @param \Drupal\node\Plugin\Core\Entity\Node $node
- *   The node whose export page is to be viewed.
- */
-function book_export_access(Node $node) {
-  return user_access('access printer-friendly version') && node_access('view', $node);
-}
-
-/**
  * Access callback: Determines if the outline tab is accessible.
  *
  * Path:
diff --git a/core/modules/book/book.pages.inc b/core/modules/book/book.pages.inc
index c03872f..f8ec0dc 100644
--- a/core/modules/book/book.pages.inc
+++ b/core/modules/book/book.pages.inc
@@ -39,8 +39,8 @@ function book_render() {
  *   currently supported in book module:
  *   - html: Printer-friendly HTML.
  *   Other types may be supported in contributed modules.
- * @param \Drupal\node\Plugin\Core\Entity\Node $node
- *   The node to export.
+ * @param $nid
+ *   An integer representing the node id (nid) of the node to export
  *
  * @return
  *   A string representing the node and its children in the book hierarchy in a
@@ -50,13 +50,13 @@ function book_render() {
  *
  * @see book_menu()
  */
-function book_export($type, Node $node) {
+function book_export($type, $nid) {
   $type = drupal_strtolower($type);
 
   $export_function = 'book_export_' . $type;
 
   if (function_exists($export_function)) {
-    print call_user_func($export_function, $node);
+    print call_user_func($export_function, $nid);
   }
   else {
     drupal_set_message(t('Unknown export format.'));
@@ -74,8 +74,8 @@ function book_export($type, Node $node) {
  * look like level 3 sections, no matter their depth relative to the node
  * selected to be exported as printer-friendly HTML.
  *
- * @param \Drupal\node\Plugin\Core\Entity\Node
- *   The node to export.
+ * @param $nid
+ *   An integer representing the node id (nid) of the node to export.
  *
  * @return
  *   A string containing HTML representing the node and its children in
@@ -84,8 +84,9 @@ function book_export($type, Node $node) {
  * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
  * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  */
-function book_export_html(Node $node) {
+function book_export_html($nid) {
   if (user_access('access printer-friendly version')) {
+    $node = node_load($nid);
     if (isset($node->book)) {
       $tree = book_menu_subtree_data($node->book);
       $contents = book_export_traverse($tree, 'book_node_export');
diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
index 2bc08b8..0a1ffcf 100644
--- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php
+++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php
@@ -301,13 +301,6 @@ function testBookExport() {
     // Try getting the URL directly, and verify it fails.
     $this->drupalGet('book/export/html/' . $this->book->nid);
     $this->assertResponse('403', 'Anonymous user properly forbidden.');
-
-    // Now grant anonymous users permission to view the printer-friendly
-    // version and verify that node access restrictions still prevent them from
-    // seeing it.
-    user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access printer-friendly version'));
-    $this->drupalGet('book/export/html/' . $this->book->nid);
-    $this->assertResponse('403', 'Anonymous user properly forbidden from seeing the printer-friendly version when denied by node access.');
   }
 
   /**
diff --git a/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php b/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php
index 644694f..0cfa52b 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentTranslationController.php
@@ -9,29 +9,12 @@
 namespace Drupal\comment;
 
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\translation_entity\EntityTranslationControllerNG;
+use Drupal\translation_entity\EntityTranslationController;
 
 /**
  * Defines the translation controller class for comments.
  */
-class CommentTranslationController extends EntityTranslationControllerNG {
-
-  /**
-   * Overrides EntityTranslationController::getAccess().
-   */
-  public function getAccess(EntityInterface $entity, $op) {
-    switch ($op) {
-      case 'view':
-        return user_access('access comments');
-      case 'update':
-        return comment_access('edit', $entity);
-      case 'delete':
-        return user_access('administer comments');
-      case 'create':
-        return user_access('post comments');
-    }
-    return parent::getAccess($entity, $op);
-  }
+class CommentTranslationController extends EntityTranslationController {
 
   /**
    * Overrides EntityTranslationController::entityFormTitle().
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php
index 259a8f2..9493488 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php
@@ -25,7 +25,7 @@
  *   form_controller_class = {
  *     "default" = "Drupal\comment\CommentFormController"
  *   },
- *   translation_controller_class = "Drupal\comment\CommentTranslationController",
+ *   translation_controller_class = "Drupal\translation_entity\EntityTranslationControllerNG",
  *   base_table = "comment",
  *   uri_callback = "comment_uri",
  *   fieldable = TRUE,
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
index 13817df..973c4b4 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php
@@ -70,7 +70,7 @@ function testCommentPreview() {
     $this->assertLink($test_signature);
 
     // Check that the user picture is displayed.
-    $this->assertFieldByXPath("//article[contains(@class, 'preview')]//div[contains(@class, 'user-picture')]//img", NULL, 'User picture displayed.');
+    $this->assertFieldByXPath("//div[contains(@class, 'preview')]//div[contains(@class, 'user-picture')]//img", NULL, 'User picture displayed.');
   }
 
   /**
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php
index 2b44138..60cb474 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php
@@ -34,6 +34,9 @@ public static function getInfo() {
     );
   }
 
+  /**
+   * Overrides \Drupal\simpletest\WebTestBase::setUp().
+   */
   function setUp() {
     $this->entityType = 'comment';
     $this->nodeBundle = 'article';
@@ -55,7 +58,7 @@ function setupBundle() {
    * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
    */
   function getTranslatorPermissions() {
-    return array_merge(parent::getTranslatorPermissions(), array('post comments', 'administer comments'));
+    return array('post comments', 'administer comments', "translate $this->entityType entities", 'edit original values');
   }
 
   /**
@@ -97,7 +100,7 @@ protected function getNewEntityValues($langcode) {
    */
   function testTranslateLinkCommentAdminPage() {
     $this->drupalCreateContentType(array('type' => 'page', 'name' => 'page'));
-    $this->admin_user = $this->drupalCreateUser(array_merge(parent::getTranslatorPermissions(), array('access administration pages', 'administer comments')));
+    $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer comments', 'translate any entity'));
     $this->drupalLogin($this->admin_user);
 
     $cid_translatable = $this->createEntity(array(), $this->langcodes[0], $this->nodeBundle);
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTest.php
deleted file mode 100644
index 93a7b55..0000000
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigSchemaTest.php
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\config\Tests\ConfigSchemaTest.
- */
-
-namespace Drupal\config\Tests;
-
-use Drupal\Core\Config\TypedConfig;
-use Drupal\simpletest\DrupalUnitTestBase;
-
-/**
- * Tests schema for configuration objects.
- */
-class ConfigSchemaTest extends DrupalUnitTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('system', 'locale', 'image');
-
-  public static function getInfo() {
-    return array(
-      'name' => 'Configuration schema',
-      'description' => 'Tests Metadata for configuration objects.',
-      'group' => 'Configuration',
-    );
-  }
-
-  public function setUp() {
-    parent::setUp();
-    config_install_default_config('module', 'system');
-    config_install_default_config('module', 'image');
-  }
-
-  /**
-   * Tests the basic metadata retrieval layer.
-   */
-  function testSchemaMapping() {
-    // Simple case, straight metadata.
-    $definition = config_typed()->getDefinition('system.maintenance');
-    $expected = array();
-    $expected['label'] = 'Maintenance mode';
-    $expected['class'] = '\Drupal\Core\Config\Schema\Mapping';
-    $expected['mapping']['enabled'] = array(
-      'label' => 'Put site into maintenance mode',
-      'type' => 'boolean'
-    );
-    $expected['mapping']['message'] = array(
-      'label' =>  'Message to display when in maintenance mode',
-      'type' => 'text',
-    );
-    $this->assertEqual($definition, $expected, 'Retrieved the right metadata for system.maintenance');
-
-    // More complex case, generic type. Metadata for image style.
-    $definition = config_typed()->getDefinition('image.style.large');
-    $expected = array();
-    $expected['label'] = 'Image style';
-    $expected['class'] = '\Drupal\Core\Config\Schema\Mapping';
-    $expected['mapping']['name']['type'] = 'string';
-    $expected['mapping']['label']['type'] = 'label';
-    $expected['mapping']['effects']['type'] = 'sequence';
-    $expected['mapping']['effects']['sequence'][0]['type'] = 'mapping';
-    $expected['mapping']['effects']['sequence'][0]['mapping']['name']['type'] = 'string';
-    $expected['mapping']['effects']['sequence'][0]['mapping']['data']['type'] = 'image.effect.[%parent.name]';
-    $expected['mapping']['effects']['sequence'][0]['mapping']['weight']['type'] = 'integer';
-    $expected['mapping']['effects']['sequence'][0]['mapping']['ieid']['type'] = 'string';
-
-    $this->assertEqual($definition, $expected, 'Retrieved the right metadata for image.style.large');
-
-    // More complex, type based on a complex one.
-    $definition = config_typed()->getDefinition('image.effect.image_scale');
-    // This should be the schema for image.effect.image_scale.
-    $expected = array();
-    $expected['label'] = 'Image scale';
-    $expected['class'] = '\Drupal\Core\Config\Schema\Mapping';
-    $expected['mapping']['width']['type'] = 'integer';
-    $expected['mapping']['width']['label'] = 'Width';
-    $expected['mapping']['height']['type'] = 'integer';
-    $expected['mapping']['height']['label'] = 'Height';
-    $expected['mapping']['upscale']['type'] = 'boolean';
-    $expected['mapping']['upscale']['label'] = 'Upscale';
-
-    $this->assertEqual($definition, $expected, 'Retrieved the right metadata for image.effect.image_scale');
-
-    // Most complex case, get metadata for actual configuration element.
-    $effects = config_typed()->get('image.style.medium')->get('effects');
-    $definition = $effects['bddf0d06-42f9-4c75-a700-a33cafa25ea0']['data']->getDefinition();
-    // This should be the schema for image.effect.image_scale, reuse previous one.
-    $expected['type'] =  'image.effect.image_scale';
-
-    $this->assertEqual($definition, $expected, 'Retrieved the right metadata for the first effect of image.style.medium');
-  }
-
-  /**
-   * Tests metadata applied to configuration objects.
-   */
-  function testSchemaData() {
-    // Try some simple properties.
-    $meta = config_typed()->get('system.site');
-    $property = $meta->get('name');
-    $this->assertTrue(is_a($property, 'Drupal\Core\TypedData\Type\String'), 'Got the right wrapper fo the site name property.');
-    $this->assertEqual($property->getType(), 'label', 'Got the right string type for site name data.');
-    $this->assertEqual($property->getValue(), 'Drupal', 'Got the right string value for site name data.');
-
-    $property = $meta->get('page')->get('front');
-    $this->assertTrue(is_a($property, 'Drupal\Core\TypedData\Type\String'), 'Got the right wrapper fo the page.front property.');
-    $this->assertEqual($property->getType(), 'path', 'Got the right type for page.front data (undefined).');
-    $this->assertEqual($property->getValue(), 'user', 'Got the right value for page.front data.');
-
-    // Check nested array of properties.
-    $list = $meta->get('page');
-    $this->assertEqual(count($list), 3, 'Got a list with the right number of properties for site page data');
-    $this->assertTrue(isset($list['front']) && isset($list['403']) && isset($list['404']), 'Got a list with the right properties for site page data.');
-    $this->assertEqual($list['front']->getValue(), 'user', 'Got the right value for page.front data from the list.');
-
-    // And test some ComplexDataInterface methods.
-    $properties = $list->getProperties();
-    $this->assertTrue(count($properties) == 3 && $properties['front'] == $list['front'], 'Got the right properties for site page.');
-    $values = $list->getPropertyValues();
-    $this->assertTrue(count($values) == 3 && $values['front'] == 'user', 'Got the right property values for site page.');
-
-    // Now let's try something more complex, with nested objects.
-    $wrapper = config_typed()->get('image.style.large');
-    $effects = $wrapper->get('effects');
-
-    // The function is_array() doesn't work with ArrayAccess, so we use count().
-    $this->assertTrue(count($effects) == 1, 'Got an array with effects for image.style.large data');
-    $ieid = key($effects->getValue());
-    $effect = $effects[$ieid];
-    $this->assertTrue(count($effect['data']) && $effect['name']->getValue() == 'image_scale', 'Got data for the image scale effect from metadata.');
-    $this->assertEqual($effect['data']['width']->getType(), 'integer', 'Got the right type for the scale effect width.');
-    $this->assertEqual($effect['data']['width']->getValue(), 480, 'Got the right value for the scale effect width.' );
-
-    // Finally update some object using a configuration wrapper.
-    $new_slogan = 'Site slogan for testing configuration metadata';
-    $wrapper = config_typed()->get('system.site');
-    $wrapper->set('slogan', $new_slogan);
-    $site_slogan = $wrapper->get('slogan');
-    $this->assertEqual($site_slogan->getValue(), $new_slogan, 'Successfully updated the contained configuration data');
-  }
-
-}
diff --git a/core/modules/contact/config/contact.schema.yml b/core/modules/contact/config/contact.schema.yml
deleted file mode 100644
index f0b70bd..0000000
--- a/core/modules/contact/config/contact.schema.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-# Configuration schema: contact.schema.yml
-
-# Schema for contact category (multiple)
-contact.category.*:
-  type: mapping
-  mapping:
-    "id":
-      type: string
-    "label":
-      type: string
-    "recipients":
-      type: sequence
-      sequence:
-        - type: email
-    "reply":
-      type: string
-    "weight":
-      type: integer
-
-# Module settings
-contact.settings:
-  type: mapping
-  mapping:
-    "default_category":
-      type: string
-      required: yes
-    "flood":
-      type: mapping
-      mapping:
-        "limit":
-          type: integer
-        "interval":
-          type: integer
-      "user_default_enabled":
-        type: boolean
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index 36bd18a..d1c6b00 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -1268,7 +1268,7 @@ function theme_field($variables) {
   $output .= '</div>';
 
   // Render the top-level DIV.
-  $output = '<div' . $variables['attributes'] . '>' . $output . '</div>';
+  $output = '<div ' . $variables['attributes'] . '>' . $output . '</div>';
 
   return $output;
 }
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
index c935c44..d5f5891 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
@@ -38,7 +38,7 @@ public function __construct() {
     $this->discovery = new AlterDecorator($this->discovery, 'field_formatter_info');
     $this->discovery = new CacheDecorator($this->discovery, 'field_formatter_types', 'field');
 
-    $this->factory = new FormatterFactory($this->discovery);
+    $this->factory = new FormatterFactory($this);
   }
 
   /**
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
index 2d2c6e2..5722807 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
@@ -39,7 +39,7 @@ public function __construct() {
     $this->discovery = new AlterDecorator($this->discovery, 'field_widget_info');
     $this->discovery = new CacheDecorator($this->discovery, 'field_widget_types',  'field');
 
-    $this->factory = new WidgetFactory($this->discovery);
+    $this->factory = new WidgetFactory($this);
   }
 
   /**
diff --git a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/ConditionAggregate.php b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/ConditionAggregate.php
new file mode 100644
index 0000000..0719249
--- /dev/null
+++ b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/ConditionAggregate.php
@@ -0,0 +1,87 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\field_sql_storage\Query\ConditionSql.
+ */
+
+namespace Drupal\field_sql_storage\Entity;
+
+use Drupal\Core\Database\Query\Condition;
+use Drupal\Core\Entity\Query\ConditionAggregateBase;
+use Drupal\Core\Entity\Query\ConditionAggregateInterface;
+
+
+class ConditionAggregate extends ConditionAggregateBase {
+
+  /**
+   * Conjuction.
+   *
+   * @var string
+   */
+  protected $conjuction = '';
+
+  /**
+   * Implements Drupal\Core\Entity\Query\ConditionInterface::compile().
+   */
+  public function compile($conditionContainer) {
+    // If this is not the top level condition group then the sql query is
+    // added to the $conditionContainer object by this function itself. The
+    // SQL query object is only necessary to pass to Query::addField() so it
+    // can join tables as necessary. On the other hand, conditions need to be
+    // added to the $conditionContainer object to keep grouping.
+    $sqlQuery = $conditionContainer instanceof SelectInterface ? $conditionContainer : $conditionContainer->sqlQuery;
+    $tables = new Tables($sqlQuery);
+    foreach ($this->conditions as $condition) {
+      if ($condition['field'] instanceOf ConditionAggregateInterface) {
+        $sqlCondition = new Condition($condition['field']->getConjunction());
+        // Add the SQL query to the object before calling this method again.
+        $sqlCondition->sqlQuery = $sqlQuery;
+        $condition['field']->compile($sqlCondition);
+        $sqlQuery->condition($sqlCondition);
+      }
+      else {
+        $type = strtoupper($this->conjunction) == 'OR' || $condition['operator'] == 'IS NULL' ? 'LEFT' : 'INNER';
+        $this->translateCondition($condition);
+        $field = $tables->addField($condition['field'], $type, $condition['langcode']);
+        $function = $condition['function'];
+        $conditionContainer->condition("$function($field)", $condition['value'], $condition['operator']);
+      }
+    }
+  }
+
+  /**
+   * Implements Drupal\Core\Entity\Query\ConditionInterface::exists().
+   */
+  public function exists($field, $function, $langcode = NULL) {
+    return $this->condition($field, $function, NULL, 'IS NOT NULL', $langcode);
+  }
+
+  /**
+   * Implements Drupal\Core\Entity\Query\ConditionInterface::notExists().
+   */
+  public function notExists($field, $function, $langcode = NULL) {
+    return $this->condition($field, $function, NULL, 'IS NULL', $langcode);
+  }
+
+  protected function translateCondition(&$condition) {
+    switch ($condition['operator']) {
+      case 'STARTS_WITH':
+        $condition['value'] .= '%';
+        $condition['operator'] = 'LIKE';
+        break;
+
+      case 'CONTAINS':
+        $condition['value'] = '%' . $condition['value'] . '%';
+        $condition['operator'] = 'LIKE';
+        break;
+
+      case 'ENDS_WITH':
+        $condition['value'] = '%' . $condition['value'];
+        $condition['operator'] = 'LIKE';
+        break;
+
+    }
+  }
+
+}
diff --git a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
index 41091a6..a4cfb99 100644
--- a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
+++ b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
@@ -9,11 +9,16 @@
 
 use Drupal\Core\Entity\Query\QueryBase;
 use Drupal\Core\Entity\Query\QueryException;
+use Drupal\Core\Entity\Query\QueryInterface;
 
 /**
  * The SQL storage entity query class.
  */
-class Query extends QueryBase {
+class Query extends QueryBase implements QueryInterface {
+  public $entityInfo;
+  public $sqlQuery;
+  public $sqlFields = array();
+  public $sqlGroupBy = array();
 
   /**
    * @var \Drupal\Core\Database\Connection
@@ -45,94 +50,116 @@ public function conditionGroupFactory($conjunction = 'AND') {
    * Implements Drupal\Core\Entity\Query\QueryInterface::execute().
    */
   public function execute() {
+    return $this
+      ->prepare()
+      ->compile()
+      ->addSort()
+      ->finish()
+      ->result();
+  }
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\Query
+   * @throws \Drupal\Core\Entity\Query\QueryException
+   */
+  protected function prepare() {
     $entity_type = $this->entityType;
     // @todo change to a method call once http://drupal.org/node/1892462 is in.
-    $entity_info = entity_get_info($entity_type);
-    if (!isset($entity_info['base_table'])) {
+    $this->entityInfo = entity_get_info($entity_type);
+    if (!isset($this->entityInfo['base_table'])) {
       throw new QueryException("No base table, invalid query.");
     }
-    $base_table = $entity_info['base_table'];
+    $base_table = $this->entityInfo['base_table'];
     $simple_query = TRUE;
-    if (isset($entity_info['data_table'])) {
+    if (isset($this->entityInfo['data_table'])) {
       $simple_query = FALSE;
     }
-    $sqlQuery = $this->connection->select($base_table, 'base_table', array('conjunction' => $this->conjunction));
-    $sqlQuery->addMetaData('entity_type', $entity_type);
-    $id_field = $entity_info['entity_keys']['id'];
-    $fields[$id_field] = TRUE;
-    if (empty($entity_info['entity_keys']['revision'])) {
-      // Add the key field for fetchAllKeyed(). When there is no revision
-      // support, this is the entity key.
-      $sqlQuery->addField('base_table', $entity_info['entity_keys']['id']);
+    $this->sqlQuery = $this->connection->select($base_table, 'base_table', array('conjunction' => $this->conjunction));
+    $this->sqlQuery->addMetaData('entity_type', $entity_type);
+    $id_field = $this->entityInfo['entity_keys']['id'];
+    // Add the key field for fetchAllKeyed().
+    if (empty($this->entityInfo['entity_keys']['revision'])) {
+      // When there is no revision support, the key field is the entity key.
+      $this->sqlFields["base_table.$id_field"] = array('base_table', $id_field);
     }
     else {
-      // Add the key field for fetchAllKeyed(). When there is revision
-      // support, this is the revision key.
-      $revision_field = $entity_info['entity_keys']['revision'];
-      $fields[$revision_field] = TRUE;
-      $sqlQuery->addField('base_table', $revision_field);
+      // When there is revision support, the key field is the revision key.
+      $revision_field = $this->entityInfo['entity_keys']['revision'];
+      $this->sqlFields["base_table.$revision_field"] = array('base_table', $revision_field);
     }
     // Now add the value column for fetchAllKeyed(). This is always the
     // entity id.
-    $sqlQuery->addField('base_table', $id_field);
+    $this->sqlFields["base_table.$id_field"] = array('base_table', $id_field);
     if ($this->accessCheck) {
-      $sqlQuery->addTag($entity_type . '_access');
+      $this->sqlQuery->addTag($entity_type . '_access');
     }
-    $sqlQuery->addTag('entity_query');
-    $sqlQuery->addTag('entity_query_' . $this->entityType);
+    $this->sqlQuery->addTag('entity_query');
+    $this->sqlQuery->addTag('entity_query_' . $this->entityType);
 
     // Add further tags added.
     if (isset($this->alterTags)) {
       foreach ($this->alterTags as $tag => $value) {
-        $sqlQuery->addTag($tag);
+        $this->sqlQuery->addTag($tag);
       }
     }
 
     // Add further metadata added.
     if (isset($this->alterMetaData)) {
       foreach ($this->alterMetaData as $key => $value) {
-        $sqlQuery->addMetaData($key, $value);
+        $this->sqlQuery->addMetaData($key, $value);
       }
     }
     // This now contains first the table containing entity properties and
     // last the entity base table. They might be the same.
-    $sqlQuery->addMetaData('age', $this->age);
-    $sqlQuery->addMetaData('simple_query', $simple_query);
-    $this->condition->compile($sqlQuery);
+    $this->sqlQuery->addMetaData('age', $this->age);
+    $this->sqlQuery->addMetaData('simple_query', $simple_query);
+    return $this;
+  }
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\Query
+   */
+  protected function compile() {
+    $this->condition->compile($this->sqlQuery);
+    return $this;
+  }
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\Query
+   */
+  protected function addSort() {
     if ($this->count) {
-      $this->sort = FALSE;
+      $this->sort = array();
     }
     // Gather the SQL field aliases first to make sure every field table
     // necessary is added. This might change whether the query is simple or
     // not. See below for more on simple queries.
     $sort = array();
     if ($this->sort) {
-      $tables = new Tables($sqlQuery);
-      foreach ($this->sort as $property => $data) {
-        $sort[$property] = isset($fields[$property]) ? $property : $tables->addField($property, 'LEFT', $data['langcode']);
+      foreach ($this->sort as $key => $data) {
+        $sort[$key] = $this->getSqlField($data['field'], $data['langcode']);
       }
     }
+    $simple_query = $this->isSimpleQuery();
     // If the query is set up for paging either via pager or by range or a
     // count is requested, then the correct amount of rows returned is
     // important. If the entity has a data table or multiple value fields are
     // involved then each revision might appear in several rows and this needs
     // a significantly more complex query.
-    $simple_query = (!$this->pager && !$this->range && !$this->count) || $sqlQuery->getMetaData('simple_query');
     if (!$simple_query) {
       // First, GROUP BY revision id (if it has been added) and entity id.
       // Now each group contains a single revision of an entity.
-      foreach (array_keys($fields) as $field) {
-        $sqlQuery->groupBy($field);
-      }
+      $this->sqlGroupBy = array_merge($this->sqlGroupBy, array_keys($this->sqlFields));
     }
     // Now we know whether this is a simple query or not, actually do the
     // sorting.
-    foreach ($sort as $property => $sql_alias) {
-      $direction = $this->sort[$property]['direction'];
-      if ($simple_query || isset($fields[$property])) {
+    foreach ($sort as $key => $sql_alias) {
+      $direction = $this->sort[$key]['direction'];
+      if ($simple_query || isset($this->sqlGroupBy[$sql_alias])) {
         // Simple queries, and the grouped columns of complicated queries
         // can be ordered normally, without the aggregation function.
-        $sqlQuery->orderBy($sql_alias, $direction);
+        $this->sqlQuery->orderBy($sql_alias, $direction);
+        $this->sqlFields[$sql_alias] = explode('.', $sql_alias);
       }
       else {
         // Order based on the smallest element of each group if the
@@ -140,21 +167,76 @@ public function execute() {
         // if the direction is descending.
         $function = $direction == 'ASC' ? 'min' : 'max';
         $expression = "$function($sql_alias)";
-        $sqlQuery->addExpression($expression, "order_by_{$property}_$direction");
-        $sqlQuery->orderBy($expression, $direction);
+        $this->sqlQuery->addExpression($expression);
+        $this->sqlQuery->orderBy($expression, $direction);
       }
     }
+    return $this;
+  }
+
+  /**
+   * Finish the query by adding fields, GROUP BY and range.
+   *
+   * @return \Drupal\field_sql_storage\Entity\Query
+   */
+  protected function finish() {
     $this->initializePager();
     if ($this->range) {
-      $sqlQuery->range($this->range['start'], $this->range['length']);
+      $this->sqlQuery->range($this->range['start'], $this->range['length']);
+    }
+   foreach ($this->sqlGroupBy as $field) {
+      $this->sqlQuery->groupBy($field);
+    }
+    foreach ($this->sqlFields as $field) {
+      $this->sqlQuery->addField($field[0], $field[1]);
     }
+    return $this;
+  }
+
+  /**
+   * Actually create the result.
+   *
+   * @return int|array
+   */
+  protected function result() {
     if ($this->count) {
-      return $sqlQuery->countQuery()->execute()->fetchField();
+      return $this->sqlQuery->countQuery()->execute()->fetchField();
     }
     // Return a keyed array of results. The key is either the revision_id or
     // the entity_id depending on whether the entity type supports revisions.
     // The value is always the entity id.
-    return $sqlQuery->execute()->fetchAllKeyed();
+    return $this->sqlQuery->execute()->fetchAllKeyed();
+  }
+
+  protected function getSqlField($property, $langcode) {
+    if (!isset($this->tables)) {
+      $this->tables = new Tables($this->sqlQuery);
+    }
+    $base_property = "base_table.$property";
+    if (isset($this->sqlFields[$base_property])) {
+      return $base_property;
+    }
+    else {
+      return $this->tables->addField($property, 'LEFT', $langcode);
+    }
+  }
+
+  /**
+   * Whether the query requires GROUP BY and ORDER BY MIN/MAX.
+   *
+   * @return bool
+   */
+  protected function isSimpleQuery() {
+    return (!$this->pager && !$this->range && !$this->count) || $this->sqlQuery->getMetaData('simple_query');
+  }
+
+  /**
+   * Zero out fields and GROUP BY when cloning.
+   */
+  public function __clone() {
+    parent::__clone();
+    $this->sqlFields = array();
+    $this->sqlGroupBy = array();
   }
 
 }
diff --git a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryAggregate.php b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryAggregate.php
new file mode 100644
index 0000000..4eed3aa
--- /dev/null
+++ b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryAggregate.php
@@ -0,0 +1,123 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\field_sql_storage\Entity\QueryAggregate.
+ */
+
+namespace Drupal\field_sql_storage\Entity;
+
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\Query\QueryAggregateInterface;
+
+/**
+ * The SQL storage entity query aggregate class.
+ */
+class QueryAggregate extends Query implements QueryAggregateInterface {
+  public $sqlExpressions;
+
+  /**
+   * Stores the entity manager used by the query.
+   *
+   * @var \Drupal\Core\Entity\EntityManager
+   */
+  protected $entityManager;
+
+  /**
+   * Constructs a QueryAggregate object.
+   */
+  public function __construct($entity_type, EntityManager $entity_manager, $conjunction, $connection) {
+    parent::__construct($entity_type, $conjunction, $connection);
+    $this->entityManager = $entity_manager;
+    $this->connection = $connection;
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::execute()
+   */
+  public function execute() {
+    return $this
+      ->prepare()
+      ->addAggregate()
+      ->compile()
+      ->compileAggregate()
+      ->addGroupBy()
+      ->addSort()
+      ->addSortAggregate()
+      ->finish()
+      ->result();
+  }
+
+  /**
+   * Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::conditionAggregateGroupFactory()
+   */
+  public function conditionAggregateGroupFactory($conjunction = 'AND') {
+    return new ConditionAggregate($conjunction);
+  }
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\Queryaggregate
+   */
+  protected function addAggregate() {
+    if ($this->aggregate) {
+      // Throw away the id fields.
+      $this->sqlFields = array();
+      foreach ($this->aggregate as $aggregate) {
+        $sql_field = $this->getSqlField($aggregate['field'], $aggregate['langcode']);
+        $this->sqlExpressions[$aggregate['alias']] = $aggregate['function'] . "($sql_field)";
+      }
+    }
+    return $this;
+  }
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\QueryAggregate
+   */
+  protected function compileAggregate() {
+    $this->conditionAggregate->compile($this->sqlQuery);
+    return $this;
+  }
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\QueryAggregate
+   */
+  protected function addGroupBy() {
+    foreach ($this->groupBy as $group_by) {
+      $sql_field = $this->getSqlField($group_by['field'], $group_by['langcode']);
+      $this->sqlGroupBy[] = $sql_field;
+      $this->sqlFields[] = $sql_field;
+    }
+  }
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\QueryAggregate
+   */
+  protected function addSortAggregate() {
+    if(!$this->count) {
+      foreach ($this->sortAggregate as $alias => $sort) {
+        $this->sqlQuery->orderBy($this->sqlExpressions[$alias], $sort['direction']);
+      }
+    }
+    return $this;
+  }
+
+
+  /**
+   * @return \Drupal\field_sql_storage\Entity\QueryAggregate
+   */
+  protected function finish() {
+    foreach ($this->sqlExpressions as $alias => $expression) {
+      $this->sqlQuery->addExpression($expression, $alias);
+    }
+    return parent::finish();
+  }
+
+  protected function result() {
+    if ($this->count) {
+      return parent::result();
+    }
+    // @todo: write the actual proper format
+    return $this->sqlQuery->execute()->fetchAll();
+  }
+
+}
diff --git a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryFactory.php b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryFactory.php
index d8b36ba..5ee132c 100644
--- a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryFactory.php
+++ b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryFactory.php
@@ -2,23 +2,63 @@
 
 /**
  * @file
- * Definition of Drupal\field_sql_storage\Entity\QueryFactory.
+ * Contains \Drupal\field_sql_storage\Entity\QueryFactory.
  */
 
 namespace Drupal\field_sql_storage\Entity;
 
 use Drupal\Core\Database\Connection;
+use Drupal\Core\Entity\EntityManager;
 
 /**
  * Factory class creating entity query objects for the SQL backend.
+ *
+ * @see \Drupal\field_sql_storage\Entity\Query
+ * @see \Drupal\field_sql_storage\Entity\QueryAggregate
  */
 class QueryFactory {
 
+  /**
+   * Constructs a QueryFactory object.
+   *
+   * @param \Drupal\Core\Database\Connection $connection
+   *   The database connection used by the entity query.
+   */
   function __construct(Connection $connection) {
     $this->connection = $connection;
   }
 
+  /**
+   * Constructs a entity query for a certain entity type.
+   *
+   * @param string $entity_type
+   *   The entity type.
+   * @param string $conjunction
+   *   - AND: all of the conditions on the query need to match.
+   *   - OR: at least one of the conditions on the query need to match.
+   *
+   * @return \Drupal\field_sql_storage\Entity\Query
+   *   The factored query.
+   */
   function get($entity_type, $conjunction = 'AND') {
     return new Query($entity_type, $conjunction, $this->connection);
   }
+
+  /**
+   * Constructs a entity aggregation query for a certain entity type.
+   *
+   * @param string $entity_type
+   *   The entity type.
+   * @param string $conjunction
+   *   - AND: all of the conditions on the query need to match.
+   *   - OR: at least one of the conditions on the query need to match.
+   *
+   * @return \Drupal\field_sql_storage\Entity\QueryAggregate
+   *   The factored aggregation query.
+   */
+  function getAggregate($entity_type, $conjunction = 'AND') {
+    // @todo Do the same as in the config query patch.
+    return new QueryAggregate($entity_type, drupal_container()->get('plugin.manager.entity'), $conjunction, $this->connection);
+  }
+
 }
diff --git a/core/modules/help/help.css b/core/modules/help/help.css
index 5d074c8..bc25296 100644
--- a/core/modules/help/help.css
+++ b/core/modules/help/help.css
@@ -7,14 +7,3 @@
 .help-items-last {
   margin-right: 0; /* LTR */
 }
-
-/**
- * Avoid text overlapping on a narrow viewport.
- */
-@media screen and (max-width: 480px) {
-  .help-items {
-    float: none;
-    width: 100%;
-    margin: 0;
-  }
-}
diff --git a/core/modules/image/config/image.schema.yml b/core/modules/image/config/image.schema.yml
deleted file mode 100644
index f4c8fd0..0000000
--- a/core/modules/image/config/image.schema.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# Image module schema: image.schema.yml
-
-# Data types for image module.
-image.size:
-  type: mapping
-  mapping:
-    "width":
-      type: integer
-      label: "Width"
-    "height":
-      type: integer
-      label: "Height"
-
-# Image styles (multiple).
-# Plugin \Drupal\image\Plugin\Core\Entity\ImageStyle
-image.style.*:
-  type: mapping
-  label: "Image style"
-  mapping:
-    "name":
-      type: string
-    "label":
-      type: label
-    "effects":
-      type: sequence
-      sequence:
-        - type: mapping
-          mapping:
-            "name":
-              type: string
-            "data":
-              type: image.effect.[%parent.name]
-            "weight":
-              type: integer
-            "ieid":
-              type: string
-
-# Image effects plugins: image.effect.%
-# These are used in image styles.
-image.effect.image_crop:
-  type: image.size
-  label: "Image crop"
-  mapping:
-    "anchor":
-      label: "Anchor"
-
-image.effect.image_resize:
-  type: image.size
-  label: "Image resize"
-
-image.effect.image_rotate:
-  type: mapping
-  label: "Image rotate"
-  mapping:
-    degrees:
-      type: integer
-      label: 'Rotation angle'
-    bgcolor:
-      label: 'Background color'
-    random:
-      type: boolean
-      label: 'Randomize'
-
-image.effect.image_scale:
-  type: image.size
-  label: "Image scale"
-  mapping:
-    "upscale":
-      type: boolean
-      label: "Upscale"
-
-image.effect.image_scale_and_crop:
-  type: image.size
-  label: "Image scale and crop"
-
-# Schema for configuration files of image module.
-image.settings:
-  type: mapping
-  mapping:
-    "preview_image":
-      type: string
-      label: "Preview image"
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 956eafd..f0e0dfd 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -301,8 +301,7 @@ function image_file_download($uri) {
     if ($info = image_get_info($uri)) {
       // Check the permissions of the original to grant access to this image.
       $headers = module_invoke_all('file_download', $original_uri);
-      // Confirm there's at least one module granting access and none denying access.
-      if (!empty($headers) && !in_array(-1, $headers)) {
+      if (!in_array(-1, $headers)) {
         return array(
           // Send headers describing the image's size, and MIME-type...
           'Content-Type' => $info['mime_type'],
diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php
index ebb71ba..1138f18 100644
--- a/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/lib/Drupal/image/Tests/ImageStylesPathAndUrlTest.php
@@ -136,12 +136,6 @@ function _testImageStyleUrlAndPath($scheme, $clean_url = TRUE) {
       $this->drupalGet($generate_url);
       $this->assertResponse(200, 'Image was generated at the URL.');
 
-      // Make sure that access is denied for existing style files if we do not
-      // have access.
-      state()->delete('image.test_file_download');
-      $this->drupalGet($generate_url);
-      $this->assertResponse(403, 'Confirmed that access is denied for the private image style.');
-
       // Repeat this with a different file that we do not have access to and
       // make sure that access is denied.
       $file_noaccess = array_shift($files);
diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php
index ab662b3..b286539 100644
--- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php
+++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityNormalizer.php
@@ -27,7 +27,7 @@ class JsonldEntityNormalizer extends JsonldNormalizerBase implements Denormalize
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
    */
-  public function normalize($entity, $format = NULL, array $context = array()) {
+  public function normalize($entity, $format = NULL) {
     $entity_wrapper = new JsonldEntityWrapper($entity, $format, $this->serializer, $this->siteSchemaManager);
 
     $attributes = $entity_wrapper->getProperties();
@@ -43,7 +43,7 @@ public function normalize($entity, $format = NULL, array $context = array()) {
    *
    * @throws \Symfony\Component\Serializer\Exception\UnexpectedValueException
    */
-  public function denormalize($data, $class, $format = null, array $context = array()) {
+  public function denormalize($data, $class, $format = null) {
     if (!isset($data['@type'])) {
       throw new UnexpectedValueException('JSON-LD @type parameter must be included.');
     }
diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php
index f57066d..66767cf 100644
--- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php
+++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldEntityReferenceNormalizer.php
@@ -30,7 +30,7 @@ class JsonldEntityReferenceNormalizer extends JsonldNormalizerBase implements De
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
    */
-  public function normalize($object, $format = NULL, array $context = array()) {
+  public function normalize($object, $format = NULL) {
     // @todo If an $options parameter is added to the serialize signature, as
     // requested in https://github.com/symfony/symfony/pull/4938, then instead
     // of creating the array of properties, we could simply call normalize and
@@ -45,7 +45,7 @@ public function normalize($object, $format = NULL, array $context = array()) {
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::denormalize()
    */
-  public function denormalize($data, $class, $format = null, array $context = array()) {
+  public function denormalize($data, $class, $format = null) {
     // @todo Support denormalization for Entity Reference.
     return array();
   }
diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php
index 7e3d124..bf421a1 100644
--- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php
+++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldFieldItemNormalizer.php
@@ -27,14 +27,14 @@ class JsonldFieldItemNormalizer extends JsonldNormalizerBase implements Denormal
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
    */
-  public function normalize($object, $format = NULL, array $context = array()) {
+  public function normalize($object, $format = NULL) {
     return $object->getPropertyValues();
   }
 
   /**
    * Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::denormalize()
    */
-  public function denormalize($data, $class, $format = null, array $context = array()) {
+  public function denormalize($data, $class, $format = null) {
     // For most fields, the field items array should simply be returned as is.
     return $data;
   }
diff --git a/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php b/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php
index 9c63332..2834c61 100644
--- a/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php
+++ b/core/modules/jsonld/lib/Drupal/jsonld/JsonldRdfSchemaNormalizer.php
@@ -25,7 +25,7 @@ class JsonldRdfSchemaNormalizer extends JsonldNormalizerBase {
   /**
     * Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
     */
-  public function normalize($data, $format = NULL, array $context = array()) {
+  public function normalize($data, $format = NULL) {
     $normalized = array();
     $graph = $data->getGraph();
 
diff --git a/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php b/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php
index 191a317..8446fa8 100644
--- a/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php
+++ b/core/modules/layout/lib/Drupal/layout/Plugin/Type/LayoutManager.php
@@ -31,6 +31,6 @@ public function __construct() {
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
 
-    $this->factory = new ReflectionFactory($this->discovery);
+    $this->factory = new ReflectionFactory($this);
   }
 }
diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php
index 283a516..d1b32dc 100644
--- a/core/modules/node/lib/Drupal/node/NodeFormController.php
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -336,7 +336,7 @@ protected function actions(array $form, array &$form_state) {
     }
 
     $element['preview'] = array(
-      '#access' => $preview_mode != DRUPAL_DISABLED && (node_access('create', $node) || node_access('update', $node)),
+      '#access' => $preview_mode != DRUPAL_DISABLED,
       '#value' => t('Preview'),
       '#weight' => 20,
       '#validate' => array(
@@ -429,9 +429,6 @@ public function submit(array $form, array &$form_state) {
    *   A reference to a keyed array containing the current state of the form.
    */
   public function preview(array $form, array &$form_state) {
-    // @todo Remove this: we should not have explicit includes in autoloaded
-    //   classes.
-    module_load_include('inc', 'node', 'node.pages');
     drupal_set_title(t('Preview'), PASS_THROUGH);
     $form_state['node_preview'] = node_preview($this->getEntity($form_state));
     $form_state['rebuild'] = TRUE;
diff --git a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php
index a4cf264..a78309b 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php
@@ -39,8 +39,7 @@
  *   },
  *   bundle_keys = {
  *     "bundle" = "type"
- *   },
- *   permission_granularity = "bundle"
+ *   }
  * )
  */
 class Node extends Entity implements ContentEntityInterface {
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
index 7b13462..df99749 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
@@ -34,6 +34,9 @@ public static function getInfo() {
     );
   }
 
+  /**
+   * Overrides \Drupal\simpletest\WebTestBase::setUp().
+   */
   function setUp() {
     $this->entityType = 'node';
     $this->bundle = 'article';
@@ -53,7 +56,7 @@ protected function setupBundle() {
    * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
    */
   function getTranslatorPermissions() {
-    return array_merge(parent::getTranslatorPermissions(), array("edit any $this->bundle content"));
+    return array("edit any $this->bundle content", "translate $this->entityType entities", 'edit original values');
   }
 
   /**
@@ -77,7 +80,7 @@ function testTranslateLinkContentAdminPage() {
    * Tests field translation form.
    */
   function testFieldTranslationForm() {
-    $admin_user = $this->drupalCreateUser(array_merge($this->getTranslatorPermissions(), array('access administration pages', 'bypass node access', 'administer node fields')));
+    $admin_user = $this->drupalCreateUser(array('translate any entity', 'access administration pages', 'bypass node access', 'administer node fields'));
     $this->drupalLogin($admin_user);
 
     $article = $this->drupalCreateNode(array('type' => 'article', 'langcode' => 'en'));
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index f4e3d3d..5e5b270 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -563,13 +563,12 @@ function hook_node_create(\Drupal\node\Plugin\Core\Entity\Node $node) {
  * for all available nodes should be loaded in a single query where possible.
  *
  * This hook is invoked during node loading, which is handled by entity_load(),
- * via classes Drupal\node\NodeStorageController and
- * Drupal\Core\Entity\DatabaseStorageController. After the node information is
- * read from the database or the entity cache, hook_load() is invoked on the
- * node's content type module, then field_attach_load_revision() or
- * field_attach_load() is called, then hook_entity_load() is invoked on all
- * implementing modules, and finally hook_node_load() is invoked on all
- * implementing modules.
+ * via classes NodeController and Drupal\Core\Entity\DatabaseStorageController.
+ * After the node information is read from the database or the entity cache,
+ * hook_load() is invoked on the node's content type module, then
+ * field_attach_load_revision() or field_attach_load() is called, then
+ * hook_entity_load() is invoked on all implementing modules, and finally
+ * hook_node_load() is invoked on all implementing modules.
  *
  * @param $nodes
  *   An array of the nodes being loaded, keyed by nid.
@@ -1217,13 +1216,12 @@ function hook_insert(Drupal\node\Node $node) {
  * (use hook_node_load() to respond to all node loads).
  *
  * This hook is invoked during node loading, which is handled by entity_load(),
- * via classes Drupal\node\NodeStorageController and
- * Drupal\Core\Entity\DatabaseStorageController. After the node information is
- * read from the database or the entity cache, hook_load() is invoked on the
- * node's content type module, then field_attach_node_revision() or
- * field_attach_load() is called, then hook_entity_load() is invoked on all
- * implementing modules, and finally hook_node_load() is invoked on all
- * implementing modules.
+ * via classes NodeController and Drupal\Core\Entity\DatabaseStorageController.
+ * After the node information is read from the database or the entity cache,
+ * hook_load() is invoked on the node's content type module, then
+ * field_attach_node_revision() or field_attach_load() is called, then
+ * hook_entity_load() is invoked on all implementing modules, and finally
+ * hook_node_load() is invoked on all implementing modules.
  *
  * This hook should only be used to add information that is not in the node or
  * node revisions table, not to replace information that is in these tables
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
index 52bcc7e..410a3e8 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/MappingDefinitionTest.php
@@ -44,7 +44,7 @@ function testAttributesInMarkup1() {
     // Ensure the default bundle mapping for node is used. These attributes come
     // from the node default bundle definition.
     $node_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
-    $node_meta = $this->xpath("//article[(@about='$url')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
+    $node_meta = $this->xpath("//div[(@about='$url')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
     $this->assertTrue(!empty($node_title), 'Property dc:title is present in meta tag.');
     $this->assertTrue(!empty($node_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
   }
@@ -64,7 +64,7 @@ function testAttributesInMarkup2() {
 
     // Ensure the mapping defined in rdf_module.test is used.
     $test_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
-    $test_bundle_meta = $this->xpath("//article[(@about='$url') and contains(@typeof, 'foo:mapping_install1') and contains(@typeof, 'bar:mapping_install2')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
+    $test_bundle_meta = $this->xpath("//div[(@about='$url') and contains(@typeof, 'foo:mapping_install1') and contains(@typeof, 'bar:mapping_install2')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
     $this->assertTrue(!empty($test_bundle_title), 'Property dc:title is present in meta tag.');
     $this->assertTrue(!empty($test_bundle_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
   }
@@ -85,7 +85,7 @@ function testAttributesInMarkup3() {
     // Ensure the default bundle mapping for node is used. These attributes come
     // from the node default bundle definition.
     $random_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
-    $random_bundle_meta = $this->xpath("//article[(@about='$url') and contains(@typeof, 'sioc:Item') and contains(@typeof, 'foaf:Document')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
+    $random_bundle_meta = $this->xpath("//div[(@about='$url') and contains(@typeof, 'sioc:Item') and contains(@typeof, 'foaf:Document')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
     $this->assertTrue(!empty($random_bundle_title), 'Property dc:title is present in meta tag.');
     $this->assertTrue(!empty($random_bundle_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
   }
diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php b/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php
index 1bafc06..b496d2c 100644
--- a/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php
+++ b/core/modules/rest/lib/Drupal/rest/Plugin/Type/ResourcePluginManager.php
@@ -23,7 +23,7 @@ class ResourcePluginManager extends PluginManagerBase {
   public function __construct() {
     // Create resource plugin derivatives from declaratively defined resources.
     $this->discovery = new DerivativeDiscoveryDecorator(new AnnotatedClassDiscovery('rest', 'resource'));
-    $this->factory = new ReflectionFactory($this->discovery);
+    $this->factory = new ReflectionFactory($this);
   }
 
   /**
diff --git a/core/modules/shortcut/shortcut.admin.inc b/core/modules/shortcut/shortcut.admin.inc
index d46e73b..d0cf7c1 100644
--- a/core/modules/shortcut/shortcut.admin.inc
+++ b/core/modules/shortcut/shortcut.admin.inc
@@ -214,8 +214,7 @@ function shortcut_set_customize($form, &$form_state, $shortcut_set) {
     $form['shortcuts']['links'][$mlid]['name']['#markup'] = l($link['link_title'], $link['link_path']);
     $form['shortcuts']['links'][$mlid]['weight'] = array(
       '#type' => 'weight',
-      '#title' => t('Weight for @title', array('@title' => $link['link_title'])),
-      '#title_display' => 'invisible',
+      '#title' => t('Weight'),
       '#delta' => 50,
       '#default_value' => $link['weight'],
       '#attributes' => array('class' => array('shortcut-weight')),
diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install
index 4a84150..c64ddb5 100644
--- a/core/modules/shortcut/shortcut.install
+++ b/core/modules/shortcut/shortcut.install
@@ -60,8 +60,9 @@ function shortcut_schema() {
 }
 
 /**
- * @addtogroup updates-7.x-to-8.x
+ * @defgroup updates-7.x-to-8.x Updates from 7.x to 8.x
  * @{
+ * Update functions from 7.x to 8.x.
  */
 
 /**
@@ -102,6 +103,6 @@ function shortcut_update_8001() {
 }
 
 /**
- * @} End of "addtogroup updates-7.x-to-8.x".
+ * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
diff --git a/core/modules/simpletest/config/simpletest.settings.yml b/core/modules/simpletest/config/simpletest.settings.yml
index 52b2d3d..ca18891 100644
--- a/core/modules/simpletest/config/simpletest.settings.yml
+++ b/core/modules/simpletest/config/simpletest.settings.yml
@@ -1,4 +1,5 @@
 clear_results: '1'
+die_on_fail: '0'
 httpauth:
   method: '1'
   password: ''
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index c6bb562..b337e4c 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -144,13 +144,11 @@
   protected $originalSettings;
 
   /**
-   * Whether to die in case any test assertion fails.
-   *
-   * @see run-tests.sh
+   * TRUE if die on fail enabled.
    *
    * @var boolean
    */
-  public $dieOnFail = FALSE;
+  protected $dieOnFail = FALSE;
 
   /**
    * Constructor for Test.
@@ -176,7 +174,7 @@ protected function checkRequirements() {
    * Internal helper: stores the assert.
    *
    * @param $status
-   *   Can be 'pass', 'fail', 'exception', 'debug'.
+   *   Can be 'pass', 'fail', 'exception'.
    *   TRUE is a synonym for 'pass', FALSE for 'fail'.
    * @param $message
    *   (optional) A message to display with the assertion. Do not translate
@@ -232,7 +230,7 @@ protected function assert($status, $message = '', $group = 'Other', array $calle
       return TRUE;
     }
     else {
-      if ($this->dieOnFail && ($status == 'fail' || $status == 'exception')) {
+      if ($this->dieOnFail) {
         exit(1);
       }
       return FALSE;
@@ -672,6 +670,7 @@ public function run(array $methods = array()) {
       }
       $this->verboseClassName = str_replace("\\", "_", $class);
     }
+    $this->dieOnFail = $simpletest_config->get('die_on_fail');
     // HTTP auth settings (<username>:<password>) for the simpletest browser
     // when sending requests to the test site.
     $this->httpauth_method = (int) $simpletest_config->get('httpauth.method');
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 4fb76a5..e6cc158 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -462,14 +462,12 @@ protected function drupalCompareFiles($file1, $file2) {
    * @param array $permissions
    *   Array of permission names to assign to user. Note that the user always
    *   has the default permissions derived from the "authenticated users" role.
-   * @param string $name
-   *   The user name.
    *
    * @return object|false
    *   A fully loaded user object with pass_raw property, or FALSE if account
    *   creation fails.
    */
-  protected function drupalCreateUser(array $permissions = array(), $name = NULL) {
+  protected function drupalCreateUser(array $permissions = array()) {
     // Create a role with the given permission set, if any.
     $rid = FALSE;
     if ($permissions) {
@@ -481,7 +479,7 @@ protected function drupalCreateUser(array $permissions = array(), $name = NULL)
 
     // Create a user assigned to that role.
     $edit = array();
-    $edit['name']   = !empty($name) ? $name : $this->randomName();
+    $edit['name']   = $this->randomName();
     $edit['mail']   = $edit['name'] . '@example.com';
     $edit['pass']   = user_password();
     $edit['status'] = 1;
diff --git a/core/modules/system/config/system.schema.yml b/core/modules/system/config/system.schema.yml
deleted file mode 100644
index 3514260..0000000
--- a/core/modules/system/config/system.schema.yml
+++ /dev/null
@@ -1,104 +0,0 @@
-# Basic scalar data types from typed data.
-boolean:
-  label: 'Boolean'
-  class: '\Drupal\Core\TypedData\Type\Boolean'
-email:
-  label: 'Email'
-  class: '\Drupal\Core\TypedData\Type\Email'
-integer:
-  label: 'Integer'
-  class: '\Drupal\Core\TypedData\Type\Integer'
-string:
-  label: 'String'
-  class: '\Drupal\Core\TypedData\Type\String'
-uri:
-  label: 'Uri'
-  class: '\Drupal\Core\TypedData\Type\Uri'
-
-# Basic data types for configuration.
-undefined:
-  label: 'Undefined'
-  class: '\Drupal\Core\Config\Schema\Property'
-mapping:
-  label: Mapping
-  class: '\Drupal\Core\Config\Schema\Mapping'
-sequence:
-  label: Sequence
-  class: '\Drupal\Core\Config\Schema\Sequence'
-
-# Default mapping for unknown types or types not found.
-default:
-  type: undefined
-  label: 'Unknown'
-
-# Simple extended data types:
-
-# Human readable string that must be plain text and editable with a text field.
-label:
-  type: string
-  label: 'Label'
-
-# Internal Drupal path
-path:
-  type: string
-  label: 'Path'
-
-# Human readable string that can contain multiple lines of text or HTML.
-text:
-  type: string
-  label: 'Text'
-
-# Complex extended data types:
-
-# Mail text with subject and body parts.
-mail:
-  type: mapping
-  label: "Mail"
-  mapping:
-    "subject":
-      type: text
-      label: "Subject"
-    "body":
-      type: text
-      label: "Body"
-
-# Schema for configuration files of system module:
-
-system.site:
-  type: mapping
-  label: 'Site information'
-  mapping:
-    "name":
-      label: "Site name"
-      type: label
-    "mail":
-      label: "Site mail"
-      type: email
-    "slogan":
-      label: "Site slogan"
-      type: text
-    "page":
-      type: mapping
-      mapping:
-        "403":
-          type: path
-        "404":
-          type: path
-        "front":
-          type: path
-          label: "Front page path"
-    "admin_compact_mode":
-      type: boolean
-    "weight_select_max":
-      type: integer
-
-system.maintenance:
-  type: mapping
-  label: 'Maintenance mode'
-  mapping:
-    "enabled":
-      type: boolean
-      label: "Put site into maintenance mode"
-    "message":
-      type: text
-      label: "Message to display when in maintenance mode"
diff --git a/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php b/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php
index 069f2b2..531a149 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/Type/PluginUIManager.php
@@ -29,7 +29,7 @@ public function __construct() {
     $this->discovery = new DerivativeDiscoveryDecorator($this->discovery);
     $this->discovery = new AlterDecorator($this->discovery, 'plugin_ui');
     $this->discovery = new CacheDecorator($this->discovery, 'plugin_ui');
-    $this->factory = new DefaultFactory($this->discovery);
+    $this->factory = new DefaultFactory($this);
   }
 
   /**
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php
index 74bae2f..d3c124f 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php
@@ -68,12 +68,12 @@ function testEntityAccess() {
       'view' => TRUE,
     ), $entity);
 
-    // The custom user is not allowed to perform any operation on test entities.
+    // The custom user is not allowed to view test entities.
     $custom_user = $this->drupalCreateUser();
     $this->assertEntityAccess(array(
-      'create' => FALSE,
-      'update' => FALSE,
-      'delete' => FALSE,
+      'create' => TRUE,
+      'update' => TRUE,
+      'delete' => TRUE,
       'view' => FALSE,
     ), $entity, $custom_user);
   }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregationTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregationTest.php
new file mode 100644
index 0000000..10470e0
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryAggregationTest.php
@@ -0,0 +1,241 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Entity\EntityQueryAggregationTest.
+ */
+namespace Drupal\system\Tests\Entity;
+
+use Drupal\simpletest\DrupalUnitTestBase;
+
+/**
+ * Defines a test for testing aggregation support for entity query.
+ *
+ * @todo Use EntityUnitBaseTest provided by http://drupal.org/node/1893108.
+ *
+ * @see \Drupal\entity_test\Plugin\Core\Entity\EntityTest
+ */
+
+class EntityQueryAggregationTest extends DrupalUnitTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('user', 'system', 'field', 'text', 'field_sql_storage', 'entity_test');
+
+  /**
+   * The entity_test storage controller to create the test entities.
+   *
+   * @var \Drupal\entity_test\EntityTestStorageController
+   */
+  protected $entityStorageController;
+
+  /**
+   * The actual query result, to compare later.
+   *
+   * @var array
+   */
+  protected $queryResult;
+
+  /**
+   * The query factory to create entity queries.
+   *
+   * @var \Drupal\field_sql_storage\Entity\QueryFactory
+   */
+  public $factory;
+
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Entity Query aggregation',
+      'description' => 'Tests the Entity Query Aggregation API',
+      'group' => 'Entity API',
+    );
+  }
+
+  protected function setUp() {
+    parent::setUp();
+    $this->installSchema('user', 'users');
+    $this->installSchema('system', 'sequences');
+    $this->installSchema('field', 'field_config');
+    $this->installSchema('field', 'field_config_instance');
+    $this->installSchema('entity_test', 'entity_test');
+
+    $this->entityStorageController = $this->container->get('plugin.manager.entity')->getStorageController('entity_test');
+    $this->factory = drupal_container()->get('entity.query.field_sql_storage');
+
+    $entity = $this->entityStorageController->create(array('user_id' => 1));
+    $entity->save();
+    $entity = $this->entityStorageController->create(array('user_id' => 2));
+    $entity->save();
+    $entity = $this->entityStorageController->create(array('user_id' => 2));
+    $entity->save();
+    $entity = $this->entityStorageController->create(array('user_id' => 2));
+    $entity->save();
+    $entity = $this->entityStorageController->create(array('user_id' => 3));
+    $entity->save();
+    $entity = $this->entityStorageController->create(array('user_id' => 3));
+    $entity->save();
+  }
+
+  /**
+   * Test aggregation support.
+   */
+  public function testAggregation() {
+    // Apply just a simple groupby.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->groupBy('user_id')
+      ->execute();
+
+    $this->assertEqual($this->queryResult, array(
+      array('user_id' => 1),
+      array('user_id' => 2),
+      array('user_id' => 3),
+    ));
+
+    $function_expected = array();
+    $function_expected['count'] = array(array('id_count' => 6));
+    $function_expected['min'] = array(array('id_min' => 1));
+    $function_expected['max'] = array(array('id_max' => 6));
+    $function_expected['sum'] = array(array('id_sum' => 21));
+    $function_expected['avg'] = array(array('id_avg' => (21.0/6.0)));
+
+    // Apply just a simple aggregation for different aggregation functions.
+    foreach ($function_expected as $aggregation_function => $expected) {
+      $this->queryResult = $this->factory->getAggregate('entity_test')
+        ->aggregate('id', $aggregation_function)
+        ->execute();
+      $this->assertEqual($this->queryResult, $expected);
+    }
+
+    // Apply aggregation and groupby on the same query.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->groupBy('user_id')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(
+      array('user_id' => 1, 'id_count' => 1),
+      array('user_id' => 2, 'id_count' => 3),
+      array('user_id' => 3, 'id_count' => 2),
+    ));
+
+    // Apply aggregation and a condition which matches.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->conditionAggregate('id', 'count', 8)
+      ->execute();
+    $this->assertEqual($this->queryResult, array());
+
+    // Don't call aggregate to test the implicit aggregate call.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->conditionAggregate('id', 'count', 8)
+      ->execute();
+    $this->assertEqual($this->queryResult, array());
+
+    // Apply aggregation and a condition which matches.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->conditionAggregate('id', 'count', 4)
+      ->execute();
+    $this->assertEqual($this->queryResult, array(array('id_count' => 6)));
+
+    // Apply aggregation, a groupby and a condition which matches partially via
+    // the operator '='.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->conditionAggregate('id', 'count', 2)
+      ->groupBy('user_id')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(array('id_count' => 2, 'user_id' => 3)));
+
+    // Apply aggregation, a groupby and a condition which matches partially via
+    // the operator '>'.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->conditionAggregate('id', 'count', 1, '>')
+      ->groupBy('user_id')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(
+      array('id_count' => 2, 'user_id' => 3),
+      array('id_count' => 3, 'user_id' => 2),
+    ));
+
+    // Apply aggregation and a sort. This might not be useful, but have a proper
+    // test coverage.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->sortAggregate('id', 'count')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(array('id_count' => 6)));
+
+    // Don't call aggregate to test the implicit aggregate call.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->sortAggregate('id', 'count')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(array('id_count' => 6)));
+
+    // Apply aggregation, groupby and a sort descending.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->groupBy('user_id')
+      ->sortAggregate('id', 'count', 'DESC')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(
+      array('user_id' => 2, 'id_count' => 3),
+      array('user_id' => 3, 'id_count' => 2),
+      array('user_id' => 1, 'id_count' => 1),
+    ));
+
+    // Apply aggregation, groupby and a sort ascending.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->groupBy('user_id')
+      ->sortAggregate('id', 'count', 'ASC')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(
+      array('user_id' => 1, 'id_count' => 1),
+      array('user_id' => 3, 'id_count' => 2),
+      array('user_id' => 2, 'id_count' => 3),
+    ));
+
+    // Apply aggregation, groupby, a aggregation condition and a sort with the
+    // operator '='.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->groupBy('user_id')
+      ->sortAggregate('id', 'count')
+      ->conditionAggregate('id', 'count', 2)
+      ->execute();
+    $this->assertEqual($this->queryResult, array(array('id_count' => 2, 'user_id' => 3)));
+
+    // Apply aggregation, groupby, a aggregation condition and a sort with the
+    // operator '<' and order ASC.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->groupBy('user_id')
+      ->sortAggregate('id', 'count', 'ASC')
+      ->conditionAggregate('id', 'count', 3, '<')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(
+      array('id_count' => 1, 'user_id' => 1),
+      array('id_count' => 2, 'user_id' => 3),
+    ));
+
+    // Apply aggregation, groupby, a aggregation condition and a sort with the
+    // operator '<' and order DESC.
+    $this->queryResult = $this->factory->getAggregate('entity_test')
+      ->aggregate('id', 'count')
+      ->groupBy('user_id')
+      ->sortAggregate('id', 'count', 'DESC')
+      ->conditionAggregate('id', 'count', 3, '<')
+      ->execute();
+    $this->assertEqual($this->queryResult, array(
+      array('id_count' => 2, 'user_id' => 3),
+      array('id_count' => 1, 'user_id' => 1),
+    ));
+  }
+
+}
+
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 79d6950..d89d63b 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -1937,8 +1937,7 @@ function hook_template_preprocess_default_variables_alter(&$variables) {
  * @return
  *   The machine-readable name of the theme that should be used for the current
  *   page request. The value returned from this function will only have an
- *   effect if it corresponds to a currently-active theme on the site. Do not 
- *   return a value if you do not wish to set a custom theme.
+ *   effect if it corresponds to a currently-active theme on the site.
  */
 function hook_custom_theme() {
   // Allow the user to request a particular theme via a query parameter.
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 7b9effa..5a0aade 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1454,7 +1454,6 @@ function system_update_last_removed() {
   return 7069;
 }
 
-//Do not copy @defgroup to other files. Use @addtogroup instead.
 /**
  * @defgroup config_upgrade Configuration system upgrade functions
  * @{
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php
index 2ab6699..9b66b03 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php
@@ -30,21 +30,21 @@ public function viewAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT
    * Implements \Drupal\Core\Entity\EntityAccessControllerInterface::createAccess().
    */
   public function createAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, User $account = NULL) {
-    return user_access('administer entity_test content', $account);
+    return TRUE;
   }
 
   /**
    * Implements \Drupal\Core\Entity\EntityAccessControllerInterface::updateAccess().
    */
   public function updateAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, User $account = NULL) {
-    return user_access('administer entity_test content', $account);
+    return TRUE;
   }
 
   /**
    * Implements \Drupal\Core\Entity\EntityAccessControllerInterface::deleteAccess().
    */
   public function deleteAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, User $account = NULL) {
-    return user_access('administer entity_test content', $account);
+    return TRUE;
   }
 
 }
diff --git a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/DefaultsTestPluginManager.php b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/DefaultsTestPluginManager.php
index f62fcc9..a449c81 100644
--- a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/DefaultsTestPluginManager.php
+++ b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/DefaultsTestPluginManager.php
@@ -24,7 +24,7 @@ public function __construct() {
     // mock plugins for unit testing.
     $this->discovery = new StaticDiscovery();
     $this->discovery = new ProcessDecorator($this->discovery, array($this, 'ProcessDefinition'));
-    $this->factory = new DefaultFactory($this->discovery);
+    $this->factory = new DefaultFactory($this);
 
     // Specify default values.
     $this->defaults = array(
diff --git a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php
index edb3b5b..bf1a755 100644
--- a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php
+++ b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestEncoder.php
@@ -29,7 +29,7 @@ class SerializationTestEncoder implements EncoderInterface {
    * @return string
    *   A string representation of $data in the requested format.
    */
-  public function encode($data, $format, array $context = array()) {
+  public function encode($data, $format) {
     // @see Drupal\serialization_test\SerializationTestNormalizer::normalize().
     return 'Normalized by ' . $data['normalized_by'] . ', Encoded by SerializationTestEncoder';
   }
diff --git a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php
index 81478c5..5519fe9 100644
--- a/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php
+++ b/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php
@@ -30,7 +30,7 @@ class SerializationTestNormalizer implements NormalizerInterface {
    *   An array containing a normalized representation of $object, appropriate
    *   for encoding to the requested format.
    */
-  public function normalize($object, $format = NULL, array $context = array()) {
+  public function normalize($object, $format = NULL) {
     $normalized = (array) $object;
     // Add identifying value that can be used to verify that the expected
     // normalizer was invoked.
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php
index d1a9314..be46f2a 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php
@@ -38,8 +38,7 @@
  *   bundle_keys = {
  *     "bundle" = "vid"
  *   },
- *   menu_base_path = "taxonomy/term/%taxonomy_term",
- *   permission_granularity = "bundle"
+ *   menu_base_path = "taxonomy/term/%taxonomy_term"
  * )
  */
 class Term extends Entity implements ContentEntityInterface {
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php
index 59226fd..d32df12 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermTranslationController.php
@@ -16,20 +16,6 @@
 class TermTranslationController extends EntityTranslationController {
 
   /**
-   * Overrides EntityTranslationController::getAccess().
-   */
-  public function getAccess(EntityInterface $entity, $op) {
-    switch ($op) {
-      case 'create':
-      case 'update':
-        return taxonomy_term_access('edit', $entity);
-      case 'delete':
-        return taxonomy_term_access('delete', $entity);
-    }
-    return parent::getAccess($entity, $op);
-  }
-
-  /**
    * Overrides EntityTranslationController::entityFormAlter().
    */
   public function entityFormAlter(array &$form, array &$form_state, EntityInterface $entity) {
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php
index 4c0dde2..dd2ed0c 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php
@@ -41,6 +41,9 @@ public static function getInfo() {
     );
   }
 
+  /**
+   * Overrides \Drupal\simpletest\WebTestBase::setUp().
+   */
   function setUp() {
     $this->entityType = 'taxonomy_term';
     $this->bundle = 'tags';
@@ -70,7 +73,7 @@ protected function setupBundle() {
    * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
    */
   function getTranslatorPermissions() {
-    return array_merge(parent::getTranslatorPermissions(), array('administer taxonomy'));
+    return array('administer taxonomy', "translate $this->entityType entities", 'edit original values');
   }
 
   /**
@@ -99,7 +102,7 @@ public function testTranslationUI() {
    * Tests translate link on vocabulary term list.
    */
   function testTranslateLinkVocabularyAdminPage() {
-    $this->admin_user = $this->drupalCreateUser(array_merge(parent::getTranslatorPermissions(), array('access administration pages', 'administer taxonomy')));
+    $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer taxonomy', 'translate any entity'));
     $this->drupalLogin($this->admin_user);
 
     $translatable_tid = $this->createEntity(array(), $this->langcodes[0], $this->vocabulary->id());
diff --git a/core/modules/toolbar/toolbar.install b/core/modules/toolbar/toolbar.install
index dc65611..5ffdedc 100644
--- a/core/modules/toolbar/toolbar.install
+++ b/core/modules/toolbar/toolbar.install
@@ -15,8 +15,9 @@ function toolbar_schema() {
 }
 
 /**
- * @addtogroup updates-7.x-to-8.x
+ * @defgroup updates-7.x-to-8.x Updates from 7.x to 8.x
  * @{
+ * Update functions from 7.x to 8.x.
  */
 
 /**
@@ -40,6 +41,6 @@ function toolbar_update_8001() {
 }
 
 /**
- * @} End of "addtogroup updates-7.x-to-8.x".
+ * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
index a76da88..36202eb 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
@@ -99,17 +99,9 @@ public function getAccess(EntityInterface $entity, $op) {
   /**
    * Implements EntityTranslationControllerInterface::getTranslationAccess().
    */
-  public function getTranslationAccess(EntityInterface $entity, $op) {
-    // @todo Move this logic into a translation access controller checking also
-    //   the translation language and the given account.
-    $info = $entity->entityInfo();
-    $translate_permission = TRUE;
-    // If no permission granularity is defined this entity type does not need an
-    // explicit translate permission.
-    if (!user_access('translate any entity') && !empty($info['permission_granularity'])) {
-      $translate_permission = user_access($info['permission_granularity'] == 'bundle' ? "translate {$entity->bundle()} {$entity->entityType()}" : "translate {$entity->entityType()}");
-    }
-    return $translate_permission && user_access("$op entity translations");
+  public function getTranslationAccess(EntityInterface $entity, $langcode) {
+    $entity_type = $entity->entityType();
+    return (user_access('translate any entity') || user_access("translate $entity_type entities")) && ($langcode != $entity->language()->langcode || user_access('edit original values'));
   }
 
   /**
@@ -211,7 +203,6 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
           '#value' => t('Delete translation'),
           '#weight' => $weight,
           '#submit' => array(array($this, 'entityFormDeleteTranslation')),
-          '#access' => $this->getTranslationAccess($entity, 'delete'),
         );
       }
 
@@ -229,7 +220,7 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
         '#collapsed' => TRUE,
         '#tree' => TRUE,
         '#weight' => 10,
-        '#access' => $this->getTranslationAccess($entity, $source_langcode ? 'create' : 'update'),
+        '#access' => $this->getTranslationAccess($entity, $form_langcode),
         '#multilingual' => TRUE,
       );
 
@@ -268,11 +259,17 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
   }
 
   /**
-   * Process callback: determines which elements get clue in the form.
+   * Process callback: Determines which elements get clue in the form.
+   *
+   * @param array $element
+   *   Form API element.
+   *
+   * @return array
+   *   A processed element with the shared elements marked with a clue.
    *
    * @see \Drupal\translation_entity\EntityTranslationController::entityFormAlter()
    */
-  public function entityFormSharedElements($element, $form_state, $form) {
+  public function entityFormSharedElements($element) {
     static $ignored_types;
 
     // @todo Find a more reliable way to determine if a form element concerns a
@@ -283,7 +280,7 @@ public function entityFormSharedElements($element, $form_state, $form) {
 
     foreach (element_children($element) as $key) {
       if (!isset($element[$key]['#type'])) {
-        $this->entityFormSharedElements($element[$key], $form_state, $form);
+        $this->entityFormSharedElements($element[$key]);
       }
       else {
         // Ignore non-widget form elements.
@@ -292,15 +289,7 @@ public function entityFormSharedElements($element, $form_state, $form) {
         }
         // Elements are considered to be non multilingual by default.
         if (empty($element[$key]['#multilingual'])) {
-          // If we are displaying a multilingual entity form we need to provide
-          // translatability clues, otherwise the shared form elements should be
-          // hidden.
-          if (empty($form_state['translation_entity']['translation_form'])) {
-            $this->addTranslatabilityClue($element[$key]);
-          }
-          else {
-            $element[$key]['#access'] = FALSE;
-          }
+          $this->addTranslatabilityClue($element[$key]);
         }
       }
     }
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php
index a42a019..ed08fc0 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerInterface.php
@@ -132,21 +132,17 @@ public function getViewPath(EntityInterface $entity);
   public function getAccess(EntityInterface $entity, $op);
 
   /**
-   * Checks if the user can perform the given operation on translations of the
-   * wrapped entity.
+   * Checks if a user is allowed to edit the given translation.
    *
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity whose translation has to be accessed.
-   * @param $op
-   *   The operation to be performed on the translation. Possible values are:
-   *   - "create"
-   *   - "update"
-   *   - "delete"
+   * @param string $langcode
+   *   The language code identifying the translation to be accessed.
    *
    * @return boolean
    *   TRUE if the operation may be performed, FALSE otherwise.
    */
-  public function getTranslationAccess(EntityInterface $entity, $op);
+  public function getTranslationAccess(EntityInterface $entity, $langcode);
 
   /**
    * Retrieves the source language for the translation being created.
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerNG.php b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerNG.php
index fd007cd..4c4e9e6 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerNG.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationControllerNG.php
@@ -15,14 +15,7 @@
 class EntityTranslationControllerNG extends EntityTranslationController {
 
   /**
-   * Overrides \Drupal\translation_entity\EntityTranslationController::getAccess().
-   */
-  public function getAccess(EntityInterface $entity, $op) {
-    return $entity->access($op);
-  }
-
-  /**
-   * Overrides \Drupal\translation_entity\EntityTranslationControllerInterface::removeTranslation().
+   * Overrides EntityTranslationController::removeTranslation().
    */
   public function removeTranslation(EntityInterface $entity, $langcode) {
     $translation = $entity->getTranslation($langcode);
@@ -30,5 +23,4 @@ public function removeTranslation(EntityInterface $entity, $langcode) {
       $translation->$property_name = array();
     }
   }
-
 }
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/ConfigTestTranslationUITest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/ConfigTestTranslationUITest.php
index 2439c8b..7d5a38b 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/ConfigTestTranslationUITest.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/ConfigTestTranslationUITest.php
@@ -29,12 +29,22 @@ public static function getInfo() {
     );
   }
 
+  /**
+   * Overrides \Drupal\simpletest\WebTestBase::setUp().
+   */
   function setUp() {
     $this->entityType = 'config_test';
     parent::setUp();
   }
 
   /**
+   * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
+   */
+  function getTranslatorPermissions() {
+    return array("translate $this->entityType entities", 'edit original values');
+  }
+
+  /**
    * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getNewEntityValues().
    */
   protected function getNewEntityValues($langcode) {
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTestTranslationUITest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTestTranslationUITest.php
index 78bcc46..2fbb509 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTestTranslationUITest.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTestTranslationUITest.php
@@ -21,7 +21,7 @@ class EntityTestTranslationUITest extends EntityTranslationUITest {
 
   public static function getInfo() {
     return array(
-      'name' => 'Entity Test translation UI',
+      'name' => 'Entity Test Translation UI',
       'description' => 'Tests the test entity translation UI with the test entity.',
       'group' => 'Entity Translation UI',
     );
@@ -40,7 +40,7 @@ function setUp() {
    * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
    */
   function getTranslatorPermissions() {
-    return array_merge(parent::getTranslatorPermissions(), array('administer entity_test content'));
+    return array('administer entity_test content', "translate $this->entityType entities", 'edit original values');
   }
 
   /**
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php
deleted file mode 100644
index 13e1f59..0000000
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php
+++ /dev/null
@@ -1,215 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\entity\Tests\EntityTranslationTestBase.
- */
-
-namespace Drupal\translation_entity\Tests;
-
-use Drupal\Core\Entity\DatabaseStorageControllerNG;
-use Drupal\Core\Language\Language;
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Tests entity translation workflows.
- */
-abstract class EntityTranslationTestBase extends WebTestBase {
-
-  /**
-   * The entity type being tested.
-   *
-   * @var string
-   */
-  protected $entityType = 'entity_test_mul';
-
-  /**
-   * The bundle being tested.
-   *
-   * @var string
-   */
-  protected $bundle;
-
-  /**
-   * The enabled languages.
-   *
-   * @var array
-   */
-  protected $langcodes;
-
-  /**
-   * The account to be used to test translation operations.
-   *
-   * @var \Drupal\user\Plugin\Core\Entity\User
-   */
-  protected $translator;
-
-  /**
-   * The account to be used to test multilingual entity editing.
-   *
-   * @var \Drupal\user\Plugin\Core\Entity\User
-   */
-  protected $editor;
-
-  /**
-   * The account to be used to test access to both workflows.
-   *
-   * @var \Drupal\user\Plugin\Core\Entity\User
-   */
-  protected $administrator;
-
-  /**
-   * The name of the field used to test translation.
-   *
-   * @var string
-   */
-  protected $fieldName;
-
-  /**
-   * The translation controller for the current entity type.
-   *
-   * @var \Drupal\translation_entity\EntityTranslationControllerInterface
-   */
-  protected $controller;
-
-  function setUp() {
-    parent::setUp();
-
-    $this->setupLanguages();
-    $this->setupBundle();
-    $this->enableTranslation();
-    $this->setupUsers();
-    $this->setupTestFields();
-
-    $this->controller = translation_entity_controller($this->entityType);
-  }
-
-  /**
-   * Enables additional languages.
-   */
-  protected function setupLanguages() {
-    $this->langcodes = array('it', 'fr');
-    foreach ($this->langcodes as $langcode) {
-      language_save(new Language(array('langcode' => $langcode)));
-    }
-    array_unshift($this->langcodes, language_default()->langcode);
-  }
-
-  /**
-   * Returns an array of permissions needed for the translator.
-   */
-  protected function getTranslatorPermissions() {
-    return array_filter(array($this->getTranslatePermission(), 'create entity translations', 'update entity translations', 'delete entity translations'));
-  }
-
-  /**
-   * Returns the translate permissions for the current entity and bundle.
-   */
-  protected function getTranslatePermission() {
-    $info = entity_get_info($this->entityType);
-    if (!empty($info['permission_granularity'])) {
-      return $info['permission_granularity'] == 'bundle' ? "translate {$this->bundle} {$this->entityType}" : "translate {$this->entityType}";
-    }
-  }
-
-  /**
-   * Returns an array of permissions needed for the editor.
-   */
-  protected function getEditorPermissions() {
-    // Every entity-type-specific test needs to define these.
-    return array();
-  }
-
-  /**
-   * Creates and activates translator, editor and admin users.
-   */
-  protected function setupUsers() {
-    $this->translator = $this->drupalCreateUser($this->getTranslatorPermissions(), 'translator');
-    $this->editor = $this->drupalCreateUser($this->getEditorPermissions(), 'editor');
-    $this->administrator = $this->drupalCreateUser(array_merge($this->getEditorPermissions(), $this->getTranslatorPermissions()), 'administrator');
-    $this->drupalLogin($this->translator);
-  }
-
-  /**
-   * Creates or initializes the bundle date if needed.
-   */
-  protected function setupBundle() {
-    if (empty($this->bundle)) {
-      $this->bundle = $this->entityType;
-    }
-  }
-
-  /**
-   * Enables translation for the current entity type and bundle.
-   */
-  protected function enableTranslation() {
-    // Enable translation for the current entity type and ensure the change is
-    // picked up.
-    translation_entity_set_config($this->entityType, $this->bundle, 'enabled', TRUE);
-    drupal_static_reset();
-    entity_info_cache_clear();
-    menu_router_rebuild();
-  }
-
-  /**
-   * Creates the test fields.
-   */
-  protected function setupTestFields() {
-    $this->fieldName = 'field_test_et_ui_test';
-
-    $field = array(
-      'field_name' => $this->fieldName,
-      'type' => 'text',
-      'cardinality' => 1,
-      'translatable' => TRUE,
-    );
-    field_create_field($field);
-
-    $instance = array(
-      'entity_type' => $this->entityType,
-      'field_name' => $this->fieldName,
-      'bundle' => $this->bundle,
-      'label' => 'Test translatable text-field',
-      'widget' => array(
-        'type' => 'text_textfield',
-        'weight' => 0,
-      ),
-    );
-    field_create_instance($instance);
-  }
-
-  /**
-   * Creates the entity to be translated.
-   *
-   * @param array $values
-   *   An array of initial values for the entity.
-   * @param string $langcode
-   *   The initial language code of the entity.
-   * @param string $bundle_name
-   *   (optional) The entity bundle, if the entity uses bundles. Defaults to
-   *   NULL. If left NULL, $this->bundle will be used.
-   *
-   * @return
-   *   The entity id.
-   */
-  protected function createEntity($values, $langcode, $bundle_name = NULL) {
-    $entity_values = $values;
-    $entity_values['langcode'] = $langcode;
-    $info = entity_get_info($this->entityType);
-    if (!empty($info['entity_keys']['bundle'])) {
-      $entity_values[$info['entity_keys']['bundle']] = $bundle_name ?: $this->bundle;
-    }
-    $controller = $this->container->get('plugin.manager.entity')->getStorageController($this->entityType);
-    if (!($controller instanceof DatabaseStorageControllerNG)) {
-      foreach ($values as $property => $value) {
-        if (is_array($value)) {
-          $entity_values[$property] = array($langcode => $value);
-        }
-      }
-    }
-    $entity = entity_create($this->entityType, $entity_values);
-    $entity->save();
-    return $entity->id();
-  }
-
-}
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php
index 1aa23c4..8c2dcef 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationUITest.php
@@ -7,14 +7,45 @@
 
 namespace Drupal\translation_entity\Tests;
 
+use Drupal\Core\Entity\DatabaseStorageControllerNG;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityNG;
+use Drupal\Core\Language\Language;
 use Drupal\Core\TypedData\ComplexDataInterface;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Tests the Entity Translation UI.
  */
-abstract class EntityTranslationUITest extends EntityTranslationTestBase {
+abstract class EntityTranslationUITest extends WebTestBase {
+
+  /**
+   * The enabled languages.
+   *
+   * @var array
+   */
+  protected $langcodes;
+
+  /**
+   * The entity type being tested.
+   *
+   * @var string
+   */
+  protected $entityType;
+
+  /**
+   * The bundle being tested.
+   *
+   * @var string
+   */
+  protected $bundle;
+
+  /**
+   * The name of the field used to test translation.
+   *
+   * @var string
+   */
+  protected $fieldName;
 
   /**
    * Whether the behavior of the language selector should be tested.
@@ -23,6 +54,92 @@
    */
   protected $testLanguageSelector = TRUE;
 
+
+  /**
+   * Overrides \Drupal\simpletest\WebTestBase::setUp().
+   */
+  function setUp() {
+    parent::setUp();
+
+    $this->setupLanguages();
+    $this->setupBundle();
+    $this->enableTranslation();
+    $this->setupTranslator();
+    $this->setupTestFields();
+  }
+
+  /**
+   * Enables additional languages.
+   */
+  protected function setupLanguages() {
+    $this->langcodes = array('it', 'fr');
+    foreach ($this->langcodes as $langcode) {
+      language_save(new Language(array('langcode' => $langcode)));
+    }
+    array_unshift($this->langcodes, language_default()->langcode);
+  }
+
+  /**
+   * Creates or initializes the bundle date if needed.
+   */
+  protected function setupBundle() {
+    if (empty($this->bundle)) {
+      $this->bundle = $this->entityType;
+    }
+  }
+
+  /**
+   * Enables translation for the current entity type and bundle.
+   */
+  protected function enableTranslation() {
+    // Enable translation for the current entity type and ensure the change is
+    // picked up.
+    translation_entity_set_config($this->entityType, $this->bundle, 'enabled', TRUE);
+    drupal_static_reset();
+    entity_info_cache_clear();
+    menu_router_rebuild();
+  }
+
+  /**
+   * Returns an array of permissions needed for the translator.
+   */
+  abstract function getTranslatorPermissions();
+
+  /**
+   * Creates and activates a translator user.
+   */
+  protected function setupTranslator() {
+    $translator = $this->drupalCreateUser($this->getTranslatorPermissions());
+    $this->drupalLogin($translator);
+  }
+
+  /**
+   * Creates the test fields.
+   */
+  protected function setupTestFields() {
+    $this->fieldName = 'field_test_et_ui_test';
+
+    $field = array(
+      'field_name' => $this->fieldName,
+      'type' => 'text',
+      'cardinality' => 1,
+      'translatable' => TRUE,
+    );
+    field_create_field($field);
+
+    $instance = array(
+      'entity_type' => $this->entityType,
+      'field_name' => $this->fieldName,
+      'bundle' => $this->bundle,
+      'label' => 'Test translatable text-field',
+      'widget' => array(
+        'type' => 'text_textfield',
+        'weight' => 0,
+      ),
+    );
+    field_create_instance($instance);
+  }
+
   /**
    * Tests the basic translation UI.
    */
@@ -46,7 +163,8 @@ function testTranslationUI() {
     $langcode = 'it';
     $values[$langcode] = $this->getNewEntityValues($langcode);
 
-    $base_path = $this->controller->getBasePath($entity);
+    $controller = translation_entity_controller($this->entityType);
+    $base_path = $controller->getBasePath($entity);
     $path = $langcode . '/' . $base_path . '/translations/add/' . $default_langcode . '/' . $langcode;
     $this->drupalPost($path, $this->getEditValues($values, $langcode), t('Save'));
     if ($this->testLanguageSelector) {
@@ -82,7 +200,7 @@ function testTranslationUI() {
     // Check that every translation has the correct "outdated" status.
     foreach ($this->langcodes as $enabled_langcode) {
       $prefix = $enabled_langcode != $default_langcode ? $enabled_langcode . '/' : '';
-      $path = $prefix . $this->controller->getEditPath($entity);
+      $path = $prefix . $controller->getEditPath($entity);
       $this->drupalGet($path);
       if ($enabled_langcode == $langcode) {
         $this->assertFieldByXPath('//input[@name="translation[retranslate]"]', FALSE, 'The retranslate flag is not checked by default.');
@@ -109,6 +227,40 @@ function testTranslationUI() {
   }
 
   /**
+   * Creates the entity to be translated.
+   *
+   * @param array $values
+   *   An array of initial values for the entity.
+   * @param string $langcode
+   *   The initial language code of the entity.
+   * @param string $bundle_name
+   *   (optional) The entity bundle, if the entity uses bundles. Defaults to
+   *   NULL. If left NULL, $this->bundle will be used.
+   *
+   * @return
+   *   The entity id.
+   */
+  protected function createEntity($values, $langcode, $bundle_name = NULL) {
+    $entity_values = $values;
+    $entity_values['langcode'] = $langcode;
+    $info = entity_get_info($this->entityType);
+    if (!empty($info['entity_keys']['bundle'])) {
+      $entity_values[$info['entity_keys']['bundle']] = $bundle_name ?: $this->bundle;
+    }
+    $controller = $this->container->get('plugin.manager.entity')->getStorageController($this->entityType);
+    if (!($controller instanceof DatabaseStorageControllerNG)) {
+      foreach ($values as $property => $value) {
+        if (is_array($value)) {
+          $entity_values[$property] = array($langcode => $value);
+        }
+      }
+    }
+    $entity = entity_create($this->entityType, $entity_values);
+    $entity->save();
+    return $entity->id();
+  }
+
+  /**
    * Returns an array of entity field values to be tested.
    */
   protected function getNewEntityValues($langcode) {
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationWorkflowsTest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationWorkflowsTest.php
deleted file mode 100644
index 7ffe6c0..0000000
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationWorkflowsTest.php
+++ /dev/null
@@ -1,185 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\entity\Tests\EntityTranslationWorkflowsTest.
- */
-
-namespace Drupal\translation_entity\Tests;
-
-use Drupal\user\Plugin\Core\Entity\User;
-
-/**
- * Tests entity translation workflows.
- */
-class EntityTranslationWorkflowsTest extends EntityTranslationTestBase {
-
-  /**
-   * The entity used for testing.
-   *
-   * @var \Drupal\Core\Entity\EntityInterface
-   */
-  protected $entity;
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('language', 'translation_entity', 'entity_test');
-
-  public static function getInfo() {
-    return array(
-      'name' => 'Entity Test translation workflows',
-      'description' => 'Tests the entity translation workflows for the test entity.',
-      'group' => 'Entity Translation UI',
-    );
-  }
-
-  function setUp() {
-    parent::setUp();
-    $this->setupEntity();
-  }
-
-  /**
-   * Overrides \Drupal\translation_entity\Tests\EntityTranslationTestBase::getEditorPermissions().
-   */
-  protected function getEditorPermissions() {
-    return array('administer entity_test content');
-  }
-
-  /**
-   * Creates a test entity and translate it.
-   */
-  protected function setupEntity() {
-    $default_langcode = $this->langcodes[0];
-
-    // Create a test entity.
-    $values = array(
-      'name' => $this->randomName(),
-      'user_id' => mt_rand(1, 128),
-      $this->fieldName => array(array('value' => $this->randomName(16))),
-    );
-    $id = $this->createEntity($values, $default_langcode);
-    $this->entity = entity_load($this->entityType, $id, TRUE);
-
-    // Create a translation.
-    $this->drupalLogin($this->translator);
-    $add_translation_path = $this->controller->getBasePath($this->entity) . "/translations/add/$default_langcode/{$this->langcodes[2]}";
-    $this->drupalPost($add_translation_path, array(), t('Save'));
-  }
-
-  /**
-   * Test simple and editorial translation workflows.
-   */
-  function testWorkflows() {
-    // Test workflows for the editor.
-    $expected_status = array('edit' => 200, 'overview' => 403, 'add_translation' => 403, 'edit_translation' => 403);
-    $this->assertWorkflows($this->editor, $expected_status);
-
-    // Test workflows for the translator.
-    $expected_status = array('edit' => 403, 'overview' => 200, 'add_translation' => 200, 'edit_translation' => 200);
-    $this->assertWorkflows($this->translator, $expected_status);
-
-    // Test workflows for the admin.
-    $expected_status = array('edit' => 200, 'overview' => 200, 'add_translation' => 200, 'edit_translation' => 200);
-    $this->assertWorkflows($this->administrator, $expected_status);
-
-    // Check that translation permissions governate the associated operations.
-    $ops = array('create' => t('add'), 'update' => t('edit'), 'delete' => t('delete'));
-    $translations_path = $this->controller->getBasePath($this->entity) . "/translations";
-    foreach ($ops as $current_op => $label) {
-      $user = $this->drupalCreateUser(array($this->getTranslatePermission(), "$current_op entity translations"));
-      $this->drupalLogin($user);
-      $this->drupalGet($translations_path);
-
-      foreach ($ops as $op => $label) {
-        if ($op != $current_op) {
-          $this->assertNoLink($label, format_string('No %op link found.', array('%op' => $label)));
-        }
-        else {
-          $this->assertLink($label, 0, format_string('%op link found.', array('%op' => $label)));
-        }
-      }
-    }
-  }
-
-  /**
-   * Checks that workflows have the expected behaviors for the given user.
-   *
-   * @param \Drupal\user\Plugin\Core\Entity\User $user
-   *   The user to test the workflow behavior against.
-   * @param array $expected_status
-   *   The an associative array with the operation name as key and the expected
-   *   status as value.
-   */
-  protected function assertWorkflows(User $user, $expected_status) {
-    $default_langcode = $this->langcodes[0];
-    $languages = language_list();
-    $args = array('@user_label' => $user->name);
-    $this->drupalLogin($user);
-
-    // Check whether the user is allowed to access the entity form in edit mode.
-    $edit_path = $this->controller->getEditPath($this->entity);
-    $options = array('language' => $languages[$default_langcode]);
-    $this->drupalGet($edit_path, $options);
-    $this->assertResponse($expected_status['edit'], format_string('The @user_label has the expected edit access.', $args));
-
-    // Check whether the user is allowed to access the translation overview.
-    $langcode = $this->langcodes[1];
-    $translations_path = $this->controller->getBasePath($this->entity) . "/translations";
-    $options = array('language' => $languages[$langcode]);
-    $this->drupalGet($translations_path, $options);
-    $this->assertResponse($expected_status['overview'], format_string('The @user_label has the expected translation overview access.', $args));
-
-    // Check whether the user is allowed to create a translation.
-    $add_translation_path = $translations_path . "/add/$default_langcode/$langcode";
-    if ($expected_status['add_translation'] == 200) {
-      $this->clickLink('add');
-      $this->assertUrl($add_translation_path, $options, 'The translation overview points to the translation form when creating translations.');
-      // Check that the translation form does not contain shared elements for
-      // translators.
-      if ($expected_status['edit'] == 403) {
-        $this->assertNoSharedElements();
-      }
-    }
-    else {
-      $this->drupalGet($add_translation_path, $options);
-    }
-    $this->assertResponse($expected_status['add_translation'], format_string('The @user_label has the expected translation creation access.', $args));
-
-    // Check whether the user is allowed to edit a translation.
-    $langcode = $this->langcodes[2];
-    $edit_translation_path = $translations_path . "/edit/$langcode";
-    $options = array('language' => $languages[$langcode]);
-    if ($expected_status['edit_translation'] == 200) {
-      $this->drupalGet($translations_path, $options);
-      $editor = $expected_status['edit'] == 200;
-      $this->clickLink('edit', intval($editor));
-
-      if ($editor) {
-        // An editor should be pointed to the entity form in multilingual mode.
-        $this->assertUrl($edit_path, $options, 'The translation overview points to the edit form for editors when editing translations.');
-      }
-      else {
-        // While a translator should be pointed to the translation form.
-        $this->assertUrl($edit_translation_path, $options, 'The translation overview points to the translation form for translators when editing translations.');
-        // Check that the translation form does not contain shared elements.
-        $this->assertNoSharedElements();
-      }
-    }
-    else {
-      $this->drupalGet($edit_translation_path, $options);
-    }
-    $this->assertResponse($expected_status['edit_translation'], format_string('The @user_label has the expected translation creation access.', $args));
-  }
-
-  /**
-   * Assert that the current page does not contain shared form elements.
-   */
-  protected function assertNoSharedElements() {
-    $language_none = LANGUAGE_NOT_SPECIFIED;
-    return $this->assertNoFieldByXPath("//input[@name='field_test_text[$language_none][0][value]']", NULL, 'Shared elements are not available on the translation form.');
-  }
-
-}
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/Views/TranslationLinkTest.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/Views/TranslationLinkTest.php
index 4c7868b..72cdd46 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/Views/TranslationLinkTest.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/Views/TranslationLinkTest.php
@@ -8,7 +8,7 @@
 namespace Drupal\translation_entity\Tests\Views;
 
 use Drupal\views\Tests\ViewTestBase;
-use Drupal\translation_entity\Tests\EntityTranslationTestBase;
+use Drupal\translation_entity\Tests\EntityTranslationUITest;
 use Drupal\views\Tests\ViewTestData;
 
 /**
@@ -16,7 +16,7 @@
  *
  * @see \Drupal\translation_entity\Plugin\views\field\TranslationLink
  */
-class TranslationLinkTest extends EntityTranslationTestBase {
+class TranslationLinkTest extends EntityTranslationUITest {
 
   /**
    * Views used by this test.
@@ -50,6 +50,13 @@ function setUp() {
   }
 
   /**
+   * Implements \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
+   */
+  function getTranslatorPermissions() {
+    return array("translate $this->entityType entities", 'edit original values');
+  }
+
+  /**
    * Tests the Entity translation overview link field handler.
    */
   public function testTranslationLink() {
@@ -58,4 +65,12 @@ public function testTranslationLink() {
     $this->assertNoLinkByHref('user/2/translations', 'The translations link is not present when translation_entity_translate_access() is FALSE.');
   }
 
+  /**
+   * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::testTranslationUI().
+   */
+  public function testTranslationUI() {
+    // @todo \Drupal\translation_entity\Tests\EntityTranslationUITest contains
+    //   essential helper methods that should be seprarated from test methods.
+  }
+
 }
diff --git a/core/modules/translation_entity/translation_entity.module b/core/modules/translation_entity/translation_entity.module
index 0167180..ee16a9c 100644
--- a/core/modules/translation_entity/translation_entity.module
+++ b/core/modules/translation_entity/translation_entity.module
@@ -155,37 +155,18 @@ function translation_entity_menu() {
         'weight' => 2,
       ) + $item;
 
-      $items["$path/translations/overview"] = array(
-        'title' => 'Overview',
-        'type' => MENU_DEFAULT_LOCAL_TASK,
-        'weight' => 0,
-      );
-
       // Add translation callback.
       // @todo Add the access callback instead of replacing it as soon as the
       // routing system supports multiple callbacks.
+      $add_path = "$path/translations/add/%language/%language";
       $language_position = $entity_position + 3;
       $args = array($entity_position, $language_position, $language_position + 1);
-      $items["$path/translations/add/%language/%language"] = array(
+      $items[$add_path] = array(
         'title' => 'Add',
         'page callback' => 'translation_entity_add_page',
         'page arguments' => $args,
         'access callback' => 'translation_entity_add_access',
         'access arguments' => $args,
-        'type' => MENU_LOCAL_TASK,
-        'weight' => 1,
-      ) + $item;
-
-      // Edit translation callback.
-      $args = array($entity_position, $language_position);
-      $items["$path/translations/edit/%language"] = array(
-        'title' => 'Edit',
-        'page callback' => 'translation_entity_edit_page',
-        'page arguments' => $args,
-        'access callback' => 'translation_entity_edit_access',
-        'access arguments' => $args,
-        'type' => MENU_LOCAL_TASK,
-        'weight' => 1,
       ) + $item;
 
       // Delete translation callback.
@@ -193,8 +174,6 @@ function translation_entity_menu() {
         'title' => 'Delete',
         'page callback' => 'drupal_get_form',
         'page arguments' => array('translation_entity_delete_confirm', $entity_position, $language_position),
-        'access callback' => 'translation_entity_delete_access',
-        'access arguments' => $args,
       ) + $item;
     }
   }
@@ -278,10 +257,7 @@ function _translation_entity_menu_strip_loaders($path) {
  */
 function translation_entity_translate_access(EntityInterface $entity) {
   $entity_type = $entity->entityType();
-  return empty($entity->language()->locked) &&
-    language_multilingual() &&
-    translation_entity_enabled($entity_type, $entity->bundle()) &&
-    (user_access('create entity translations') || user_access('update entity translations') || user_access('delete entity translations'));
+  return empty($entity->language()->locked) && language_multilingual() && translation_entity_enabled($entity_type, $entity->bundle()) && (user_access('translate any entity') || user_access("translate $entity_type entities"));
 }
 
 /**
@@ -290,50 +266,16 @@ function translation_entity_translate_access(EntityInterface $entity) {
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity being translated.
  * @param \Drupal\Core\Language\Language $source
- *   (optional) The language of the values being translated. Defaults to the
- *   entity language.
+ *   The language of the values being translated.
  * @param \Drupal\Core\Language\Language $target
- *   (optional) The language of the translated values. Defaults to the current
- *   content language.
+ *   The language of the translated values.
  */
 function translation_entity_add_access(EntityInterface $entity, Language $source = NULL, Language $target = NULL) {
   $source = !empty($source) ? $source : $entity->language();
   $target = !empty($target) ? $target : language(LANGUAGE_TYPE_CONTENT);
   $translations = $entity->getTranslationLanguages();
   $languages = language_list();
-  return $source->langcode != $target->langcode && isset($languages[$source->langcode]) && isset($languages[$target->langcode]) && !isset($translations[$target->langcode]) && translation_entity_access($entity, 'create');
-}
-
-/**
- * Access callback for the translation edit page.
- *
- * @param \Drupal\Core\Entity\EntityInterface $entity
- *   The entity being translated.
- * @param \Drupal\Core\Language\Language $language
- *   (optional) The language of the translated values. Defaults to the current
- *   content language.
- */
-function translation_entity_edit_access(EntityInterface $entity, Language $language = NULL) {
-  $language = !empty($language) ? $language : language(LANGUAGE_TYPE_CONTENT);
-  $translations = $entity->getTranslationLanguages();
-  $languages = language_list();
-  return isset($languages[$language->langcode]) && $language->langcode != $entity->language()->langcode && isset($translations[$language->langcode]) && translation_entity_access($entity, 'update');
-}
-
-/**
- * Access callback for the translation delete page.
- *
- * @param \Drupal\Core\Entity\EntityInterface $entity
- *   The entity being translated.
- * @param \Drupal\Core\Language\Language $language
- *   (optional) The language of the translated values. Defaults to the current
- *   content language.
- */
-function translation_entity_delete_access(EntityInterface $entity, Language $language = NULL) {
-  $language = !empty($language) ? $language : language(LANGUAGE_TYPE_CONTENT);
-  $translations = $entity->getTranslationLanguages();
-  $languages = language_list();
-  return isset($languages[$language->langcode]) && $language->langcode != $entity->language()->langcode && isset($translations[$language->langcode]) && translation_entity_access($entity, 'delete');
+  return $source->langcode != $target->langcode && isset($languages[$source->langcode]) && isset($languages[$target->langcode]) && !isset($translations[$target->langcode]) && translation_entity_access($entity, $target->langcode);
 }
 
 /**
@@ -512,18 +454,14 @@ function translation_entity_form_controller(array $form_state) {
  *
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity to be accessed.
- * @param $op
- *   The operation to be performed on the translation. Possible values are:
- *   - "view"
- *   - "update"
- *   - "delete"
- *   - "create"
+ * @param string $langcode
+ *   The language of the translation to be accessed.
  *
  * @return
  *   TRUE if the current user is allowed to view the translation.
  */
-function translation_entity_access(EntityInterface $entity, $op) {
-  return translation_entity_controller($entity->entityType())->getTranslationAccess($entity, $op) ;
+function translation_entity_access(EntityInterface $entity, $langcode) {
+  return translation_entity_controller($entity->entityType())->getTranslationAccess($entity, $langcode) ;
 }
 
 /**
@@ -531,50 +469,27 @@ function translation_entity_access(EntityInterface $entity, $op) {
  */
 function translation_entity_permission() {
   $permission = array(
+    'edit original values' => array(
+      'title' => t('Edit original values'),
+      'description' => t('Access the entity form in the original language.'),
+    ),
     'administer entity translation' => array(
-      'title' => t('Administer translation settings'),
+      'title' => t('Administer entity translation'),
       'description' => t('Configure translatability of entities and fields.'),
     ),
-    'create entity translations' => array(
-      'title' => t('Create translations'),
-    ),
-    'update entity translations' => array(
-      'title' => t('Edit translations'),
-    ),
-    'delete entity translations' => array(
-      'title' => t('Delete translations'),
-    ),
     'translate any entity' => array(
       'title' => t('Translate any entity'),
+      'description' => t('Translate field content for any fieldable entity.'),
     ),
   );
 
-  // Create a translate permission for each enabled entity type and (optionally)
-  // bundle.
   foreach (entity_get_info() as $entity_type => $info) {
-    if (!empty($info['permission_granularity'])) {
-      $t_args = array('@entity_label' => drupal_strtolower(t($info['label'])));
-
-      switch ($info['permission_granularity']) {
-        case 'bundle':
-          foreach (entity_get_bundles($entity_type) as $bundle => $bundle_info) {
-            if (translation_entity_enabled($entity_type, $bundle)) {
-              $t_args['%bundle_label'] = isset($bundle_info['label']) ? $bundle_info['label'] : $bundle;
-              $permission["translate $bundle $entity_type"] = array(
-                'title' => t('Translate %bundle_label @entity_label', $t_args),
-              );
-            }
-          }
-          break;
-
-        case 'entity_type':
-          if (translation_entity_enabled($entity_type)) {
-            $permission["translate $entity_type"] = array(
-              'title' => t('Translate @entity_label', $t_args),
-            );
-          }
-          break;
-      }
+    if (translation_entity_enabled($entity_type)) {
+      $label = !empty($info['label']) ? t($info['label']) : $entity_type;
+      $permission["translate $entity_type entities"] = array(
+        'title' => t('Translate entities of type @type', array('@type' => $label)),
+        'description' => t('Translate field content for entities of type @type.', array('@type' => $label)),
+      );
     }
   }
 
diff --git a/core/modules/translation_entity/translation_entity.pages.inc b/core/modules/translation_entity/translation_entity.pages.inc
index 3111e01..e2e76cc 100644
--- a/core/modules/translation_entity/translation_entity.pages.inc
+++ b/core/modules/translation_entity/translation_entity.pages.inc
@@ -51,13 +51,11 @@ function translation_entity_overview(EntityInterface $entity) {
       $language_name = $language->name;
       $langcode = $language->langcode;
       $add_path = $base_path . '/translations/add/' . $original . '/' . $langcode;
-      $translate_path = $base_path . '/translations/edit/' . $langcode;
       $delete_path = $base_path . '/translations/delete/' . $langcode;
 
       if ($base_path) {
         $add_links = _translation_entity_get_switch_links($add_path);
         $edit_links = _translation_entity_get_switch_links($edit_path);
-        $translate_links = _translation_entity_get_switch_links($translate_path);
         $delete_links = _translation_entity_get_switch_links($delete_path);
       }
 
@@ -82,17 +80,8 @@ function translation_entity_overview(EntityInterface $entity) {
           $row_title = $is_original ? $label : t('n/a');
         }
 
-        // If the user is allowed to edit the entity we point the edit link to
-        // the entity form, otherwise if we are not dealing with the original
-        // language we point the link to the translation form.
-        if ($edit_path && $controller->getAccess($entity, 'update')) {
+        if ($edit_path && $controller->getAccess($entity, 'update') && $controller->getTranslationAccess($entity, $langcode)) {
           $links['edit'] = isset($edit_links->links[$langcode]['href']) ? $edit_links->links[$langcode] : array('href' => $edit_path, 'language' => $language);
-        }
-        elseif (!$is_original && $controller->getTranslationAccess($entity, 'update')) {
-          $links['edit'] = isset($translate_links->links[$langcode]['href']) ? $translate_links->links[$langcode] : array('href' => $translate_path, 'language' => $language);
-        }
-
-        if (isset($links['edit'])) {
           $links['edit']['title'] = t('edit');
         }
 
@@ -109,10 +98,8 @@ function translation_entity_overview(EntityInterface $entity) {
         }
         else {
           $source_name = isset($languages[$source]) ? $languages[$source]->name : t('n/a');
-          if ($controller->getTranslationAccess($entity, 'delete')) {
-            $links['delete'] = isset($delete_links->links[$langcode]['href']) ? $delete_links->links[$langcode] : array('href' => $delete_links, 'language' => $language);
-            $links['delete']['title'] = t('delete');
-          }
+          $links['delete'] = isset($delete_links->links[$langcode]['href']) ? $delete_links->links[$langcode] : array('href' => $delete_links, 'language' => $language);
+          $links['delete']['title'] = t('delete');
         }
       }
       else {
@@ -120,7 +107,7 @@ function translation_entity_overview(EntityInterface $entity) {
         $row_title = $source_name = t('n/a');
         $source = $entity->language()->langcode;
 
-        if ($source != $langcode && $controller->getTranslationAccess($entity, 'create')) {
+        if ($source != $langcode && $controller->getAccess($entity, 'update')) {
           if ($translatable) {
             $links['add'] = isset($add_links->links[$langcode]['href']) ? $add_links->links[$langcode] : array('href' => $add_path, 'language' => $language);
             $links['add']['title'] = t('add');
@@ -201,30 +188,6 @@ function translation_entity_add_page(EntityInterface $entity, Language $source =
   $form_state = entity_form_state_defaults($entity, $operation, $target->langcode);
   $form_state['translation_entity']['source'] = $source;
   $form_state['translation_entity']['target'] = $target;
-  $controller = translation_entity_controller($entity->entityType());
-  $form_state['translation_entity']['translation_form'] = !$controller->getAccess($entity, 'update');
-  $form_id = entity_form_id($entity);
-  return drupal_build_form($form_id, $form_state);
-}
-
-/**
- * Page callback for the translation edit page.
- *
- * @param \Drupal\Core\Entity\EntityInterface $entity
- *   The entity being translated.
- * @param \Drupal\Core\Language\Language $language
- *   (optional) The language of the translated values. Defaults to the current
- *   content language.
- *
- * @return array
- *   A processed form array ready to be rendered.
- */
-function translation_entity_edit_page(EntityInterface $entity, Language $language = NULL) {
-  $language = !empty($language) ? $language : language(LANGUAGE_TYPE_CONTENT);
-  $info = $entity->entityInfo();
-  $operation = isset($info['default_operation']) ? $info['default_operation'] : 'default';
-  $form_state = entity_form_state_defaults($entity, $operation, $language->langcode);
-  $form_state['translation_entity']['translation_form'] = TRUE;
   $form_id = entity_form_id($entity);
   return drupal_build_form($form_id, $form_state);
 }
@@ -293,8 +256,7 @@ function translation_entity_delete_confirm_submit(array $form, array &$form_stat
 
   // Remove any existing path alias for the removed translation.
   if (module_exists('path')) {
-    $conditions = array('source' => $controller->getViewPath($entity), 'langcode' => $language->langcode);
-    drupal_container()->get('path.crud')->delete($conditions);
+    path_delete(array('source' => $controller->getViewPath($entity), 'langcode' => $language->langcode));
   }
 
   $form_state['redirect'] = $controller->getBasePath($entity) . '/translations';
diff --git a/core/modules/user/config/user.schema.yml b/core/modules/user/config/user.schema.yml
deleted file mode 100644
index 6af7471..0000000
--- a/core/modules/user/config/user.schema.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-# User module schema: user.schema.yml
-
-# User mails.
-user.mail:
- type: mapping
- mapping:
-  "cancel_confirm":
-    type: mail
-    label: "Account cancellation confirmation"
-  "password_reset":
-    type: mail
-    label: "Password reset email"
-  "register_admin_created":
-    type: mail
-    label: "Account created by administrator"
-  "register_no_approval_required":
-    type: mail
-    label: "Registration confirmation (No approval required)"
-  "register_pending_approval":
-    type: mail
-    label: "Registration confirmation (Pending approval)"
-  "status_activated":
-    type: mail
-    label: "Account activation"
-  "status_blocked":
-    type: mail
-    label: "Account blocked"
-  "status_canceled":
-    type: mail
-    label: "Account cancelled"
-
-# User settings.
-user.settings:
-  type: mapping
-  mapping:
-    "admin_role":
-      type: string
-      label: "Administrator role"
-    "anonymous":
-      type: label
-      label: "Anonymous name"
-    "verify_mail":
-      type: boolean
-      label: "Verify mail"
-    "notify":
-      type: mapping
-      label: "Notify user"
-      mapping:
-        "cancel_confirm":
-          type: boolean
-        "password_reset":
-          type: boolean
-        "status_activated":
-          type: boolean
-        "status_blocked":
-          type: boolean
-        "status_cancelled":
-          type: boolean
-        "register_admin_created":
-          type: boolean
-        "register_no_approval_required":
-          type: boolean
-        "register_pending_approval":
-          type: boolean
-    "register":
-      type: string
-      enum: [visitors, admin_only, visitors_admin_approval]
-    "signatures":
-      type: boolean
-      label: "User signatures"
-    "cancel_method":
-      type: string
-      label: "User cancel method"
-    "password_reset_timeout":
-      type: integer
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserTranslationUITest.php b/core/modules/user/lib/Drupal/user/Tests/UserTranslationUITest.php
index 3b97557..1b6160a 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserTranslationUITest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserTranslationUITest.php
@@ -34,6 +34,9 @@ public static function getInfo() {
     );
   }
 
+  /**
+   * Overrides \Drupal\simpletest\WebTestBase::setUp().
+   */
   function setUp() {
     $this->entityType = 'user';
     $this->testLanguageSelector = FALSE;
@@ -45,7 +48,7 @@ function setUp() {
    * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::getTranslatorPermission().
    */
   function getTranslatorPermissions() {
-    return array_merge(parent::getTranslatorPermissions(), array('administer users'));
+    return array('administer users', "translate $this->entityType entities", 'edit original values');
   }
 
   /**
@@ -60,7 +63,7 @@ protected function getNewEntityValues($langcode) {
    * Tests translate link on user admin list.
    */
   function testTranslateLinkUserAdminPage() {
-    $this->admin_user = $this->drupalCreateUser(array_merge(parent::getTranslatorPermissions(), array('access administration pages', 'administer users')));
+    $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer users', 'translate any entity'));
     $this->drupalLogin($this->admin_user);
 
     $uid = $this->createEntity(array('name' => $this->randomName()), $this->langcodes[0]);
diff --git a/core/modules/views/config/views.schema.yml b/core/modules/views/config/views.schema.yml
deleted file mode 100644
index 59c90a5..0000000
--- a/core/modules/views/config/views.schema.yml
+++ /dev/null
@@ -1,232 +0,0 @@
-# View definition (multiple)
-views.view.*:
-  type: mapping
-  label: 'View'
-  mapping:
-    disabled:
-      type: boolean
-      label: 'Disabled'
-    api_version:
-      label: 'API version'
-    module:
-      label: 'Module'
-    name:
-      label: 'Machine name'
-    description:
-      type: text
-      label: 'Administrative description'
-    tag:
-      label: 'Tag'
-    base_table:
-      label: 'Base table'
-    base_field:
-      label: 'Base field'
-    human_name:
-      type: label
-      label: 'Human readable name'
-    core:
-      label: 'Drupal version'
-    uuid:
-      label: 'UUID'
-    display:
-      type: sequence
-      label: 'Displays'
-      sequence:
-        - type: mapping
-          label: 'Display settings'
-          mapping:
-            id:
-              label: 'Machine name'
-            display_title:
-              type: text
-              label: 'Title'
-            display_plugin:
-              label: 'Display plugin'
-            position:
-              type: integer
-              label: 'Position'
-            display_options:
-              type: 'views.display.[%parent.display_plugin]'
-
-# Views display: common
-# Options for Drupal\views\Plugin\views\display\DisplayPluginBase
-views.display.*:
-  type: mapping
-  label: 'Display options'
-  mapping:
-    title:
-      type: text
-      label: 'Display title'
-    format:
-      label: 'Format'
-    fields:
-      type: sequence
-      label: 'Fields'
-      sequence:
-        - type: 'views.field.[table]-[field]'
-    pager:
-      type: mapping
-      label: 'Pager'
-      mapping:
-        type:
-          label: 'Pager type'
-        options:
-          type: mapping
-          label: 'Options'
-          mapping:
-            offset:
-              type: integer
-              label: 'Offset'
-
-    exposed_form:
-      type: mapping
-      label: 'Exposed form'
-      mapping:
-        type:
-          label: 'Exposed form type'
-    access:
-      type: mapping
-      label: 'Access'
-      mapping:
-        type:
-          label: 'Access type'
-    other:
-      label: 'Other'
-    cache:
-      type: mapping
-      label: 'Cache'
-      mapping:
-        type:
-          label: 'Cache type'
-    sorts:
-      type: sequence
-      label: 'Sorts'
-      sequence:
-        - type: 'views.sort.[table]-[field]'
-    arguments:
-      type: sequence
-      label: 'Arguments'
-      sequence:
-        - type: 'views.argument.[table]-[field]'
-    filters:
-      type: sequence
-      label: 'Filters'
-      sequence:
-        - type: 'views.filter.[table]-[field]'
-    style:
-      type: mapping
-      label: 'Style'
-      mapping:
-        type:
-          label: 'Type'
-    row:
-      type: mapping
-      label: 'Row'
-      mapping:
-        type:
-          label: 'Row type'
-        options:
-          include: 'views.row.[%parent.type]'
-    query:
-      type: mapping
-      label: 'Query'
-      mapping:
-        type:
-          label: 'Query type'
-        options:
-          type: mapping
-          label: 'Query options'
-          mapping:
-            query_comment:
-              type: boolean
-              label: 'Query comment'
-    defaults:
-      type: mapping
-      label: 'Defaults'
-      mapping:
-        style_plugin:
-          label: 'Style plugin'
-        style_options:
-          type: 'views.style.[%parent.style_plugin]'
-        row_plugin:
-          label: 'Row plugin'
-        row_options:
-          type: 'views.style.[%parent.row_plugin]'
-    relationships:
-      type: sequence
-      label: 'Relationships'
-      sequence:
-        - type: 'views.relationship.[table]-[field]'
-
-# Options for Drupal\views\Plugin\views\display\PathPluginBase
-views.display.PathPluginBase:
-  include: 'views.display.%'
-  type: mapping
-  mapping:
-    path:
-      type: string
-      label: 'Page path'
-
-# Views display plugin: Drupal\views\Plugin\views\display\Page
-views.display.page:
-  type: 'views.display.PathPluginBase'
-  label: 'Page display options'
-  mapping:
-    menu:
-      type: mapping
-      label: 'Menu'
-      mapping:
-        type:
-          label: 'Type'
-        title:
-          type: text
-          label: 'Title'
-        description:
-          type: text
-          label: 'Description'
-        weight:
-          type: integer
-          label: 'Weight'
-        name:
-          label: 'Menu name'
-        context:
-          label: 'Context'
-    tab_options:
-      type: mapping
-      label: 'Tab options'
-      mapping:
-        type:
-          label: 'Type'
-        title:
-          type: text
-          label: 'Title'
-        description:
-          type: text
-          label: 'Description'
-        weight:
-          type: integer
-          label: 'Weight'
-        name:
-          label: 'Menu name'
-
-# Views display plugin: Drupal\views\Plugin\views\display\Block
-views.display.block:
-  type: 'views.display.%'
-  label: 'Block display options'
-  mapping:
-    block_description:
-      type: text
-      label: 'Block name'
-    block_caching:
-      label: 'Block caching'
-
-# Views display plugin: Drupal\views\Plugin\views\display\Feed
-views.display.feed:
-  type: 'views.display.PathPluginBase'
-  label: 'Feed display options'
-  mapping:
-    sitename_title:
-      type: boolean
-      label: 'Use the site name for the title'
-    displays:
-      label: 'The feed icon will be available only to the selected displays.'
diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php
index 14fc64a..626a55f 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php
@@ -30,7 +30,7 @@ public function __construct($type) {
     $this->discovery = new AlterDecorator($this->discovery, 'views_plugins_' . $type);
     $this->discovery = new CacheDecorator($this->discovery, 'views:' . $type, 'views_info');
 
-    $this->factory = new DefaultFactory($this->discovery);
+    $this->factory = new DefaultFactory($this);
 
     $this->defaults += array(
       'parent' => 'parent',
diff --git a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php
index 6eaef35..c861095 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsBlock.php
@@ -78,35 +78,9 @@ public function build() {
     $this->entity->set('label', filter_xss_admin($this->view->getTitle()));
     // Before returning the block output, convert it to a renderable array
     // with contextual links.
-    $this->addContextualLinks($output);
-
+    views_add_block_contextual_links($output, $this->view, $this->displayID);
     $this->view->destroy();
     return $output;
   }
 
-  /**
-   * Converts Views block content to a renderable array with contextual links.
-   *
-   * @param string|array $output
-   *   An string|array representing the block. This will be modified to be a
-   *   renderable array, containing the optional '#contextual_links' property (if
-   *   there are any contextual links associated with the block).
-   * @param string $block_type
-   *   The type of the block. If it's 'block' it's a regular views display,
-   *   but 'exposed_filter' exist as well.
-   */
-  protected function addContextualLinks(&$output, $block_type = 'block') {
-    // Do not add contextual links to an empty block.
-    if (!empty($output)) {
-      // Contextual links only work on blocks whose content is a renderable
-      // array, so if the block contains a string of already-rendered markup,
-      // convert it to an array.
-      if (is_string($output)) {
-        $output = array('#markup' => $output);
-      }
-      // Add the contextual links.
-      views_add_contextual_links($output, $block_type, $this->view, $this->displayID);
-    }
-  }
-
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php
index f74ebf1..0330de9 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/block/block/ViewsExposedFilterBlock.php
@@ -26,11 +26,11 @@ class ViewsExposedFilterBlock extends ViewsBlock {
    * Implements \Drupal\block\BlockBase::build().
    */
   public function build() {
-    $output = $this->view->display_handler->viewExposedFormBlocks();
+    $type = 'exp';
+    $output = $this->view->display_handler->viewSpecialBlocks($type);
     // Before returning the block output, convert it to a renderable array with
     // contextual links.
-    $this->addContextualLinks($output, 'exposed_filter');
-
+    views_add_block_contextual_links($output, $this->view, $this->display_id, 'special_block_' . $type);
     $this->view->destroy();
     return $output;
   }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index 0c4d150..fe258d9 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -2646,21 +2646,20 @@ public function getSpecialBlocks() {
   }
 
   /**
-   * Render the exposed form as block.
-   *
-   * @return string|NULL
-   *  The rendered exposed form as string or NULL otherwise.
+   * Render any special blocks provided for this display.
    */
-  public function viewExposedFormBlocks() {
-    // avoid interfering with the admin forms.
-    if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'views') {
-      return;
-    }
-    $this->view->initHandlers();
+  public function viewSpecialBlocks($type) {
+    if ($type == 'exp') {
+      // avoid interfering with the admin forms.
+      if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'views') {
+        return;
+      }
+      $this->view->initHandlers();
 
-    if ($this->usesExposed() && $this->getOption('exposed_block')) {
-      $exposed_form = $this->getPlugin('exposed_form');
-      return $exposed_form->render_exposed_form(TRUE);
+      if ($this->usesExposed() && $this->getOption('exposed_block')) {
+        $exposed_form = $this->getPlugin('exposed_form');
+        return $exposed_form->render_exposed_form(TRUE);
+      }
     }
   }
 
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index dc565b8..213f12a 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -504,6 +504,38 @@ function views_contextual_links_view_alter(&$element, $items) {
 }
 
 /**
+ * Converts Views block content to a renderable array with contextual links.
+ *
+ * @param $block
+ *   An array representing the block, with the same structure as the return
+ *   value of hook_block_view(). This will be modified so as to force
+ *   $block['content'] to be a renderable array, containing the optional
+ *   '#contextual_links' property (if there are any contextual links associated
+ *   with the block).
+ * @param $view
+ *   The view that was used to generate the block content.
+ * @param $display_id
+ *   The ID of the display within the view that was used to generate the block
+ *   content.
+ * @param $block_type
+ *   The type of the block. If it's block it's a regular views display,
+ *   but 'special_block_-exp' exist as well.
+ */
+function views_add_block_contextual_links(&$block, ViewExecutable $view, $display_id, $block_type = 'block') {
+  // Do not add contextual links to an empty block.
+  if (!empty($block)) {
+    // Contextual links only work on blocks whose content is a renderable
+    // array, so if the block contains a string of already-rendered markup,
+    // convert it to an array.
+    if (is_string($block)) {
+      $block = array('#markup' => $block);
+    }
+    // Add the contextual links.
+    views_add_contextual_links($block, $block_type, $view, $display_id);
+  }
+}
+
+/**
  * Adds contextual links associated with a view display to a renderable array.
  *
  * This function should be called when a view is being rendered in a particular
@@ -588,7 +620,7 @@ function views_add_contextual_links(&$render_element, $location, ViewExecutable
     }
 
     // On exposed_forms blocks contextual links should always be visible.
-    $plugin['contextual_links_locations'][] = 'exposed_filter';
+    $plugin['contextual_links_locations'][] = 'special_block_-exp';
     $has_links = !empty($plugin['contextual links']) && !empty($plugin['contextual_links_locations']);
     if ($has_links && in_array($location, $plugin['contextual_links_locations'])) {
       foreach ($plugin['contextual links'] as $module => $link) {
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 3609bd7..281300b 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -69,8 +69,8 @@
 simpletest_script_reporter_init();
 
 // Execute tests.
-for ($i = 0; $i < $args['repeat']; $i++) {
-  simpletest_script_execute_batch($test_list);
+for($test_run = 0; $test_run < $args['repeat']; $test_run++) {
+  simpletest_script_execute_batch(simpletest_script_get_test_list());
 }
 
 // Stop the timer.
@@ -152,10 +152,9 @@ function simpletest_script_help() {
 
   --die-on-fail
 
-              Exit test execution immediately upon any failed assertion. This
-              allows to access the test site by changing settings.php to use the
-              test database and configuration directories. Use in combination
-              with --repeat for debugging random test failures.
+              Exit out of php execution immediately on fail. This allows user to
+              change settings.php to use simpletest created databases and debug
+              failure. This is often used with repeat to find random failures.
 
   <test1>[,<test2>[,<test3> ...]]
 
@@ -213,6 +212,9 @@ function simpletest_script_parse_args() {
   // Override with set values.
   $args['script'] = basename(array_shift($_SERVER['argv']));
 
+  // Provide a default for repeat argument.
+  $args['repeat'] = 1;
+
   $count = 0;
   while ($arg = array_shift($_SERVER['argv'])) {
     if (preg_match('/--(\S+)/', $arg, $matches)) {
@@ -366,9 +368,7 @@ function simpletest_script_execute_batch($test_classes) {
             $public_files = variable_get('file_public_path', conf_path() . '/files');
             $test_directory = $public_files . '/simpletest/' . substr($db_prefix, 10);
             echo 'Simpletest database and files kept and test exited immediately on fail so should be reproducible if you change settings.php to use the database prefix '. $db_prefix . ' and config directories in '. $test_directory . "\n";
-            $args['keep-results'] = TRUE;
-            // Exit repeat loop immediately.
-            $args['repeat'] = -1;
+            exit();
           }
         }
         // Free-up space by removing any potentially created resources.
@@ -398,9 +398,9 @@ function simpletest_script_run_one_test($test_id, $test_class) {
     // Override configuration according to command line parameters.
     $conf['simpletest.settings']['verbose'] = $args['verbose'];
     $conf['simpletest.settings']['clear_results'] = !$args['keep-results'];
+    $conf['simpletest.settings']['die_on_fail'] = $args['die-on-fail'];
 
     $test = new $test_class($test_id);
-    $test->dieOnFail = (bool) $args['die-on-fail'];
     $test->run();
     $info = $test->getInfo();
 
diff --git a/core/themes/bartik/css/layout.css b/core/themes/bartik/css/layout.css
index 8c1ff95..4817eef 100644
--- a/core/themes/bartik/css/layout.css
+++ b/core/themes/bartik/css/layout.css
@@ -161,9 +161,6 @@ body,
   .one-sidebar #content {
     width: 75%;
   }
-  .no-sidebars #content {
-    width: 100%;
-  }
   .sidebar-first #content {
     margin-left: 25%;
     margin-right: 0;
diff --git a/core/themes/bartik/templates/comment-wrapper.tpl.php b/core/themes/bartik/templates/comment-wrapper.tpl.php
index fd8dfa7..764f91e 100644
--- a/core/themes/bartik/templates/comment-wrapper.tpl.php
+++ b/core/themes/bartik/templates/comment-wrapper.tpl.php
@@ -32,7 +32,7 @@
  * @ingroup themeable
  */
 ?>
-<section id="comments" <?php print $attributes; ?>>
+<div id="comments" <?php print $attributes; ?>>
   <?php if ($content['comments'] && $node->type != 'forum'): ?>
     <?php print render($title_prefix); ?>
     <h2 class="title"><?php print t('Comments'); ?></h2>
@@ -45,4 +45,4 @@
     <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
     <?php print render($content['comment_form']); ?>
   <?php endif; ?>
-</section>
+</div>
diff --git a/core/themes/bartik/templates/comment.tpl.php b/core/themes/bartik/templates/comment.tpl.php
index a8c4924..2b285d2 100644
--- a/core/themes/bartik/templates/comment.tpl.php
+++ b/core/themes/bartik/templates/comment.tpl.php
@@ -68,68 +68,59 @@
  * @ingroup themeable
  */
 ?>
-<article class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article">
+<div class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
 
-  <header class="comment-header">
+  <div class="attribution">
 
-    <div class="attribution">
-      <?php print render($user_picture); ?>
+    <?php print render($user_picture); ?>
 
-      <div class="submitted">
-        <p class="commenter-name">
-          <?php print $author; ?>
-        </p>
-        <p class="comment-time">
-          <?php print $created; ?>
-        </p>
-        <p class="comment-permalink">
-          <?php print $permalink; ?>
-        </p>
-        <?php
-          // Indicate the semantic relationship between parent and child comments
-          // for accessibility. The list is difficult to navigate in a screen
-          // reader without this information.
-          if ($parent):
-        ?>
-        <p class="comment-parent element-invisible">
-          <?php print $parent; ?>
-        </p>
-        <?php endif; ?>
-      </div>
-    </div> <!-- /.attribution -->
-
-    <div class="comment-text">
-      <div class="comment-arrow"></div>
-
-      <?php if ($new): ?>
-        <span class="new"><?php print $new; ?></span>
+    <div class="submitted">
+      <p class="commenter-name">
+        <?php print $author; ?>
+      </p>
+      <p class="comment-time">
+        <?php print $created; ?>
+      </p>
+      <p class="comment-permalink">
+        <?php print $permalink; ?>
+      </p>
+      <?php
+        // Indicate the semantic relationship between parent and child comments
+        // for accessibility. The list is difficult to navigate in a screen
+        // reader without this information.
+        if ($parent):
+      ?>
+      <p class="comment-parent element-invisible">
+        <?php print $parent; ?>
+      </p>
       <?php endif; ?>
+    </div>
+  </div>
 
-      <?php print render($title_prefix); ?>
-      <h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
-      <?php print render($title_suffix); ?>
-    </div> <!-- /.comment-text -->
+  <div class="comment-text">
+    <div class="comment-arrow"></div>
 
-  </header> <!-- /.comment-header -->
+    <?php if ($new): ?>
+      <span class="new"><?php print $new; ?></span>
+    <?php endif; ?>
 
-  <div class="content"<?php print $content_attributes; ?>>
-    <?php
-      // We hide the comments and links now so that we can render them later.
-      hide($content['links']);
-      print render($content);
-    ?>
-  </div> <!-- /.content -->
+    <?php print render($title_prefix); ?>
+    <h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
+    <?php print render($title_suffix); ?>
 
-  <footer class="comment-footer">
-    <?php if ($signature): ?>
+    <div class="content"<?php print $content_attributes; ?>>
+      <?php
+        // We hide the comments and links now so that we can render them later.
+        hide($content['links']);
+        print render($content);
+      ?>
+      <?php if ($signature): ?>
       <div class="user-signature clearfix">
         <?php print $signature; ?>
       </div>
-    <?php endif; ?>
-
-    <nav>
-      <?php print render($content['links']); ?>
-    </nav>
-  </footer> <!-- /.comment-footer -->
+      <?php endif; ?>
+    </div> <!-- /.content -->
 
-</article>
+    <?php print render($content['links']); ?>
+  </div> <!-- /.comment-text -->
+</div>
diff --git a/core/themes/bartik/templates/maintenance-page.tpl.php b/core/themes/bartik/templates/maintenance-page.tpl.php
index 8e56378..caf1611 100644
--- a/core/themes/bartik/templates/maintenance-page.tpl.php
+++ b/core/themes/bartik/templates/maintenance-page.tpl.php
@@ -13,8 +13,9 @@
  * @ingroup themeable
  */
 ?>
-<!DOCTYPE html>
-<html lang="<?php print $language->langcode; ?>" dir="<?php print $language->dir; ?>">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->langcode; ?>" lang="<?php print $language->langcode; ?>" dir="<?php print $language->dir; ?>">
 <head>
   <?php print $head; ?>
   <title><?php print $head_title; ?></title>
@@ -29,7 +30,7 @@
 
   <div id="page-wrapper"><div id="page">
 
-    <header id="header" role="banner"><div class="section clearfix">
+    <div id="header"><div class="section clearfix">
       <?php if ($site_name || $site_slogan): ?>
         <div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>>
           <?php if ($site_name): ?>
@@ -46,10 +47,10 @@
           <?php endif; ?>
         </div> <!-- /#name-and-slogan -->
       <?php endif; ?>
-    </div></header> <!-- /.section, /#header -->
+    </div></div> <!-- /.section, /#header -->
 
     <div id="main-wrapper"><div id="main" class="clearfix">
-      <main id="content" class="column" role="main"><section class="section">
+      <div id="content" class="column"><div class="section">
         <a id="main-content"></a>
         <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
         <?php print $content; ?>
@@ -58,7 +59,7 @@
             <?php print $messages; ?>
           </div></div> <!-- /.section, /#messages -->
         <?php endif; ?>
-      </section></main> <!-- /.section, /#content -->
+      </div></div> <!-- /.section, /#content -->
     </div></div> <!-- /#main, /#main-wrapper -->
 
   </div></div> <!-- /#page, /#page-wrapper -->
diff --git a/core/themes/bartik/templates/node.tpl.php b/core/themes/bartik/templates/node.tpl.php
index d32f9ac..0038e92 100644
--- a/core/themes/bartik/templates/node.tpl.php
+++ b/core/themes/bartik/templates/node.tpl.php
@@ -76,24 +76,22 @@
  * @ingroup themeable
  */
 ?>
-<article id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article">
+<div id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
 
-  <header>
-    <?php print render($title_prefix); ?>
-    <?php if (!$page): ?>
-      <h2<?php print $title_attributes; ?>>
-        <a href="<?php print $node_url; ?>"><?php print $label; ?></a>
-      </h2>
-    <?php endif; ?>
-    <?php print render($title_suffix); ?>
+  <?php print render($title_prefix); ?>
+  <?php if (!$page): ?>
+    <h2<?php print $title_attributes; ?>>
+      <a href="<?php print $node_url; ?>"><?php print $label; ?></a>
+    </h2>
+  <?php endif; ?>
+  <?php print render($title_suffix); ?>
 
-    <?php if ($display_submitted): ?>
-      <div class="meta submitted">
-        <?php print render($user_picture); ?>
-        <?php print $submitted; ?>
-      </div>
-    <?php endif; ?>
-  </header>
+  <?php if ($display_submitted): ?>
+    <div class="meta submitted">
+      <?php print render($user_picture); ?>
+      <?php print $submitted; ?>
+    </div>
+  <?php endif; ?>
 
   <div class="content clearfix"<?php print $content_attributes; ?>>
     <?php
@@ -110,15 +108,15 @@
     if ($teaser || !empty($content['comments']['comment_form'])) {
       unset($content['links']['comment']['#links']['comment-add']);
     }
-    // Only display the footer if there are links.
+    // Only display the wrapper div if there are links.
     $links = render($content['links']);
     if ($links):
   ?>
-    <footer class="link-wrapper">
+    <div class="link-wrapper">
       <?php print $links; ?>
-    </footer>
+    </div>
   <?php endif; ?>
 
   <?php print render($content['comments']); ?>
 
-</article>
+</div>
diff --git a/core/themes/bartik/templates/page.tpl.php b/core/themes/bartik/templates/page.tpl.php
index 08cc357..2d5deec 100644
--- a/core/themes/bartik/templates/page.tpl.php
+++ b/core/themes/bartik/templates/page.tpl.php
@@ -89,9 +89,9 @@
 ?>
 <div id="page-wrapper"><div id="page">
 
-  <header id="header" class="<?php print $secondary_menu ? 'with-secondary-menu': 'without-secondary-menu'; ?>" role="banner"><div class="section clearfix">
+  <div id="header" class="<?php print $secondary_menu ? 'with-secondary-menu': 'without-secondary-menu'; ?>" role="banner"><div class="section clearfix">
     <?php if ($secondary_menu): ?>
-      <nav id="secondary-menu" class="navigation" role="navigation">
+      <div id="secondary-menu" class="navigation" role="navigation">
         <?php print theme('links__system_secondary_menu', array(
           'links' => $secondary_menu,
           'attributes' => array(
@@ -104,7 +104,7 @@
             'class' => array('element-invisible'),
           ),
         )); ?>
-      </nav> <!-- /#secondary-menu -->
+      </div> <!-- /#secondary-menu -->
     <?php endif; ?>
 
 
@@ -143,7 +143,7 @@
     <?php print render($page['header']); ?>
 
     <?php if ($main_menu): ?>
-      <nav id="main-menu" class="navigation" role="navigation">
+      <div id="main-menu" class="navigation" role="navigation">
         <?php print theme('links__system_main_menu', array(
           'links' => $main_menu,
           'attributes' => array(
@@ -156,12 +156,12 @@
             'class' => array('element-invisible'),
           ),
         )); ?>
-      </nav> <!-- /#main-menu -->
+      </div> <!-- /#main-menu -->
     <?php endif; ?>
 
 
 
-  </div></header> <!-- /.section, /#header -->
+  </div></div> <!-- /.section, /#header -->
 
   <?php if ($messages): ?>
     <div id="messages"><div class="section clearfix">
@@ -170,16 +170,16 @@
   <?php endif; ?>
 
   <?php if ($page['featured']): ?>
-    <aside id="featured"><div class="section clearfix">
+    <div id="featured"><div class="section clearfix">
       <?php print render($page['featured']); ?>
-    </div></aside> <!-- /.section, /#featured -->
+    </div></div> <!-- /.section, /#featured -->
   <?php endif; ?>
 
   <div id="main-wrapper" class="clearfix"><div id="main" class="clearfix">
 
     <?php print $breadcrumb; ?>
 
-    <main id="content" class="column" role="main"><section class="section">
+    <div id="content" class="column" role="main"><div class="section">
       <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
       <a id="main-content"></a>
       <?php print render($title_prefix); ?>
@@ -190,9 +190,9 @@
       <?php endif; ?>
       <?php print render($title_suffix); ?>
       <?php if ($tabs): ?>
-        <nav class="tabs" role="navigation">
+        <div class="tabs">
           <?php print render($tabs); ?>
-        </nav>
+        </div>
       <?php endif; ?>
       <?php print render($page['help']); ?>
       <?php if ($action_links): ?>
@@ -203,31 +203,31 @@
       <?php print render($page['content']); ?>
       <?php print $feed_icons; ?>
 
-    </section></main> <!-- /.section, /#content -->
+    </div></div> <!-- /.section, /#content -->
 
     <?php if ($page['sidebar_first']): ?>
-      <div id="sidebar-first" class="column sidebar"><aside class="section">
+      <div id="sidebar-first" class="column sidebar"><div class="section">
         <?php print render($page['sidebar_first']); ?>
-      </aside></div> <!-- /.section, /#sidebar-first -->
+      </div></div> <!-- /.section, /#sidebar-first -->
     <?php endif; ?>
 
     <?php if ($page['sidebar_second']): ?>
-      <div id="sidebar-second" class="column sidebar"><aside class="section">
+      <div id="sidebar-second" class="column sidebar"><div class="section">
         <?php print render($page['sidebar_second']); ?>
-      </aside></div> <!-- /.section, /#sidebar-second -->
+      </div></div> <!-- /.section, /#sidebar-second -->
     <?php endif; ?>
 
   </div></div> <!-- /#main, /#main-wrapper -->
 
   <?php if ($page['triptych_first'] || $page['triptych_middle'] || $page['triptych_last']): ?>
-    <div id="triptych-wrapper"><aside id="triptych" class="clearfix">
+    <div id="triptych-wrapper"><div id="triptych" class="clearfix">
       <?php print render($page['triptych_first']); ?>
       <?php print render($page['triptych_middle']); ?>
       <?php print render($page['triptych_last']); ?>
-    </aside></div> <!-- /#triptych, /#triptych-wrapper -->
+    </div></div> <!-- /#triptych, /#triptych-wrapper -->
   <?php endif; ?>
 
-  <div id="footer-wrapper"><footer class="section" role="contentinfo">
+  <div id="footer-wrapper"><div class="section">
 
     <?php if ($page['footer_firstcolumn'] || $page['footer_secondcolumn'] || $page['footer_thirdcolumn'] || $page['footer_fourthcolumn']): ?>
       <div id="footer-columns" class="clearfix">
@@ -244,6 +244,6 @@
       </div> <!-- /#footer -->
     <?php endif; ?>
 
-  </footer></div> <!-- /.section, /#footer-wrapper -->
+  </div></div> <!-- /.section, /#footer-wrapper -->
 
 </div></div> <!-- /#page, /#page-wrapper -->
diff --git a/core/vendor/autoload.php b/core/vendor/autoload.php
index 6842a6a..7c1e59b 100644
--- a/core/vendor/autoload.php
+++ b/core/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74::getLoader();
+return ComposerAutoloaderInitb72eabc903127a0c876d43163fd09a25::getLoader();
diff --git a/core/vendor/composer/ClassLoader.php b/core/vendor/composer/ClassLoader.php
index 596c65d..a4a0dc5 100644
--- a/core/vendor/composer/ClassLoader.php
+++ b/core/vendor/composer/ClassLoader.php
@@ -75,64 +75,31 @@ public function addClassMap(array $classMap)
     }
 
     /**
-     * Registers a set of classes, merging with any others previously set.
+     * Registers a set of classes
      *
-     * @param string       $prefix  The classes prefix
-     * @param array|string $paths   The location(s) of the classes
-     * @param bool         $prepend Prepend the location(s)
+     * @param string       $prefix The classes prefix
+     * @param array|string $paths  The location(s) of the classes
      */
-    public function add($prefix, $paths, $prepend = false)
+    public function add($prefix, $paths)
     {
         if (!$prefix) {
-            if ($prepend) {
-                $this->fallbackDirs = array_merge(
-                    (array) $paths,
-                    $this->fallbackDirs
-                );
-            } else {
-                $this->fallbackDirs = array_merge(
-                    $this->fallbackDirs,
-                    (array) $paths
-                );
+            foreach ((array) $paths as $path) {
+                $this->fallbackDirs[] = $path;
             }
 
             return;
         }
-        if (!isset($this->prefixes[$prefix])) {
-            $this->prefixes[$prefix] = (array) $paths;
-
-            return;
-        }
-        if ($prepend) {
-            $this->prefixes[$prefix] = array_merge(
-                (array) $paths,
-                $this->prefixes[$prefix]
-            );
-        } else {
+        if (isset($this->prefixes[$prefix])) {
             $this->prefixes[$prefix] = array_merge(
                 $this->prefixes[$prefix],
                 (array) $paths
             );
+        } else {
+            $this->prefixes[$prefix] = (array) $paths;
         }
     }
 
     /**
-     * Registers a set of classes, replacing any others previously set.
-     *
-     * @param string       $prefix  The classes prefix
-     * @param array|string $paths   The location(s) of the classes
-     */
-    public function set($prefix, $paths)
-    {
-        if (!$prefix) {
-            $this->fallbackDirs = (array) $paths;
-
-            return;
-        }
-        $this->prefixes[$prefix] = (array) $paths;
-    }
-
-    /**
      * Turns on searching the include path for class files.
      *
      * @param bool $useIncludePath
diff --git a/core/vendor/composer/autoload_real.php b/core/vendor/composer/autoload_real.php
index c5a6d37..8715df6 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 ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74
+class ComposerAutoloaderInitb72eabc903127a0c876d43163fd09a25
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ public static function getLoader()
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74', 'loadClassLoader'));
+        spl_autoload_register(array('ComposerAutoloaderInitb72eabc903127a0c876d43163fd09a25', 'loadClassLoader'));
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitb72eabc903127a0c876d43163fd09a25', 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);
@@ -36,7 +36,7 @@ public static function getLoader()
             $loader->addClassMap($classMap);
         }
 
-        $loader->register(true);
+        $loader->register();
 
         return $loader;
     }
diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json
index 35bd16b..1d85569 100644
--- a/core/vendor/composer/installed.json
+++ b/core/vendor/composer/installed.json
@@ -576,6 +576,55 @@
         "homepage": "http://symfony.com"
     },
     {
+        "name": "symfony/serializer",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "target-dir": "Symfony/Component/Serializer",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/symfony/Serializer",
+            "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://github.com/symfony/Serializer/archive/ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0.zip",
+            "reference": "ef3d92815bdb07281ee8cbd73b3e3f9e41bdc1a0",
+            "shasum": ""
+        },
+        "require": {
+            "php": ">=5.3.3"
+        },
+        "time": "2012-12-19 07:09:49",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.2-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Symfony\\Component\\Serializer\\": ""
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Fabien Potencier",
+                "email": "fabien@symfony.com"
+            },
+            {
+                "name": "Symfony Community",
+                "homepage": "http://symfony.com/contributors"
+            }
+        ],
+        "description": "Symfony Serializer Component",
+        "homepage": "http://symfony.com"
+    },
+    {
         "name": "symfony/yaml",
         "version": "dev-master",
         "version_normalized": "9999999-dev",
@@ -1050,54 +1099,5 @@
         ],
         "description": "Symfony Validator Component",
         "homepage": "http://symfony.com"
-    },
-    {
-        "name": "symfony/serializer",
-        "version": "v2.2.0-BETA2",
-        "version_normalized": "2.2.0.0-beta2",
-        "target-dir": "Symfony/Component/Serializer",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/symfony/Serializer",
-            "reference": "v2.2.0-BETA2"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://github.com/symfony/Serializer/archive/v2.2.0-BETA2.zip",
-            "reference": "v2.2.0-BETA2",
-            "shasum": ""
-        },
-        "require": {
-            "php": ">=5.3.3"
-        },
-        "time": "2013-01-19 07:50:02",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "2.2-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "Symfony\\Component\\Serializer\\": ""
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "license": [
-            "MIT"
-        ],
-        "authors": [
-            {
-                "name": "Fabien Potencier",
-                "email": "fabien@symfony.com"
-            },
-            {
-                "name": "Symfony Community",
-                "homepage": "http://symfony.com/contributors"
-            }
-        ],
-        "description": "Symfony Serializer Component",
-        "homepage": "http://symfony.com"
     }
 ]
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes b/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes
new file mode 100644
index 0000000..8048151
--- /dev/null
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/.gitattributes
@@ -0,0 +1,2 @@
+/Tests export-ignore
+phpunit.xml.dist export-ignore
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md b/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md
index 6ccf5e5..de46533 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/CHANGELOG.md
@@ -1,16 +1,6 @@
 CHANGELOG
 =========
 
-2.2.0
------
-
- * [BC BREAK] All Serializer, Normalizer and Encoder interfaces have been
-   modified to include an optional `$context` array parameter.
- * The XML Root name can now be configured with the `xml_root_name`
-   parameter in the context option to the `XmlEncoder`.
- * Options to `json_encode` and `json_decode` can be passed through
-   the context options of `JsonEncode` and `JsonDecode` encoder/decoders.
-
 2.1.0
 -----
 
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php
index 6ece3b2..f555c6a 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainDecoder.php
@@ -34,9 +34,9 @@ public function __construct(array $decoders = array())
     /**
      * {@inheritdoc}
      */
-    final public function decode($data, $format, array $context = array())
+    final public function decode($data, $format)
     {
-        return $this->getDecoder($format)->decode($data, $format, $context);
+        return $this->getDecoder($format)->decode($data, $format);
     }
 
     /**
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php
index bd10a2a..ebb81ef 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/ChainEncoder.php
@@ -35,9 +35,9 @@ public function __construct(array $encoders = array())
     /**
      * {@inheritdoc}
      */
-    final public function encode($data, $format, array $context = array())
+    final public function encode($data, $format)
     {
-        return $this->getEncoder($format)->encode($data, $format, $context);
+        return $this->getEncoder($format)->encode($data, $format);
     }
 
     /**
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php
index ffd221f..e95271f 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/DecoderInterface.php
@@ -23,11 +23,10 @@
      *
      * @param scalar $data   Data to decode
      * @param string $format Format name
-     * @param array  $context options that decoders have access to.
      *
      * @return mixed
      */
-    public function decode($data, $format, array $context = array());
+    public function decode($data, $format);
 
     /**
      * Checks whether the serializer can decode from given format
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php
index 2290db7..4a68ad3 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/EncoderInterface.php
@@ -23,11 +23,10 @@
      *
      * @param mixed  $data   Data to encode
      * @param string $format Format name
-     * @param array  $context options that normalizers/encoders have access to.
      *
      * @return scalar
      */
-    public function encode($data, $format, array $context = array());
+    public function encode($data, $format);
 
     /**
      * Checks whether the serializer can encode to given format
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php
index e7cd9e0..7ed8039 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonDecode.php
@@ -21,7 +21,6 @@ class JsonDecode implements DecoderInterface
     private $associative;
     private $recursionDepth;
     private $lastError = JSON_ERROR_NONE;
-    protected $serializer;
 
     public function __construct($associative = false, $depth = 512)
     {
@@ -49,20 +48,9 @@ public function getLastError()
      *
      * @return mixed
      */
-    public function decode($data, $format, array $context = array())
+    public function decode($data, $format)
     {
-        $context = $this->resolveContext($context);
-
-        $associative    = $context['json_decode_associative'];
-        $recursionDepth = $context['json_decode_recursion_depth'];
-        $options        = $context['json_decode_options'];
-
-        if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
-            $decodedData = json_decode($data, $associative, $recursionDepth, $options);
-        } else {
-            $decodedData = json_decode($data, $associative, $recursionDepth);
-        }
-
+        $decodedData = json_decode($data, $this->associative, $this->recursionDepth);
         $this->lastError = json_last_error();
 
         return $decodedData;
@@ -75,21 +63,4 @@ public function supportsDecoding($format)
     {
         return JsonEncoder::FORMAT === $format;
     }
-
-    /**
-     * Merge the default options of the Json Decoder with the passed context.
-     *
-     * @param array $context
-     * @return array
-     */
-    private function resolveContext(array $context)
-    {
-        $defaultOptions = array(
-            'json_decode_associative' => $this->associative,
-            'json_decode_recursion_depth' => $this->recursionDepth,
-            'json_decode_options' => 0
-        );
-
-        return array_merge($defaultOptions, $context);
-    }
 }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php
index 4e0de3e..280b8a9 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncode.php
@@ -41,13 +41,14 @@ public function getLastError()
     /**
      * Encodes PHP data to a JSON string
      *
-     * {@inheritdoc}
+     * @param mixed  $data
+     * @param string $format
+     *
+     * @return string
      */
-    public function encode($data, $format, array $context = array())
+    public function encode($data, $format)
     {
-        $context = $this->resolveContext($context);
-
-        $encodedJson = json_encode($data, $context['json_encode_options']);
+        $encodedJson = json_encode($data, $this->options);
         $this->lastError = json_last_error();
 
         return $encodedJson;
@@ -60,15 +61,4 @@ public function supportsEncoding($format)
     {
         return JsonEncoder::FORMAT === $format;
     }
-
-    /**
-     * Merge default json encode options with context.
-     *
-     * @param array $context
-     * @return array
-     */
-    private function resolveContext(array $context = array())
-    {
-        return array_merge(array('json_encode_options' => $this->options), $context);
-    }
 }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php
index 02b179b..73918b7 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/JsonEncoder.php
@@ -59,17 +59,17 @@ public function getLastDecodingError()
     /**
      * {@inheritdoc}
      */
-    public function encode($data, $format, array $context = array())
+    public function encode($data, $format)
     {
-        return $this->encodingImpl->encode($data, self::FORMAT, $context);
+        return $this->encodingImpl->encode($data, self::FORMAT);
     }
 
     /**
      * {@inheritdoc}
      */
-    public function decode($data, $format, array $context = array())
+    public function decode($data, $format)
     {
-        return $this->decodingImpl->decode($data, self::FORMAT, $context);
+        return $this->decodingImpl->decode($data, self::FORMAT);
     }
 
     /**
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php
index 909b3ce..11de50a 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Encoder/XmlEncoder.php
@@ -27,35 +27,23 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
     private $rootNodeName = 'response';
 
     /**
-     * Construct new XmlEncoder and allow to change the root node element name.
-     *
-     * @param string $rootNodeName
-     */
-    public function __construct($rootNodeName = 'response')
-    {
-        $this->rootNodeName = $rootNodeName;
-    }
-
-    /**
      * {@inheritdoc}
      */
-    public function encode($data, $format, array $context = array())
+    public function encode($data, $format)
     {
         if ($data instanceof \DOMDocument) {
             return $data->saveXML();
         }
 
-        $xmlRootNodeName = $this->resolveXmlRootName($context);
-
         $this->dom = new \DOMDocument();
         $this->format = $format;
 
         if (null !== $data && !is_scalar($data)) {
-            $root = $this->dom->createElement($xmlRootNodeName);
+            $root = $this->dom->createElement($this->rootNodeName);
             $this->dom->appendChild($root);
-            $this->buildXml($root, $data, $xmlRootNodeName);
+            $this->buildXml($root, $data);
         } else {
-            $this->appendNode($this->dom, $data, $xmlRootNodeName);
+            $this->appendNode($this->dom, $data, $this->rootNodeName);
         }
 
         return $this->dom->saveXML();
@@ -64,7 +52,7 @@ public function encode($data, $format, array $context = array())
     /**
      * {@inheritdoc}
      */
-    public function decode($data, $format, array $context = array())
+    public function decode($data, $format)
     {
         $internalErrors = libxml_use_internal_errors(true);
         $disableEntities = libxml_disable_entity_loader(true);
@@ -281,13 +269,12 @@ private function parseXml($node)
      *
      * @param DOMNode      $parentNode
      * @param array|object $data       data
-     * @param string       $xmlRootNodeName
      *
      * @return Boolean
      *
      * @throws UnexpectedValueException
      */
-    private function buildXml($parentNode, $data, $xmlRootNodeName)
+    private function buildXml($parentNode, $data)
     {
         $append = true;
 
@@ -323,24 +310,21 @@ private function buildXml($parentNode, $data, $xmlRootNodeName)
 
             return $append;
         }
-
         if (is_object($data)) {
             $data = $this->serializer->normalize($data, $this->format);
             if (null !== $data && !is_scalar($data)) {
-                return $this->buildXml($parentNode, $data, $xmlRootNodeName);
+                return $this->buildXml($parentNode, $data);
             }
-
             // top level data object was normalized into a scalar
             if (!$parentNode->parentNode->parentNode) {
                 $root = $parentNode->parentNode;
                 $root->removeChild($parentNode);
 
-                return $this->appendNode($root, $data, $xmlRootNodeName);
+                return $this->appendNode($root, $data, $this->rootNodeName);
             }
 
             return $this->appendNode($parentNode, $data, 'data');
         }
-
         throw new UnexpectedValueException('An unexpected value could not be serialized: '.var_export($data, true));
     }
 
@@ -392,7 +376,7 @@ private function needsCdataWrapping($val)
     private function selectNodeType($node, $val)
     {
         if (is_array($val)) {
-            return $this->buildXml($node, $val, null);
+            return $this->buildXml($node, $val);
         } elseif ($val instanceof \SimpleXMLElement) {
             $child = $this->dom->importNode(dom_import_simplexml($val), true);
             $node->appendChild($child);
@@ -415,15 +399,4 @@ private function selectNodeType($node, $val)
 
         return true;
     }
-
-    /**
-     * Get real XML root node name, taking serializer options into account.
-     */
-    private function resolveXmlRootName(array $context = array())
-    {
-        return isset($context['xml_root_node_name'])
-            ? $context['xml_root_node_name']
-            : $this->rootNodeName;
-    }
-
 }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE b/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE
index 88a57f8..cdffe7a 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2004-2013 Fabien Potencier
+Copyright (c) 2004-2012 Fabien Potencier
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php
index 0ebe00f..4510fa0 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php
@@ -19,18 +19,18 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn
     /**
      * {@inheritdoc}
      */
-    public function normalize($object, $format = null, array $context = array())
+    public function normalize($object, $format = null)
     {
-        return $object->normalize($this->serializer, $format, $context);
+        return $object->normalize($this->serializer, $format);
     }
 
     /**
      * {@inheritdoc}
      */
-    public function denormalize($data, $class, $format = null, array $context = array())
+    public function denormalize($data, $class, $format = null)
     {
         $object = new $class;
-        $object->denormalize($this->serializer, $data, $format, $context);
+        $object->denormalize($this->serializer, $data, $format);
 
         return $object;
     }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
index 5a1b4c1..3f3bf88 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php
@@ -32,7 +32,6 @@
      * @param array|scalar $data   The data from which to re-create the object.
      * @param string|null  $format The format is optionally given to be able to denormalize differently
      *   based on different input formats.
-     * @param array        $context options for denormalizing
      */
-    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array());
+    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null);
 }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
index 1a5ff93..384f9fe 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/DenormalizerInterface.php
@@ -24,11 +24,10 @@
      * @param mixed  $data   data to restore
      * @param string $class  the expected class to instantiate
      * @param string $format format the given data was extracted from
-     * @param array  $context options available to the denormalizer
      *
      * @return object
      */
-    public function denormalize($data, $class, $format = null, array $context = array());
+    public function denormalize($data, $class, $format = null);
 
     /**
      * Checks whether the given class is supported for denormalization by this normalizer
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
index 63e7a1d..2c5f1b3 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
@@ -69,7 +69,7 @@ public function setIgnoredAttributes(array $ignoredAttributes)
     /**
      * {@inheritdoc}
      */
-    public function normalize($object, $format = null, array $context = array())
+    public function normalize($object, $format = null)
     {
         $reflectionObject = new \ReflectionObject($object);
         $reflectionMethods = $reflectionObject->getMethods(\ReflectionMethod::IS_PUBLIC);
@@ -101,7 +101,7 @@ public function normalize($object, $format = null, array $context = array())
     /**
      * {@inheritdoc}
      */
-    public function denormalize($data, $class, $format = null, array $context = array())
+    public function denormalize($data, $class, $format = null)
     {
         $reflectionClass = new \ReflectionClass($class);
         $constructor = $reflectionClass->getConstructor();
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php
index 07c3a4a..fb77a83 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizableInterface.php
@@ -31,9 +31,8 @@
      *   can use it to normalize objects contained within this object.
      * @param string|null $format The format is optionally given to be able to normalize differently
      *   based on different output formats.
-     * @param array $context Options for normalizing this object
      *
      * @return array|scalar
      */
-    public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array());
+    public function normalize(NormalizerInterface $normalizer, $format = null);
 }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
index 744307a..f0915db 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php
@@ -23,11 +23,10 @@
      *
      * @param object $object object to normalize
      * @param string $format format the normalization result will be encoded as
-     * @param array $context Context options for the normalizer
      *
      * @return array|scalar
      */
-    public function normalize($object, $format = null, array $context = array());
+    public function normalize($object, $format = null);
 
     /**
      * Checks whether the given class is supported for normalization by this normalizer
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php
index ab6fd58..cad6963 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Serializer.php
@@ -39,8 +39,8 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
 {
     protected $encoder;
     protected $decoder;
-    protected $normalizers       = array();
-    protected $normalizerCache   = array();
+    protected $normalizers = array();
+    protected $normalizerCache = array();
     protected $denormalizerCache = array();
 
     public function __construct(array $normalizers = array(), array $encoders = array())
@@ -72,58 +72,58 @@ public function __construct(array $normalizers = array(), array $encoders = arra
     /**
      * {@inheritdoc}
      */
-    final public function serialize($data, $format, array $context = array())
+    final public function serialize($data, $format)
     {
         if (!$this->supportsEncoding($format)) {
             throw new UnexpectedValueException('Serialization for the format '.$format.' is not supported');
         }
 
         if ($this->encoder->needsNormalization($format)) {
-            $data = $this->normalize($data, $format, $context);
+            $data = $this->normalize($data, $format);
         }
 
-        return $this->encode($data, $format, $context);
+        return $this->encode($data, $format);
     }
 
     /**
      * {@inheritdoc}
      */
-    final public function deserialize($data, $type, $format, array $context = array())
+    final public function deserialize($data, $type, $format)
     {
         if (!$this->supportsDecoding($format)) {
             throw new UnexpectedValueException('Deserialization for the format '.$format.' is not supported');
         }
 
-        $data = $this->decode($data, $format, $context);
+        $data = $this->decode($data, $format);
 
-        return $this->denormalize($data, $type, $format, $context);
+        return $this->denormalize($data, $type, $format);
     }
 
     /**
      * {@inheritdoc}
      */
-    public function normalize($data, $format = null, array $context = array())
+    public function normalize($data, $format = null)
     {
         if (null === $data || is_scalar($data)) {
             return $data;
         }
         if (is_object($data) && $this->supportsNormalization($data, $format)) {
-            return $this->normalizeObject($data, $format, $context);
+            return $this->normalizeObject($data, $format);
         }
         if ($data instanceof \Traversable) {
             $normalized = array();
             foreach ($data as $key => $val) {
-                $normalized[$key] = $this->normalize($val, $format, $context);
+                $normalized[$key] = $this->normalize($val, $format);
             }
 
             return $normalized;
         }
         if (is_object($data)) {
-            return $this->normalizeObject($data, $format, $context);
+            return $this->normalizeObject($data, $format);
         }
         if (is_array($data)) {
             foreach ($data as $key => $val) {
-                $data[$key] = $this->normalize($val, $format, $context);
+                $data[$key] = $this->normalize($val, $format);
             }
 
             return $data;
@@ -134,9 +134,9 @@ public function normalize($data, $format = null, array $context = array())
     /**
      * {@inheritdoc}
      */
-    public function denormalize($data, $type, $format = null, array $context = array())
+    public function denormalize($data, $type, $format = null)
     {
-        return $this->denormalizeObject($data, $type, $format, $context);
+        return $this->denormalizeObject($data, $type, $format);
     }
 
     /**
@@ -202,17 +202,17 @@ private function getDenormalizer($data, $type, $format = null)
     /**
      * {@inheritdoc}
      */
-    final public function encode($data, $format, array $context = array())
+    final public function encode($data, $format)
     {
-        return $this->encoder->encode($data, $format, $context);
+        return $this->encoder->encode($data, $format);
     }
 
     /**
      * {@inheritdoc}
      */
-    final public function decode($data, $format, array $context = array())
+    final public function decode($data, $format)
     {
-        return $this->decoder->decode($data, $format, $context);
+        return $this->decoder->decode($data, $format);
     }
 
     /**
@@ -220,14 +220,13 @@ private function getDenormalizer($data, $type, $format = null)
      *
      * @param object $object object to normalize
      * @param string $format format name, present to give the option to normalizers to act differently based on formats
-     * @param array $context The context data for this particular normalization
      *
      * @return array|scalar
      *
      * @throws LogicException
      * @throws UnexpectedValueException
      */
-    private function normalizeObject($object, $format = null, array $context = array())
+    private function normalizeObject($object, $format = null)
     {
         if (!$this->normalizers) {
             throw new LogicException('You must register at least one normalizer to be able to normalize objects.');
@@ -235,14 +234,14 @@ private function normalizeObject($object, $format = null, array $context = array
 
         $class = get_class($object);
         if (isset($this->normalizerCache[$class][$format])) {
-            return $this->normalizerCache[$class][$format]->normalize($object, $format, $context);
+            return $this->normalizerCache[$class][$format]->normalize($object, $format);
         }
 
         foreach ($this->normalizers as $normalizer) {
             if ($normalizer->supportsNormalization($object, $format)) {
                 $this->normalizerCache[$class][$format] = $normalizer;
 
-                return $normalizer->normalize($object, $format, $context);
+                return $normalizer->normalize($object, $format);
             }
         }
 
@@ -255,28 +254,27 @@ private function normalizeObject($object, $format = null, array $context = array
      * @param mixed  $data   data to restore
      * @param string $class  the expected class to instantiate
      * @param string $format format name, present to give the option to normalizers to act differently based on formats
-     * @param array $context The context data for this particular denormalization
      *
      * @return object
      *
      * @throws LogicException
      * @throws UnexpectedValueException
      */
-    private function denormalizeObject($data, $class, $format = null, array $context = array())
+    private function denormalizeObject($data, $class, $format = null)
     {
         if (!$this->normalizers) {
             throw new LogicException('You must register at least one normalizer to be able to denormalize objects.');
         }
 
         if (isset($this->denormalizerCache[$class][$format])) {
-            return $this->denormalizerCache[$class][$format]->denormalize($data, $class, $format, $context);
+            return $this->denormalizerCache[$class][$format]->denormalize($data, $class, $format);
         }
 
         foreach ($this->normalizers as $normalizer) {
             if ($normalizer->supportsDenormalization($data, $class, $format)) {
                 $this->denormalizerCache[$class][$format] = $normalizer;
 
-                return $normalizer->denormalize($data, $class, $format, $context);
+                return $normalizer->denormalize($data, $class, $format);
             }
         }
 
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php
index d196d78..143179f 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/SerializerInterface.php
@@ -21,13 +21,12 @@
     /**
      * Serializes data in the appropriate format
      *
-     * @param mixed  $data    any data
-     * @param string $format  format name
-     * @param array  $context options normalizers/encoders have access to
+     * @param mixed  $data   any data
+     * @param string $format format name
      *
      * @return string
      */
-    public function serialize($data, $format, array $context = array());
+    public function serialize($data, $format);
 
     /**
      * Deserializes data into the given type.
@@ -35,9 +34,8 @@ public function serialize($data, $format, array $context = array());
      * @param mixed  $data
      * @param string $type
      * @param string $format
-     * @param array  $context
      *
      * @return object
      */
-    public function deserialize($data, $type, $format, array $context = array());
+    public function deserialize($data, $type, $format);
 }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php
deleted file mode 100644
index c2f6072..0000000
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Serializer\Tests\Encoder;
-
-use Symfony\Component\Serializer\Encoder\JsonEncoder;
-use Symfony\Component\Serializer\Serializer;
-use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
-
-class JsonEncoderTest extends \PHPUnit_Framework_TestCase
-{
-    protected function setUp()
-    {
-        $this->encoder = new JsonEncoder;
-        $this->serializer = new Serializer(array(new CustomNormalizer()), array('json' => new JsonEncoder()));
-    }
-
-    public function testEncodeScalar()
-    {
-        $obj = new \stdClass;
-        $obj->foo = "foo";
-
-        $expected = '{"foo":"foo"}';
-
-        $this->assertEquals($expected, $this->encoder->encode($obj, 'json'));
-    }
-
-    public function testComplexObject()
-    {
-        $obj = $this->getObject();
-
-        $expected = $this->getJsonSource();
-
-        $this->assertEquals($expected, $this->encoder->encode($obj, 'json'));
-    }
-
-    public function testOptions()
-    {
-        $context = array('json_encode_options' => JSON_NUMERIC_CHECK);
-
-        $arr = array();
-        $arr['foo'] = "3";
-
-        $expected = '{"foo":3}';
-
-        $this->assertEquals($expected, $this->serializer->serialize($arr, 'json', $context));
-
-        $arr = array();
-        $arr['foo'] = "3";
-
-        $expected = '{"foo":"3"}';
-
-        $this->assertEquals($expected, $this->serializer->serialize($arr, 'json'), 'Context should not be persistent');
-    }
-
-
-    protected function getJsonSource()
-    {
-        return '{"foo":"foo","bar":["a","b"],"baz":{"key":"val","key2":"val","A B":"bar","item":[{"title":"title1"},{"title":"title2"}],"Barry":{"FooBar":{"Baz":"Ed","@id":1}}},"qux":"1"}';
-    }
-
-    protected function getObject()
-    {
-        $obj = new \stdClass;
-        $obj->foo = 'foo';
-        $obj->bar = array('a', 'b');
-        $obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', 'item' => array(array('title' => 'title1'), array('title' => 'title2')), 'Barry' => array('FooBar' => array('Baz' => 'Ed', '@id' => 1)));
-        $obj->qux = "1";
-
-        return $obj;
-    }
-}
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
index b23d4c7..23cb021 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
@@ -184,23 +184,6 @@ public function testEncode()
         $this->assertEquals($source, $this->encoder->encode($obj, 'xml'));
     }
 
-    public function testEncodeSerializerXmlRootNodeNameOption()
-    {
-        $options = array('xml_root_node_name' => 'test');
-        $this->encoder = new XmlEncoder;
-        $serializer = new Serializer(array(), array('xml' => new XmlEncoder()));
-        $this->encoder->setSerializer($serializer);
-
-        $array = array(
-            'person' => array('@gender' => 'M', '#' => 'Peter'),
-        );
-
-        $expected = '<?xml version="1.0"?>'."\n".
-            '<test><person gender="M">Peter</person></test>'."\n";
-
-        $this->assertEquals($expected, $serializer->serialize($array, 'xml', $options));
-    }
-
     public function testDecode()
     {
         $source = $this->getXmlSource();
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php
index 09b8a52..468d444 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/DenormalizableDummy.php
@@ -17,7 +17,7 @@
 class DenormalizableDummy implements DenormalizableInterface
 {
 
-    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array())
+    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null)
     {
 
     }
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php
index 6b33e84..cdcf510 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php
@@ -23,7 +23,7 @@ class Dummy implements NormalizableInterface, DenormalizableInterface
     public $baz;
     public $qux;
 
-    public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array())
+    public function normalize(NormalizerInterface $normalizer, $format = null)
     {
         return array(
             'foo' => $this->foo,
@@ -33,7 +33,7 @@ public function normalize(NormalizerInterface $normalizer, $format = null, array
         );
     }
 
-    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array())
+    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null)
     {
         $this->foo = $data['foo'];
         $this->bar = $data['bar'];
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php
index 3ac2fe3..ba1f924 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php
@@ -18,7 +18,7 @@
 
 class NormalizableTraversableDummy extends TraversableDummy implements NormalizableInterface, DenormalizableInterface
 {
-    public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array())
+    public function normalize(NormalizerInterface $normalizer, $format = null)
     {
         return array(
             'foo' => 'normalizedFoo',
@@ -26,7 +26,7 @@ public function normalize(NormalizerInterface $normalizer, $format = null, array
         );
     }
 
-    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array())
+    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null)
     {
         return array(
             'foo' => 'denormalizedFoo',
diff --git a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php
index e9db238..1b0516a 100644
--- a/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php
+++ b/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php
@@ -21,12 +21,12 @@ class ScalarDummy implements NormalizableInterface, DenormalizableInterface
     public $foo;
     public $xmlFoo;
 
-    public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array())
+    public function normalize(NormalizerInterface $normalizer, $format = null)
     {
         return $format === 'xml' ? $this->xmlFoo : $this->foo;
     }
 
-    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array())
+    public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null)
     {
         if ($format === 'xml') {
             $this->xmlFoo = $data;
