Follow-up from #1653026: [META] Use properly typed values in module configuration.

Problem/Motivation

All integers, Booleans, and even octal numbers in config object files are converted to strings.

Proposed resolution

#1653026: [META] Use properly typed values in module configuration has fixed core, so no need to convert all data types to string anymore.

Remaining tasks

Fix and issue patch for below config files:
comment.local_tasks.yml
comment.routing.yml
entity.view_mode.comment.full.yml
system.action.comment_publish_action.yml
system.action.comment_save_action.yml
system.action.comment_unpublish_action.yml
views.view.test_comment_row.yml
views.view.test_comment_rss.yml
views.view.test_comment_user_uid.yml

User interface changes

NO

API changes

NO

Parent: #1653026: [META] Use properly typed values in module configuration

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sidharthap’s picture

Status: Active » Needs review
FileSize
10.85 KB

initial patch

vijaycs85’s picture

Status: Needs review » Needs work

Thanks for the patch @sidharthap.

+++ b/core/modules/comment/config/system.action.comment_publish_action.yml
@@ -1,7 +1,7 @@
-status: true
+status: TRUE

+++ b/core/modules/comment/config/system.action.comment_save_action.yml
@@ -1,7 +1,7 @@
-status: true
+status: TRUE

+++ b/core/modules/comment/config/system.action.comment_unpublish_action.yml
@@ -1,7 +1,7 @@
-status: true
+status: TRUE

+++ b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_row.yml
@@ -2,13 +2,13 @@ base_field: cid
-status: '1'
+status: 1

@@ -20,54 +20,54 @@ display:
+          disable_sql_rewrite: 0
+          distinct: 0
+          slave: 0
...
-          reset_button: '0'
+          reset_button: 0
...
-          expose_sort_order: '1'
+          expose_sort_order: 1
...
+            items_per_page_options_all: 0
...
-          links: '1'
+          links: 1
...
-          required: '1'
+          required: 1

@@ -79,50 +79,50 @@ display:
+            alter_text: 0
+            make_link: 0
+            absolute: 0
+            trim: 0
+            word_boundary: 0
+            ellipsis: 0
+            strip_tags: 0
+            html: 0
+          hide_empty: 0
+          empty_zero: 0
+          link_to_comment: 1
...
-          exclude: '0'
...
-          element_label_colon: '1'
+          element_label_colon: 1
...
-          element_default_classes: '1'
+          element_default_classes: 1
...
-          hide_alter_empty: '1'
-          link_to_node: '0'
...
-          value: '1'

+++ b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_rss.yml
@@ -2,7 +2,7 @@ base_field: cid
-status: '1'
+status: 1

@@ -28,7 +28,7 @@ display:
-          required: '1'
+          required: 1

@@ -39,17 +39,17 @@ display:
-            alter_text: '0'
-            make_link: '0'
-            absolute: '0'
-            trim: '0'
-            word_boundary: '0'
-            ellipsis: '0'
-            strip_tags: '0'
-            html: '0'
-          hide_empty: '0'
-          empty_zero: '0'
-          link_to_comment: '1'
+            alter_text: 0
+            make_link: 0
+            absolute: 0
+            trim: 0
+            word_boundary: 0
+            ellipsis: 0
+            strip_tags: 0
+            html: 0
+          hide_empty: 0
+          empty_zero: 0
+          link_to_comment: 1

+++ b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml
@@ -1,7 +1,7 @@
-status: '1'
+status: 1

@@ -36,7 +36,7 @@ display:
-          query_comment: '0'
+          query_comment: 0

+++ b/core/modules/locale/config/locale.settings.yml
@@ -1,14 +1,14 @@
-cache_strings: true
-translate_english: false
+cache_strings: TRUE
+translate_english: FALSE
...
-  check_disabled_modules: false
+  check_disabled_modules: FALSE
...
-  overwrite_customized: false
-  overwrite_not_customized: true
+  overwrite_customized: FALSE
+  overwrite_not_customized: TRUE
...
-  import_enabled: '1'
+  import_enabled: 1

All boolean should be lower true or false.

sidharthap’s picture

Status: Needs work » Needs review
FileSize
7.78 KB

Thank you for the review @Vijaycs85
corrected #2 comment.

enhdless’s picture

Issue summary: View changes
Status: Needs review » Needs work

As Vijaycs85 mentioned in #2, boolean 1's and 0's should be true or false instead.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
3.41 KB
7.88 KB

Updating config file...

vijaycs85’s picture

Updated group to int

vijaycs85’s picture

vijaycs85’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2167623: Add test for all default configuration to ensure schema exists and is correct

The patch on this issue has been updated as part of #2167623: Add test for all default configuration to ensure schema exists and is correct. As this issue doesn't have any test to confirm/validate the schema, making this change and closing this issue as duplicate of #2167623: Add test for all default configuration to ensure schema exists and is correct. The contributors of this issue (in commit message) is copied to #2167623: Add test for all default configuration to ensure schema exists and is correct.