Default config is not in the correct order defined in the schema

Created on 26 November 2024, 25 days ago

Problem/Motivation

If you take the config/install/sendgrid.settings.yml file and copy it to your config/sync directory, it will always show as needing to import like this:

drush config:import --diff
diff --git a/tmp/drush_tmp_1732644399_67460e2fd0b3c/sendgrid.settings.yml b/tmp/drush_tmp_1732644400_67460e30d91b8/sendgrid.settings.yml
index c8818b36..909c805d 100644
--- a/tmp/drush_tmp_1732644399_67460e2fd0b3c/sendgrid.settings.yml
+++ b/tmp/drush_tmp_1732644400_67460e30d91b8/sendgrid.settings.yml
@@ -1,7 +1,7 @@
 _core:
   default_config_hash: ...
 api_key: ''
-debug_mode: false
 ip_pool_name: ''
+debug_mode: false
 format_filter: ''
 use_theme: false

Because when you save the module settings page, you get the config saved in this order (with debug_mode before ip_pool_name):

sendgrid.settings:
  type: config_object
  label: 'Sendgrid settings'
  mapping:
    api_key:
      type: string
    debug_mode:
      type: boolean
    ip_pool_name:
      type: string
    format_filter:
      type: string
    use_theme:
      type: boolean

https://git.drupalcode.org/project/sendgrid/-/blob/1.0.x/config/schema/s...

Steps to reproduce

  1. Copy the module's config/install/sendgrid.settings.php to your site's config/sync directory
  2. Do a drush config:import
  3. Do a drush config:status that shows that the sendgrid.settings config is still not the same.

Proposed resolution

Fix the default config to use the correct order in sync with the schema file.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024