diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index 5b2a8dff0e5fc37c6c4db634ffc6beef29e17d40..39a856e966eb15d15839dbf220b094ad6a924674 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -900,6 +900,7 @@ protected function expandArguments(&$query, &$args) { */ public function getDriverClass($class) { match($class) { + 'Install\\Tasks', 'ExceptionHandler', 'Select', 'Insert', diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 7cd9079266f37d6414bc8b1d6a4eb6a0497355e0..027a6ab90360258b7b5489fde267098ad1841ea6 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -555,7 +555,7 @@ function system_requirements($phase) { if ($phase === 'runtime' || $phase === 'update') { // Database information. - $class = Database::getConnection()->getDriverClass('Install\\Tasks'); + $class = Database::getConnection()->getConnectionOptions()['namespace'] . '\\Install\\Tasks'; /** @var \Drupal\Core\Database\Install\Tasks $tasks */ $tasks = new $class(); $requirements['database_system'] = [ diff --git a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php index e48d3aa5f6129e2adb1eb23b0bfb4a86d2b8029d..28670b717533338d4b36e844463d805baff7df56 100644 --- a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php @@ -326,6 +326,7 @@ public function testGetDriverClass($expected, $namespace, $class) { $mock_pdo = $this->createMock('Drupal\Tests\Core\Database\Stub\StubPDO'); $connection = new StubConnection($mock_pdo, ['namespace' => $namespace]); match($class) { + 'Install\\Tasks', 'ExceptionHandler', 'Select', 'Insert',