diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index f06ca69..7acc0fd 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -477,13 +477,13 @@ function hook_install_tasks_alter(&$tasks, $install_state) { * - Cache invalidation. * - Using \Drupal::configFactory()->getEditable() and \Drupal::config(). * Implementations must: - * - not make any assumption that the config data is valid. - * - use be the correct data type when changing configuration values as - * specified by its configuration schema at the time the update hook is - * written. If the data type changes in a subsequent code change, a - * subsequent update hook is responsible for ensuring the final data type - * aligns with the configuration schema. - * - use the $has_trusted_data argument for \Drupal\Core\Config\Config::save() + * - Not make any assumption that the config data is valid. + * - Use the correct data type when changing configuration values as specified + * by its configuration schema at the time the update hook is written. If + * the data type changes in a subsequent code change, a subsequent update + * hook is responsible for ensuring the final data type aligns with the + * configuration schema. + * - Use the $has_trusted_data argument for \Drupal\Core\Config\Config::save() * so that configuration schemas are not used whilst saving configuration. * - Marking a container for rebuild. * diff --git a/core/modules/language/src/EventSubscriber/ConfigSubscriber.php b/core/modules/language/src/EventSubscriber/ConfigSubscriber.php index 3469949..e1875ce 100644 --- a/core/modules/language/src/EventSubscriber/ConfigSubscriber.php +++ b/core/modules/language/src/EventSubscriber/ConfigSubscriber.php @@ -61,8 +61,8 @@ public function __construct(LanguageManagerInterface $language_manager, Language /** * Causes the container to be rebuilt on the next request. * - * This event assumes that the new default langcode and old default langcode - * are valid langcodes. If the schema definition of either + * This event subscriber assumes that the new default langcode and old default + * langcode are valid langcodes. If the schema definition of either * system.site:default_langcode or language.negotiation::url.prefixes changes * then this event must be changed to work with both the old and new schema * definition so this event is update safe. @@ -81,7 +81,8 @@ public function onConfigSave(ConfigCrudEvent $event) { $this->languageManager->reset(); // Directly update language negotiation settings instead of calling - // language_negotiation_url_prefixes_update(). + // language_negotiation_url_prefixes_update() to ensure that the code + // obeys the hook_update_N() restrictions. $negotiation_config = $this->configFactory->getEditable('language.negotiation'); $negotiation_changed = FALSE; $url_prefixes = $negotiation_config->get('url.prefixes');