diff -u b/core/lib/Drupal/Core/Database/Database.php b/core/lib/Drupal/Core/Database/Database.php --- b/core/lib/Drupal/Core/Database/Database.php +++ b/core/lib/Drupal/Core/Database/Database.php @@ -334,6 +334,9 @@ if (empty(self::$databaseInfo[$key][$target])) { self::$databaseInfo[$key][$target] = self::parseConnectionInfo($info); + // The database driver needs to be loadable before module namespaces have + // been added to the autoloader, because the list of enabled modules and + // the service container definition are typically both in the database. if (isset($info['autoload']) && $class_loader) { $class_loader->addPsr4($info['namespace'] . '\\', $info['autoload']); }