Issue #3342489 by _shY, smustgrave, longwave, Wim Leers: Add default value for mail_notification in site.system config

merge-requests/6042/merge
Dave Long 2024-01-11 14:05:48 +00:00
parent fd36154396
commit 4f633dcc98
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
7 changed files with 17 additions and 0 deletions

View File

@ -10,3 +10,4 @@ page:
admin_compact_mode: false
weight_select_max: 100
default_langcode: en
mail_notification: null

View File

@ -201,3 +201,14 @@ function system_post_update_amend_config_sync_readme_url() {
file_put_contents($readme_path, $changed_content);
return \t('Amended configuration synchronization readme file content.');
}
/**
* Adds default value for the mail_notification config parameter.
*/
function system_post_update_mail_notification_setting() {
$config = \Drupal::configFactory()->getEditable('system.site');
// If the value doesn't exist it always returns NULL.
if (is_null($config->get('mail_notification'))) {
$config->set('mail_notification', NULL)->save();
}
}

View File

@ -109,6 +109,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase {
'admin_compact_mode' => FALSE,
'weight_select_max' => 100,
'default_langcode' => 'en',
'mail_notification' => NULL,
],
];

View File

@ -118,6 +118,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase {
'admin_compact_mode' => TRUE,
'weight_select_max' => 100,
'default_langcode' => 'en',
'mail_notification' => NULL,
],
];

View File

@ -10,3 +10,4 @@ page:
admin_compact_mode: false
weight_select_max: 100
default_langcode: en
mail_notification: null

View File

@ -10,3 +10,4 @@ page:
admin_compact_mode: false
weight_select_max: 100
default_langcode: en
mail_notification: null

View File

@ -10,3 +10,4 @@ page:
admin_compact_mode: false
weight_select_max: 91
default_langcode: en
mail_notification: null