Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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:
action.settings.yml
views.view.test_bulk_form.yml
User interface changes
NO
API changes
NO
Related Issues
Parent: #1653026: [META] Use properly typed values in module configuration
Comment | File | Size | Author |
---|---|---|---|
#12 | 2105905-action-cofig-cleanup-12.patch | 4.67 KB | vijaycs85 |
#7 | 2105905-action-yml-type-casting-7.patch | 4.51 KB | krishnan.n |
#3 | 2105905-action-yml-type-casting-3.patch | 4.97 KB | vijaycs85 |
#3 | 2105905-diff-2-3.txt | 4.42 KB | vijaycs85 |
#2 | 2105905-action-yml-type-casting-2.patch | 4.82 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Comment #2
vijaycs85Initial patch...
Comment #3
vijaycs85changing int to bool...
Comment #4
cosmicdreams CreditAttribution: cosmicdreams commentedIn other patches you use lowercase for boolean statements.
Which should they be uppercase or lowercase. Pick one.
Comment #5
tim.plunkettUppercase.EDIT: chx's point below trumps all other conventions.
Comment #6
chx CreditAttribution: chx commentedlowercase. Bring the issue up with the symfony yaml guys. It dumps lowercase.
Comment #7
krishnan.n CreditAttribution: krishnan.n commented'0' => false, '1' => true. This is only for: config/views.view.test_bulk_form.yml. Will work thru the rest, if this is OK.
Comment #8
krishnan.n CreditAttribution: krishnan.n commentedPlease provide review feedback on the patch above, and i'll script through the rest of the tree -- thx.
Comment #9
chx CreditAttribution: chx commentedYes this looks good! Careful with scripting. Perhaps share the script with us? You can't wholesale search-replace 1 and 0 to true and false, sometimes they are numbers.
Comment #10
krishnan.n CreditAttribution: krishnan.n commentedScript attached:
Also, how best to walk through directory tree to pick up relevant yml files? This is the rough version:
Better to do the above by hand?
Comment #11
damiankloip CreditAttribution: damiankloip commentedGroup should definitely be a number, this is the group used when the condition groups are built for the query. So 1 is the default group here.
Comment #11.0
damiankloip CreditAttribution: damiankloip commentedupdating views.view.test_bulk_form.yml
Comment #12
vijaycs85Re-roll...
Comment #13
vijaycs85The 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.