diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index e506e52..d1848af 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -433,7 +433,7 @@ public function preHandle(Request $request) { $this->container->get('request_stack')->push($request); // Make sure all stream wrappers are registered. - file_get_stream_wrappers(); + \Drupal::service('stream_wrapper_manager')->register(); // Set the allowed protocols once we have the config available. $allowed_protocols = $this->container->get('config.factory')->get('system.filter')->get('protocols'); diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php index 428ca2a..4678bcb 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandler.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php @@ -865,7 +865,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) { // Interface Translation module and is later used to import // translations. drupal_static_reset('file_get_stream_wrappers'); - file_get_stream_wrappers(); + \Drupal::service('stream_wrapper_manager')->register(); // Update the theme registry to include it. drupal_theme_rebuild(); diff --git a/core/lib/Drupal/Core/Test/TestRunnerKernel.php b/core/lib/Drupal/Core/Test/TestRunnerKernel.php index 50bc112..47e3d33 100644 --- a/core/lib/Drupal/Core/Test/TestRunnerKernel.php +++ b/core/lib/Drupal/Core/Test/TestRunnerKernel.php @@ -77,7 +77,7 @@ public function boot() { // Register System module stream wrappers and create the build/artifacts // directory if necessary. - file_get_stream_wrappers(); + \Drupal::service('stream_wrapper_manager')->register(); if (!is_dir('public://simpletest')) { mkdir('public://simpletest', 0777, TRUE); } diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index df848dc..d66f511 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -1200,7 +1200,7 @@ private function restoreEnvironment() { conf_path(TRUE, TRUE); // Restore stream wrappers of the test runner. - file_get_stream_wrappers(); + \Drupal::service('stream_wrapper_manager')->register(); // Restore original shutdown callbacks. $callbacks = &drupal_register_shutdown_function();