core/modules/media/media.install | 12 ------------ core/modules/media/media.post_update.php | 12 ++++++++++++ .../Update/MediaSettingsDefaultIframeDomainUpdateTest.php | 1 + core/modules/system/system.install | 12 ------------ core/modules/system/system.post_update.php | 12 ++++++++++++ .../Update/GlobalThemeSettingsDefaultLogoUrlUpdateTest.php | 1 + .../Update/UpdateSettingsDefaultFetchUrlUpdateTest.php | 1 + core/modules/update/update.install | 12 ------------ core/modules/update/update.post_update.php | 12 ++++++++++++ 9 files changed, 39 insertions(+), 36 deletions(-) diff --git a/core/modules/media/media.install b/core/modules/media/media.install index 40394b3afa..2744025810 100644 --- a/core/modules/media/media.install +++ b/core/modules/media/media.install @@ -180,15 +180,3 @@ function media_requirements($phase) { function media_update_last_removed() { return 8700; } - -/** - * Updates media.settings:iframe_domain config if it's still at the default. - */ -function media_update_10200() { - $media_settings = \Drupal::configFactory()->getEditable('media.settings'); - if ($media_settings->get('iframe_domain') === '') { - $media_settings - ->set('iframe_domain', NULL) - ->save(TRUE); - } -} diff --git a/core/modules/media/media.post_update.php b/core/modules/media/media.post_update.php index 12b5709b87..8490dc60ea 100644 --- a/core/modules/media/media.post_update.php +++ b/core/modules/media/media.post_update.php @@ -33,3 +33,15 @@ function media_post_update_oembed_loading_attribute(array &$sandbox = NULL): voi return $media_config_updater->processOembedEagerLoadField($view_display); }); } + +/** + * Updates media.settings:iframe_domain config if it's still at the default. + */ +function media_post_update_set_blank_iframe_domain_to_null() { + $media_settings = \Drupal::configFactory()->getEditable('media.settings'); + if ($media_settings->get('iframe_domain') === '') { + $media_settings + ->set('iframe_domain', NULL) + ->save(TRUE); + } +} diff --git a/core/modules/media/tests/src/Functional/Update/MediaSettingsDefaultIframeDomainUpdateTest.php b/core/modules/media/tests/src/Functional/Update/MediaSettingsDefaultIframeDomainUpdateTest.php index 0f12e6e5e5..9f45672d8e 100644 --- a/core/modules/media/tests/src/Functional/Update/MediaSettingsDefaultIframeDomainUpdateTest.php +++ b/core/modules/media/tests/src/Functional/Update/MediaSettingsDefaultIframeDomainUpdateTest.php @@ -9,6 +9,7 @@ * Tests update of media.settings:iframe_domain if it's still the default of "". * * @group system + * @covers media_post_update_set_blank_iframe_domain_to_null() */ class MediaSettingsDefaultIframeDomainUpdateTest extends UpdatePathTestBase { diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 00ff7878fe..d5c4921f07 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1844,15 +1844,3 @@ function system_update_10101(&$sandbox = NULL) { ]); } } - -/** - * Updates system.theme.global:logo.url config if it's still at the default. - */ -function system_update_10200() { - $global_theme_settings = \Drupal::configFactory()->getEditable('system.theme.global'); - if ($global_theme_settings->get('logo.url') === '') { - $global_theme_settings - ->set('logo.url', NULL) - ->save(TRUE); - } -} diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php index 850def033e..14fd7bfc01 100644 --- a/core/modules/system/system.post_update.php +++ b/core/modules/system/system.post_update.php @@ -146,3 +146,15 @@ function system_post_update_add_description_to_entity_form_mode(array &$sandbox $config_entity_updater->update($sandbox, 'entity_form_mode', $callback); } + +/** + * Updates system.theme.global:logo.url config if it's still at the default. + */ +function system_post_update_set_blank_log_url_to_null() { + $global_theme_settings = \Drupal::configFactory()->getEditable('system.theme.global'); + if ($global_theme_settings->get('logo.url') === '') { + $global_theme_settings + ->set('logo.url', NULL) + ->save(TRUE); + } +} diff --git a/core/modules/system/tests/src/Functional/Update/GlobalThemeSettingsDefaultLogoUrlUpdateTest.php b/core/modules/system/tests/src/Functional/Update/GlobalThemeSettingsDefaultLogoUrlUpdateTest.php index 54316ff9ed..bb14d5b853 100644 --- a/core/modules/system/tests/src/Functional/Update/GlobalThemeSettingsDefaultLogoUrlUpdateTest.php +++ b/core/modules/system/tests/src/Functional/Update/GlobalThemeSettingsDefaultLogoUrlUpdateTest.php @@ -9,6 +9,7 @@ * Tests update of system.theme.global:logo.url if it's still the default of "". * * @group system + * @covers system_post_update_set_blank_log_url_to_null() */ class GlobalThemeSettingsDefaultLogoUrlUpdateTest extends UpdatePathTestBase { diff --git a/core/modules/update/tests/src/Functional/Update/UpdateSettingsDefaultFetchUrlUpdateTest.php b/core/modules/update/tests/src/Functional/Update/UpdateSettingsDefaultFetchUrlUpdateTest.php index 1d82f1d645..a3c67955df 100644 --- a/core/modules/update/tests/src/Functional/Update/UpdateSettingsDefaultFetchUrlUpdateTest.php +++ b/core/modules/update/tests/src/Functional/Update/UpdateSettingsDefaultFetchUrlUpdateTest.php @@ -10,6 +10,7 @@ * Tests update of update.settings:fetch.url if it's still the default of "". * * @group system + * @covers update_post_update_set_blank_fetch_url_to_null() */ class UpdateSettingsDefaultFetchUrlUpdateTest extends UpdatePathTestBase { diff --git a/core/modules/update/update.install b/core/modules/update/update.install index a9140c44e8..b77654d622 100644 --- a/core/modules/update/update.install +++ b/core/modules/update/update.install @@ -175,15 +175,3 @@ function _update_requirement_check($project, $type) { function update_update_last_removed() { return 8001; } - -/** - * Updates update.settings:fetch.url config if it's still at the default. - */ -function update_update_10200() { - $update_settings = \Drupal::configFactory()->getEditable('update.settings'); - if ($update_settings->get('fetch.url') === '') { - $update_settings - ->set('fetch.url', NULL) - ->save(TRUE); - } -} diff --git a/core/modules/update/update.post_update.php b/core/modules/update/update.post_update.php index 15fadacb17..2af7876c0d 100644 --- a/core/modules/update/update.post_update.php +++ b/core/modules/update/update.post_update.php @@ -13,3 +13,15 @@ function update_remove_post_updates() { 'update_post_update_add_view_update_notifications_permission' => '10.0.0', ]; } + +/** + * Updates update.settings:fetch.url config if it's still at the default. + */ +function update_post_update_set_blank_fetch_url_to_null() { + $update_settings = \Drupal::configFactory()->getEditable('update.settings'); + if ($update_settings->get('fetch.url') === '') { + $update_settings + ->set('fetch.url', NULL) + ->save(TRUE); + } +}