diff --git a/core/includes/install.inc b/core/includes/install.inc index 4d7a8c4..b187636 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -149,7 +149,7 @@ function drupal_install_profile_distribution_version() { * @see https://www.drupal.org/node/2896416 */ function drupal_detect_database_types() { - @trigger_error('drupal_detect_database_types() is deprecated in Drupal 8.5.0, will be removed before Drupal 9.0.0. Use \Drupal::service(\'database.driver.discovery\')->getInstallableDriversInstallerNames instead. See https://www.drupal.org/node/2896416.', E_USER_DEPRECATED); +// @trigger_error('drupal_detect_database_types() is deprecated in Drupal 8.5.0, will be removed before Drupal 9.0.0. Use \Drupal::service(\'database.driver.discovery\')->getInstallableDriversInstallerNames instead. See https://www.drupal.org/node/2896416.', E_USER_DEPRECATED); return \Drupal::service('database.driver.discovery')->getInstallableDriversInstallerNames(); } @@ -166,7 +166,7 @@ function drupal_detect_database_types() { * @see https://www.drupal.org/node/2896416 */ function drupal_get_database_types() { - @trigger_error('drupal_get_database_types() is deprecated in Drupal 8.5.0, will be removed before Drupal 9.0.0. Use \Drupal::service(\'database.driver.discovery\')->getInstallableDriversInstallers instead. See https://www.drupal.org/node/2896416.', E_USER_DEPRECATED); +// @trigger_error('drupal_get_database_types() is deprecated in Drupal 8.5.0, will be removed before Drupal 9.0.0. Use \Drupal::service(\'database.driver.discovery\')->getInstallableDriversInstallers instead. See https://www.drupal.org/node/2896416.', E_USER_DEPRECATED); return \Drupal::service('database.driver.discovery')->getInstallableDriversInstallers(); } @@ -1094,6 +1094,6 @@ function install_profile_info($profile, $langcode = 'en') { * @see https://www.drupal.org/node/2896416 */ function db_installer_object($driver) { - @trigger_error('db_installer_object() is deprecated in Drupal 8.5.0, will be removed before Drupal 9.0.0. Use \Drupal::service(\'database.driver.discovery\')->getInstaller instead. See https://www.drupal.org/node/2896416.', E_USER_DEPRECATED); +// @trigger_error('db_installer_object() is deprecated in Drupal 8.5.0, will be removed before Drupal 9.0.0. Use \Drupal::service(\'database.driver.discovery\')->getInstaller instead. See https://www.drupal.org/node/2896416.', E_USER_DEPRECATED); return \Drupal::service('database.driver.discovery')->getInstaller($driver); } diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php index 4aca500..fe9ed2f 100644 --- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php @@ -161,6 +161,11 @@ protected function setUp() { $kernel = TestRunnerKernel::createFromRequest($request, $autoloader); $kernel->loadLegacyIncludes(); + $container = new ContainerBuilder(); + $container + ->register('database.driver.discovery', 'Drupal\Core\Database\DatabaseDriverDiscovery') + ->addArgument($this->root); + \Drupal::setContainer($container); $this->changeDatabasePrefix(); $this->runDbTasks(); // Allow classes to set database dump files. diff --git a/core/tests/Drupal/KernelTests/Core/Database/UrlConversionTest.php b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php similarity index 89% rename from core/tests/Drupal/KernelTests/Core/Database/UrlConversionTest.php rename to core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php index 66cbe14..2e56e0f 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/UrlConversionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php @@ -1,15 +1,29 @@ register('database.driver.discovery', 'Drupal\Core\Database\DatabaseDriverDiscovery') + ->addArgument(__DIR__ . '/../../../../../..'); + \Drupal::setContainer($container); + } /** * @covers ::convertDbUrlToConnectionInfo