diff --git a/core/core.services.yml b/core/core.services.yml
index 0bb13d0..5c2fbf7 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -470,7 +470,7 @@ services:
     arguments: ['@module_handler']
   resolver_manager.entity:
     class: Drupal\Core\Entity\EntityResolverManager
-    arguments: ['@entity.manager', '@controller_resolver', '@class_resolver']
+    arguments: ['@entity.manager', '@class_resolver']
   route_subscriber.entity:
     class: Drupal\Core\EventSubscriber\EntityRouteAlterSubscriber
     tags:
diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php
index dbf340f..e060cdf 100644
--- a/core/lib/Drupal/Core/Config/ConfigImporter.php
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php
@@ -540,6 +540,7 @@ public function initialize() {
     // We have extensions to process.
     if ($this->totalExtensionsToProcess > 0) {
       $sync_steps[] = 'processExtensions';
+      $sync_steps[] = 'flush';
     }
     $sync_steps[] = 'processConfigurations';
 
@@ -550,6 +551,20 @@ public function initialize() {
   }
 
   /**
+   * Flushes Drupal's caches.
+   */
+  public function flush(array &$context) {
+    // Rebuild the container and flush Drupal's caches. If the container is not
+    // rebuilt first the entity types are not discovered correctly due to using
+    // an entity manager that has the incorrect container namespaces injected.
+    \Drupal::service('kernel')->rebuildContainer(TRUE);
+    drupal_flush_all_caches();
+    $this->reInjectMe();
+    $context['message'] = $this->t('Flushed all caches.');
+    $context['finished'] = 1;
+  }
+
+  /**
    * Processes extensions as a batch operation.
    *
    * @param array $context.
diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php
index 64214ae..20e5f1b 100644
--- a/core/lib/Drupal/Core/Config/DatabaseStorage.php
+++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php
@@ -10,11 +10,13 @@
 use Drupal\Core\Database\Database;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Database\SchemaObjectExistsException;
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 
 /**
  * Defines the Database storage.
  */
 class DatabaseStorage implements StorageInterface {
+  use DependencySerializationTrait;
 
   /**
    * The database connection.
diff --git a/core/lib/Drupal/Core/Entity/EntityResolverManager.php b/core/lib/Drupal/Core/Entity/EntityResolverManager.php
index b7e37d3..a164c4c 100644
--- a/core/lib/Drupal/Core/Entity/EntityResolverManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityResolverManager.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\Core\Entity;
 
-use Drupal\Component\Plugin\Exception\PluginNotFoundException;
-use Drupal\Core\Controller\ControllerResolverInterface;
 use Drupal\Core\DependencyInjection\ClassResolverInterface;
 use Symfony\Component\Routing\Route;
 
@@ -28,13 +26,6 @@ class EntityResolverManager {
   protected $entityManager;
 
   /**
-   * The controller resolver.
-   *
-   * @var \Drupal\Core\Controller\ControllerResolverInterface
-   */
-  protected $controllerResolver;
-
-  /**
    * The class resolver.
    *
    * @var \Drupal\Core\DependencyInjection\ClassResolverInterface
@@ -46,49 +37,76 @@ class EntityResolverManager {
    *
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The entity manager.
-   * @param \Drupal\Core\Controller\ControllerResolverInterface $controller_resolver
-   *   The controller resolver.
    * @param \Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver
    *   The class resolver.
    */
-  public function __construct(EntityManagerInterface $entity_manager, ControllerResolverInterface $controller_resolver, ClassResolverInterface $class_resolver) {
+  public function __construct(EntityManagerInterface $entity_manager, ClassResolverInterface $class_resolver) {
     $this->entityManager = $entity_manager;
-    $this->controllerResolver = $controller_resolver;
     $this->classResolver = $class_resolver;
   }
 
   /**
-   * Creates a controller instance using route defaults.
+   * Gets the controller class using route defaults.
    *
    * By design we cannot support all possible routes, but just the ones which
    * use the defaults provided by core, which are _content, _controller
    * and _form.
    *
+   * Rather than creating an instance of every controller determine the class
+   * and method that would be used. This is not possible for the service:method
+   * notation.
+   *
+   * @see \Drupal\Core\Controller\ControllerResolver::getControllerFromDefinition()
+   * @see \Drupal\Core\Controller\ClassResolver::getInstanceFromDefinition()
+   *
    * @param array $defaults
    *   The default values provided by the route.
    *
-   * @return array|null
-   *   Returns the controller instance if it is possible to instantiate it, NULL
+   * @return string|null
+   *   Returns the controller class, otherwise NULL.
    */
-  protected function getController(array $defaults) {
+  protected function getControllerClass(array $defaults) {
     $controller = NULL;
     if (isset($defaults['_content'])) {
-      $controller = $this->controllerResolver->getControllerFromDefinition($defaults['_content']);
+      $controller = $defaults['_content'];
     }
     if (isset($defaults['_controller'])) {
-      $controller = $this->controllerResolver->getControllerFromDefinition($defaults['_controller']);
+      $controller = $defaults['_controller'];
     }
 
     if (isset($defaults['_form'])) {
-      $form_arg = $defaults['_form'];
-      // Check if the class exists first as the class resolver will throw an
-      // exception if it doesn't. This also means a service cannot be used here.
-      if (class_exists($form_arg)) {
-        $controller = array($this->classResolver->getInstanceFromDefinition($form_arg), 'buildForm');
+      $controller = $defaults['_form'];
+      // Check if the class exists and if so use the buildForm() method from the
+      // interface.
+      if (class_exists($controller)) {
+        return array($controller, 'buildForm');
       }
     }
 
-    return $controller;
+    if (strpos($controller, ':') === FALSE) {
+      if (method_exists($controller, '__invoke')) {
+        return array($controller, '__invoke');
+      }
+      // What to do here? The controller could be a procedural function.
+      return NULL;
+    }
+
+    $count = substr_count($controller, ':');
+    if ($count == 1) {
+      // Controller in the service:method notation. Should we be getting the
+      // service from the container? Or can we get the definition somehow?
+      // Considering that this is called during the kernel destruct event this
+      // is very dangerous as the controller could depend on services that can
+      // not exist at this point.
+      list($class_or_service, $method) = explode(':', $controller, 2);
+      return array($this->classResolver->getInstanceFromDefinition($class_or_service), $method);
+    }
+    elseif (strpos($controller, '::') !== FALSE) {
+      // Controller in the class::method notation.
+      return explode('::', $controller, 2);
+    }
+
+    return NULL;
   }
 
   /**
@@ -187,7 +205,7 @@ protected function setParametersFromEntityInformation(Route $route) {
    *   The route object to add the upcasting information onto.
    */
   public function setRouteOptions(Route $route) {
-    if ($controller = $this->getController($route->getDefaults())) {
+    if ($controller = $this->getControllerClass($route->getDefaults())) {
       // Try to use reflection.
       if ($this->setParametersFromReflection($controller, $route)) {
         return;
diff --git a/core/modules/config/config.services.yml b/core/modules/config/config.services.yml
new file mode 100644
index 0000000..5ce2696
--- /dev/null
+++ b/core/modules/config/config.services.yml
@@ -0,0 +1,5 @@
+services:
+  config.config_subscriber:
+    class: Drupal\config\ConfigSubscriber
+    tags:
+      - { name: event_subscriber }
diff --git a/core/modules/config/src/ConfigSubscriber.php b/core/modules/config/src/ConfigSubscriber.php
new file mode 100644
index 0000000..9da0233
--- /dev/null
+++ b/core/modules/config/src/ConfigSubscriber.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\config\ConfigSubscriber.
+ */
+
+namespace Drupal\config;
+
+use Drupal\Core\Config\ConfigEvents;
+use Drupal\Core\Config\ConfigImporterEvent;
+use Drupal\Core\Config\ConfigImporterException;
+use Drupal\Core\Config\ConfigImportValidateEventSubscriberBase;
+
+
+/**
+ * Config subscriber.
+ */
+class ConfigSubscriber extends ConfigImportValidateEventSubscriberBase {
+
+  /**
+   * Checks that the Configuration module is not being uninstalled.
+   *
+   * @param ConfigImporterEvent $event
+   *   The config import event.
+   */
+  public function onConfigImporterValidate(ConfigImporterEvent $event) {
+    $importer = $event->getConfigImporter();
+    $core_extension = $importer->getStorageComparer()->getSourceStorage()->read('core.extension');
+    if (!isset($core_extension['module']['config'])) {
+      $importer->logError($this->t('Can not uninstall the Configuration module as part of a configuration synchronization through the user interface.'));
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  static function getSubscribedEvents() {
+    $events[ConfigEvents::IMPORT_VALIDATE][] = array('onConfigImporterValidate', 20);
+    return $events;
+  }
+}
diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/src/Tests/ConfigImportAllTest.php
index 1624211..83100f3 100644
--- a/core/modules/config/src/Tests/ConfigImportAllTest.php
+++ b/core/modules/config/src/Tests/ConfigImportAllTest.php
@@ -32,6 +32,13 @@ public static function getInfo() {
     );
   }
 
+  public function setUp() {
+    parent::setUp();
+
+    $this->web_user = $this->drupalCreateUser(array('synchronize configuration'));
+    $this->drupalLogin($this->web_user);
+  }
+
   /**
    * Tests that a fixed set of modules can be installed and uninstalled.
    */
@@ -82,6 +89,9 @@ public function testInstallUninstall() {
       return TRUE;
     });
 
+    // Can not uninstall config and use admin/config/development/configuration!
+    unset($modules_to_uninstall['config']);
+
     $this->assertTrue(isset($modules_to_uninstall['comment']), 'The comment module will be disabled');
 
     // Uninstall all modules that can be uninstalled.
@@ -94,7 +104,7 @@ public function testInstallUninstall() {
     }
 
     // Import the configuration thereby re-installing all the modules.
-    $this->configImporter()->import();
+    $this->drupalPostForm('admin/config/development/configuration', array(), t('Import all'));
 
     // Check that there are no errors.
     $this->assertIdentical($this->configImporter()->getErrors(), array());
diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php
index 6f3bb2c..62a28ed 100644
--- a/core/modules/config/src/Tests/ConfigImportUITest.php
+++ b/core/modules/config/src/Tests/ConfigImportUITest.php
@@ -331,6 +331,21 @@ public function testImportValidation() {
     $this->assertNotEqual($new_site_name, \Drupal::config('system.site')->get('name'));
   }
 
+  public function testConfigUninstallConfigException() {
+    $staging = $this->container->get('config.storage.staging');
+
+    $core_extension = \Drupal::config('core.extension')->get();
+    unset($core_extension['module']['config']);
+    $staging->write('core.extension', $core_extension);
+
+    $this->drupalGet('admin/config/development/configuration');
+    $this->assertText('core.extension');
+
+    // Import and verify that both do not appear anymore.
+    $this->drupalPostForm(NULL, array(), t('Import all'));
+    $this->assertText('Can not uninstall the Configuration module as part of a configuration synchronization through the user interface.');
+  }
+
   function prepareSiteNameUpdate($new_site_name) {
     $staging = $this->container->get('config.storage.staging');
     // Create updated configuration object.
diff --git a/core/modules/migrate/src/Entity/Migration.php b/core/modules/migrate/src/Entity/Migration.php
index c892ccb..da71c0b 100644
--- a/core/modules/migrate/src/Entity/Migration.php
+++ b/core/modules/migrate/src/Entity/Migration.php
@@ -79,6 +79,13 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem
   public $process;
 
   /**
+   * The configuration describing the load plugins.
+   *
+   * @var array
+   */
+  public $load;
+
+  /**
    * The cached process plugins.
    *
    * @var array
@@ -339,18 +346,4 @@ public function checkRequirements() {
     return TRUE;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function toArray() {
-    // @todo Remove once migration config entities have schema
-    //   https://drupal.org/node/2183957.
-    $class_info = new \ReflectionClass($this);
-    foreach ($class_info->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
-      $name = $property->getName();
-      $properties[$name] = $this->get($name);
-    }
-    return $properties;
-  }
-
 }
diff --git a/core/modules/simpletest/src/Form/SimpletestResultsForm.php b/core/modules/simpletest/src/Form/SimpletestResultsForm.php
index 299f305..7c55197 100644
--- a/core/modules/simpletest/src/Form/SimpletestResultsForm.php
+++ b/core/modules/simpletest/src/Form/SimpletestResultsForm.php
@@ -48,6 +48,12 @@ public static function create(ContainerInterface $container) {
    */
   public function __construct(Connection $database) {
     $this->database = $database;
+  }
+
+  /**
+   * Builds the status image map.
+   */
+  protected function buildStatusImageMap() {
     // Initialize image mapping property.
     $image_pass = array(
       '#theme' => 'image',
@@ -96,6 +102,7 @@ public function getFormId() {
    * {@inheritdoc}
    */
   public function buildForm(array $form, array &$form_state, $test_id = NULL) {
+    $this->buildStatusImageMap();
     // Make sure there are test results to display and a re-run is not being
     // performed.
     $results = array();
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php
index 4df611c..e9db547 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php
@@ -40,13 +40,6 @@ class EntityResolverManagerTest extends UnitTestCase {
   protected $entityManager;
 
   /**
-   * The mocked controller resolver.
-   *
-   * @var \Drupal\Core\Controller\ControllerResolverInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $controllerResolver;
-
-  /**
    * The mocked class resolver.
    *
    * @var \Drupal\Core\DependencyInjection\ClassResolverInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -79,11 +72,10 @@ public static function getInfo() {
    */
   protected function setUp() {
     $this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
-    $this->controllerResolver = $this->getMock('Drupal\Core\Controller\ControllerResolverInterface');
     $this->container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
     $this->classResolver = $this->getClassResolverStub();
 
-    $this->entityResolverManager = new EntityResolverManager($this->entityManager, $this->controllerResolver, $this->classResolver);
+    $this->entityResolverManager = new EntityResolverManager($this->entityManager, $this->classResolver);
   }
 
   /**
@@ -92,13 +84,12 @@ protected function setUp() {
    * We don't have any entity type involved, so we don't need any upcasting.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    */
   public function testSetRouteOptionsWithStandardRoute() {
     $route = new Route('/example', array(
       '_controller' => 'Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerMethod',
     ));
-    $this->setupControllerResolver($route->getDefault('_controller'));
 
     $defaults = $route->getDefaults();
     $this->entityResolverManager->setRouteOptions($route);
@@ -110,14 +101,13 @@ public function testSetRouteOptionsWithStandardRoute() {
    * Tests setRouteOptions() with a controller with a non entity argument.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    */
   public function testSetRouteOptionsWithStandardRouteWithArgument() {
     $route = new Route('/example/{argument}', array(
       '_controller' => 'Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerMethodWithArgument',
       'argument' => 'test',
     ));
-    $this->setupControllerResolver($route->getDefault('_controller'));
 
     $defaults = $route->getDefaults();
     $this->entityResolverManager->setRouteOptions($route);
@@ -129,14 +119,13 @@ public function testSetRouteOptionsWithStandardRouteWithArgument() {
    * Tests setRouteOptions() with a _content default.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    */
   public function testSetRouteOptionsWithContentController() {
     $route = new Route('/example/{argument}', array(
       '_content' => 'Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerMethodWithArgument',
       'argument' => 'test',
     ));
-    $this->setupControllerResolver($route->getDefault('_content'));
 
     $defaults = $route->getDefaults();
     $this->entityResolverManager->setRouteOptions($route);
@@ -148,7 +137,7 @@ public function testSetRouteOptionsWithContentController() {
    * Tests setRouteOptions() with an entity type parameter.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    */
@@ -158,7 +147,6 @@ public function testSetRouteOptionsWithEntityTypeNoUpcasting() {
     $route = new Route('/example/{entity_test}', array(
       '_content' => 'Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerWithEntityNoUpcasting',
     ));
-    $this->setupControllerResolver($route->getDefault('_content'));
 
     $defaults = $route->getDefaults();
     $this->entityResolverManager->setRouteOptions($route);
@@ -170,7 +158,7 @@ public function testSetRouteOptionsWithEntityTypeNoUpcasting() {
    * Tests setRouteOptions() with an entity type parameter, upcasting.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    */
@@ -180,7 +168,6 @@ public function testSetRouteOptionsWithEntityTypeUpcasting() {
     $route = new Route('/example/{entity_test}', array(
       '_content' => 'Drupal\Tests\Core\Entity\BasicControllerClass::exampleControllerWithEntityUpcasting',
     ));
-    $this->setupControllerResolver($route->getDefault('_content'));
 
     $defaults = $route->getDefaults();
     $this->entityResolverManager->setRouteOptions($route);
@@ -193,7 +180,7 @@ public function testSetRouteOptionsWithEntityTypeUpcasting() {
    * Tests setRouteOptions() with an entity type parameter form.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    */
@@ -215,7 +202,7 @@ public function testSetRouteOptionsWithEntityFormUpcasting() {
    * Tests setRouteOptions() with entity form upcasting, no create method.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    */
@@ -237,7 +224,7 @@ public function testSetRouteOptionsWithEntityUpcastingNoCreate() {
    * Tests setRouteOptions() with an form parameter without interface.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    */
@@ -258,7 +245,7 @@ public function testSetRouteOptionsWithEntityFormNoUpcasting() {
    * Tests setRouteOptions() with an _entity_view route.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    * @covers ::setParametersFromEntityInformation()
@@ -290,7 +277,7 @@ public function testSetRouteOptionsWithEntityViewRouteAndManualParameters() {
    * Tests setRouteOptions() with an _entity_view route.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    * @covers ::setParametersFromEntityInformation()
@@ -312,7 +299,7 @@ public function testSetRouteOptionsWithEntityViewRoute() {
    * Tests setRouteOptions() with an _entity_list route.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    * @covers ::setParametersFromEntityInformation()
@@ -334,7 +321,7 @@ public function testSetRouteOptionsWithEntityListRoute() {
    * Tests setRouteOptions() with an _entity_form route.
    *
    * @covers ::setRouteOptions()
-   * @covers ::getController()
+   * @covers ::getControllerClass()
    * @covers ::getEntityTypes()
    * @covers ::setParametersFromReflection()
    * @covers ::setParametersFromEntityInformation()
@@ -353,21 +340,6 @@ public function testSetRouteOptionsWithEntityFormRoute() {
   }
 
   /**
-   * Setups the controller resolver to return the given controller definition.
-   *
-   * @param string $controller_definition
-   *   The definition of a controller
-   */
-  protected function setupControllerResolver($controller_definition) {
-    $controller = $controller_definition;
-    list($class, $method) = explode('::', $controller);
-    $this->controllerResolver->expects($this->atLeastOnce())
-      ->method('getControllerFromDefinition')
-      ->with($controller_definition)
-      ->will($this->returnValue(array(new $class, $method)));
-  }
-
-  /**
    * Creates the entity manager mock returning entity type objects.
    */
   protected function setupEntityTypes() {
