diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 22eb5b8..cbeb598 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -3038,22 +3038,21 @@ function drupal_classloader() {
         break;
     }
 
-    // Register explicit PSR-0 vendor namespaces.
-    $loader->registerNamespaces(array(
-      // All Symfony-borrowed code lives in /core/vendor/symfony.
-      'Symfony\Component\ClassLoader' => DRUPAL_ROOT . '/core/vendor/symfony/class-loader',
-      'Symfony\Component\DependencyInjection' => DRUPAL_ROOT . '/core/vendor/symfony/dependency-injection',
-      'Symfony\Component\EventDispatcher' => DRUPAL_ROOT . '/core/vendor/symfony/event-dispatcher',
-      'Symfony\Component\HttpFoundation' => DRUPAL_ROOT . '/core/vendor/symfony/http-foundation',
-      'Symfony\Component\HttpKernel' => DRUPAL_ROOT . '/core/vendor/symfony/http-kernel',
-      'Symfony\Component\Routing' => DRUPAL_ROOT . '/core/vendor/symfony/routing',
-      'Symfony\Component\Yaml' => DRUPAL_ROOT . '/core/vendor/symfony/yaml',
-    ));
-    // Register PEAR-style vendor namespaces.
-    $loader->registerPrefixes(array(
-      // All Twig-borrowed code lives in /core/vendor/twig.
-      'Twig' => DRUPAL_ROOT . '/core/vendor/twig/twig/lib',
-    ));
+    // Register namespaces for vendor libraries managed by Composer. Composer
+    // returns a single array containing libraries that use PHP 5.3 namespaces
+    // and ones that use PEAR-style class prefixes, but the Symfony class loader
+    // requires them to be registered separately.
+    $namespaces = require DRUPAL_ROOT . '/core/vendor/composer/autoload_namespaces.php';
+    $prefix_filter = function ($namespace) {
+      // PEAR-style class prefixes have an underscore; PHP 5.3 namespaces don't.
+      return strpos($namespace, '_') !== FALSE;
+    };
+    $prefix_keys = array_filter(array_keys($namespaces), $prefix_filter);
+    $prefixes = array_intersect_key($namespaces, array_flip($prefix_keys));
+    $namespaces = array_diff_key($namespaces, $prefixes);
+    $loader->registerPrefixes($prefixes);
+    $loader->registerNamespaces($namespaces);
+
     // Register the Drupal namespace for classes in core as a fallback.
     // This allows to register additional namespaces within the Drupal namespace
     // (e.g., for modules) and avoids an additional file_exists() on the Drupal
