diff --git a/farm.profile b/farm.profile index a8723952d..e96db9c70 100644 --- a/farm.profile +++ b/farm.profile @@ -71,15 +71,3 @@ function farm_form_update_manager_update_form_alter(&$form, &$form_state, $form_ \Drupal::messenger()->addError($message); $form['actions']['#access'] = FALSE; } - -/** - * Implements hook_farm_update_exclude_config(). - */ -function farm_farm_update_exclude_config() { - - // Exclude config that we have overridden in hook_install(). - return [ - 'system.file', - 'user.settings', - ]; -} diff --git a/modules/core/api/farm_api.module b/modules/core/api/farm_api.module index 44b74a0e6..9b4530ded 100644 --- a/modules/core/api/farm_api.module +++ b/modules/core/api/farm_api.module @@ -105,16 +105,3 @@ function farm_api_entity_base_field_info(EntityTypeInterface $entity_type) { return $fields; } - -/** - * Implements hook_farm_update_exclude_config(). - */ -function farm_api_farm_update_exclude_config() { - - // Exclude config that we have overridden in hook_install(). - return [ - 'jsonapi.settings', - 'jsonapi_extras.settings', - 'simple_oauth.settings', - ]; -} diff --git a/modules/core/entity/farm_entity.module b/modules/core/entity/farm_entity.module index 0813027e5..630d0b4e2 100644 --- a/modules/core/entity/farm_entity.module +++ b/modules/core/entity/farm_entity.module @@ -176,14 +176,3 @@ function farm_entity_form_alter(&$form, FormStateInterface $form_state, $form_id // Disable access to the revision checkbox. $form['revision']['#access'] = FALSE; } - -/** - * Implements hook_farm_update_exclude_config(). - */ -function farm_entity_farm_update_exclude_config() { - - // Exclude config that we have overridden in hook_install(). - return [ - 'entity_reference_integrity_enforce.settings', - ]; -} diff --git a/modules/core/quantity/quantity.module b/modules/core/quantity/quantity.module index 2e7f7fad7..e60120273 100644 --- a/modules/core/quantity/quantity.module +++ b/modules/core/quantity/quantity.module @@ -215,14 +215,3 @@ function template_preprocess_quantity(array &$variables) { } } } - -/** - * Implements hook_farm_update_exclude_config(). - */ -function quantity_farm_update_exclude_config() { - - // Exclude quantity.settings config from automatic updates. - return [ - 'quantity.settings', - ]; -} diff --git a/modules/core/ui/location/farm_ui_location.module b/modules/core/ui/location/farm_ui_location.module index fec91e78a..68a288dc3 100644 --- a/modules/core/ui/location/farm_ui_location.module +++ b/modules/core/ui/location/farm_ui_location.module @@ -31,14 +31,3 @@ function farm_ui_location_help($route_name, RouteMatchInterface $route_match) { return $output; } - -/** - * Implements hook_farm_update_exclude_config(). - */ -function farm_ui_location_farm_update_exclude_config() { - - // Exclude config that we have overridden in hook_install(). - return [ - 'inspire_tree.settings', - ]; -} diff --git a/modules/core/ui/theme/farm_ui_theme.module b/modules/core/ui/theme/farm_ui_theme.module index 5ea018493..224329838 100644 --- a/modules/core/ui/theme/farm_ui_theme.module +++ b/modules/core/ui/theme/farm_ui_theme.module @@ -186,7 +186,5 @@ function farm_ui_theme_farm_update_exclude_config() { // Exclude config that we have overridden in hook_install(). return [ 'block.block.gin_local_actions', - 'gin.settings', - 'system.theme', ]; } diff --git a/modules/core/update/farm_update.api.php b/modules/core/update/farm_update.api.php index 5125a2fb0..e1909b90f 100644 --- a/modules/core/update/farm_update.api.php +++ b/modules/core/update/farm_update.api.php @@ -22,8 +22,8 @@ */ function hook_farm_update_exclude_config() { return [ - 'core.extension', - 'system.date', + 'views.view.farm_log.yml', + 'asset.type.structure.yml', ]; } diff --git a/modules/core/update/farm_update.module b/modules/core/update/farm_update.module index 01b3bec25..8897909c2 100644 --- a/modules/core/update/farm_update.module +++ b/modules/core/update/farm_update.module @@ -19,11 +19,6 @@ function farm_update_farm_update_exclude_config() { // Exclude Drupal core configurations from automatic updates. return [ - 'core.extension', - 'system.date', - 'system.performance', - 'system.site', - 'update.settings', 'user.role.anonymous', 'user.role.authenticated', ]; diff --git a/modules/core/update/src/FarmUpdate.php b/modules/core/update/src/FarmUpdate.php index fe266d9ca..211142290 100644 --- a/modules/core/update/src/FarmUpdate.php +++ b/modules/core/update/src/FarmUpdate.php @@ -98,12 +98,11 @@ class FarmUpdate implements FarmUpdateInterface { // Iterate through config items and revert them. foreach ($revert_config as $name) { - // Get the config type. - // The lister gives NULL if simple configuration, but the reverter - // expects 'system.simple' so we convert it. + // Get the config type and bail if simple configuration. + // The lister gives NULL if simple configuration. $type = $this->configList->getTypeNameByConfigName($name); if ($type === NULL) { - $type = 'system.simple'; + continue; } // Get the config short name. diff --git a/modules/core/update/tests/modules/farm_update_test/config/install/farm_update.settings.yml b/modules/core/update/tests/modules/farm_update_test/config/install/farm_update.settings.yml index e22bba573..8cdfcec66 100644 --- a/modules/core/update/tests/modules/farm_update_test/config/install/farm_update.settings.yml +++ b/modules/core/update/tests/modules/farm_update_test/config/install/farm_update.settings.yml @@ -1,2 +1,2 @@ exclude_config: - - system.theme + - farm_flag.flag.review diff --git a/modules/core/update/tests/modules/farm_update_test/farm_update_test.module b/modules/core/update/tests/modules/farm_update_test/farm_update_test.module index 48400a1fb..50be00e63 100644 --- a/modules/core/update/tests/modules/farm_update_test/farm_update_test.module +++ b/modules/core/update/tests/modules/farm_update_test/farm_update_test.module @@ -9,5 +9,5 @@ * Implements hook_farm_update_exclude_config(). */ function farm_update_test_farm_update_exclude_config() { - return ['system.file']; + return ['farm_flag.flag.priority']; } diff --git a/modules/core/update/tests/src/Kernel/FarmUpdateTest.php b/modules/core/update/tests/src/Kernel/FarmUpdateTest.php index 978db90f9..504ab7f28 100644 --- a/modules/core/update/tests/src/Kernel/FarmUpdateTest.php +++ b/modules/core/update/tests/src/Kernel/FarmUpdateTest.php @@ -32,7 +32,7 @@ class FarmUpdateTest extends KernelTestBase { 'config_update', 'farm_update', 'farm_update_test', - 'system', + 'farm_flag', ]; /** @@ -42,9 +42,10 @@ class FarmUpdateTest extends KernelTestBase { parent::setUp(); $this->configFactory = \Drupal::service('config.factory'); $this->farmUpdate = \Drupal::service('farm.update'); + $this->installEntitySchema('flag'); $this->installConfig([ 'farm_update_test', - 'system', + 'farm_flag', ]); } @@ -54,15 +55,15 @@ class FarmUpdateTest extends KernelTestBase { public function testFarmUpdate() { // Confirm that overridden config gets reverted. - $this->farmUpdateTestRevertSetting('system.logging', 'error_level', 'all'); + $this->farmUpdateTestRevertSetting('farm_flag.flag.monitor', 'label', 'Changed'); // Confirm that config excluded via hook_farm_update_exclude_config() does // not get reverted. - $this->farmUpdateTestRevertSetting('system.file', 'default_scheme', 'public', TRUE); + $this->farmUpdateTestRevertSetting('farm_flag.flag.priority', 'label', 'Changed', TRUE); // Confirm that config excluded via farm_update.settings does not get // reverted. - $this->farmUpdateTestRevertSetting('system.theme', 'default', 'claro', TRUE); + $this->farmUpdateTestRevertSetting('farm_flag.flag.review', 'label', 'Changed', TRUE); } /**