diff --git a/core/core.services.yml b/core/core.services.yml index a387231..787c145 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -573,14 +573,6 @@ services: class: Drupal\Core\StreamWrapper\PublicStream tags: - { name: stream_wrapper, scheme: public } - stream_wrapper.private: - class: Drupal\Core\StreamWrapper\PrivateStream - tags: - - { name: stream_wrapper, scheme: private } - stream_wrapper.temporary: - class: Drupal\Core\StreamWrapper\TemporaryStream - tags: - - { name: stream_wrapper, scheme: temporary } kernel_destruct_subscriber: class: Drupal\Core\EventSubscriber\KernelDestructionSubscriber tags: diff --git a/core/includes/module.inc b/core/includes/module.inc index 429f5db..c9a13ff 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -30,7 +30,7 @@ */ function system_list($type) { $lists = &drupal_static(__FUNCTION__); - if ($cached = cache('bootstrap')->get('system_list')) { + if ($cached = \Drupal::cache('bootstrap')->get('system_list')) { $lists = $cached->data; } else { @@ -92,7 +92,7 @@ function system_list($type) { // Set the theme engine prefix. $lists['theme'][$key]->prefix = ($lists['theme'][$key]->info['engine'] == 'theme') ? $base_key : $lists['theme'][$key]->info['engine']; } - cache('bootstrap')->set('system_list', $lists); + \Drupal::cache('bootstrap')->set('system_list', $lists); } // To avoid a separate database lookup for the filepath, prime the // drupal_get_filename() static cache with all enabled modules and themes. @@ -110,8 +110,8 @@ function system_list_reset() { drupal_static_reset('system_list'); drupal_static_reset('system_rebuild_module_data'); drupal_static_reset('list_themes'); - cache('bootstrap')->delete('system_list'); - cache()->delete('system_info'); + \Drupal::cache('bootstrap')->delete('system_list'); + \Drupal::cache()->delete('system_info'); // Remove last known theme data state. // This causes system_list() to call system_rebuild_theme_data() on its next // invocation. When enabling a module that implements hook_system_info_alter() diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index f4ab578..a3230c2 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -510,7 +510,6 @@ protected function buildContainer() { // Plugin directory. foreach (array('Core', 'Component') as $parent_directory) { $path = DRUPAL_ROOT . '/core/lib/Drupal/' . $parent_directory; - $namespaces['Drupal\\' . $parent_directory] = DRUPAL_ROOT . '/core/lib'; foreach (new \DirectoryIterator($path) as $component) { if (!$component->isDot() && is_dir($component->getPathname() . '/Plugin')) { $namespaces['Drupal\\' . $parent_directory . '\\' . $component->getFilename()] = DRUPAL_ROOT . '/core/lib'; diff --git a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php index fc7e945..899644a 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php @@ -20,8 +20,8 @@ class PrivateStream extends LocalStream { */ public static function info() { return array( - 'name' => t('Private files'), - 'description' => t('Private local files served by Drupal.'), + 'name' => 'Private files', + 'description' => 'Private local files served by Drupal.', 'type' => StreamWrapperInterface::LOCAL_NORMAL, ); } diff --git a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php index 4a4fcfe..ff6e243 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php @@ -20,8 +20,8 @@ class PublicStream extends LocalStream { */ public static function info() { return array( - 'name' => t('Public files'), - 'description' => t('Public local files served by the webserver.'), + 'name' => 'Public files', + 'description' => 'Public local files served by the webserver.', 'type' => StreamWrapperInterface::LOCAL_NORMAL, ); } diff --git a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php index 2c5861e..0f4acf5 100644 --- a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php @@ -20,8 +20,8 @@ class TemporaryStream extends LocalStream { */ public static function info() { return array( - 'name' => t('Temporary files'), - 'description' => t('Temporary local files for upload and previews.'), + 'name' => 'Temporary files', + 'description' => 'Temporary local files for upload and previews.', 'type' => StreamWrapperInterface::LOCAL_HIDDEN, ); } diff --git a/core/modules/file/tests/file_test/file_test.services.yml b/core/modules/file/tests/file_test/file_test.services.yml index 55d6aee..1e05c26 100644 --- a/core/modules/file/tests/file_test/file_test.services.yml +++ b/core/modules/file/tests/file_test/file_test.services.yml @@ -1,9 +1,9 @@ services: - stream_wrapper.dummy-readonly: + stream_wrapper.dummy_readonly: class: Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper tags: - { name: stream_wrapper, scheme: dummy-readonly } - stream_wrapper.dummy-remote: + stream_wrapper.dummy_remote: class: Drupal\file_test\StreamWrapper\DummyRemoteStreamWrapper tags: - { name: stream_wrapper, scheme: dummy-remote } diff --git a/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php b/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php index 457d186..67be78f 100644 --- a/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php +++ b/core/modules/locale/lib/Drupal/locale/StreamWrapper/TranslationsStream.php @@ -24,8 +24,8 @@ class TranslationsStream extends LocalStream { */ public static function info() { return array( - 'name' => t('Translation files'), - 'description' => t('Translation files'), + 'name' => 'Translation files', + 'description' => 'Translation files', 'type' => StreamWrapperInterface::LOCAL_HIDDEN, ); } diff --git a/core/modules/system/system.services.yml b/core/modules/system/system.services.yml index 54e5b11..2708078 100644 --- a/core/modules/system/system.services.yml +++ b/core/modules/system/system.services.yml @@ -20,3 +20,11 @@ services: arguments: ['@batch.storage'] tags: - { name: theme_negotiator, priority: 1000 } + stream_wrapper.private: + class: Drupal\Core\StreamWrapper\PrivateStream + tags: + - { name: stream_wrapper, scheme: private } + stream_wrapper.temporary: + class: Drupal\Core\StreamWrapper\TemporaryStream + tags: + - { name: stream_wrapper, scheme: temporary }