Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/motivation
Some of the yml files having integer/boolean values without quotes.
Proposed solution
For consistency, Update integer/boolean values on quotes in yml files.
Found in:
dblog.settings.yml
(add when find one).
Related
related/follow-up #1945246: Can Symfony .yml exporter export integer/boolean values *without* quotes in configuration files?
Comment | File | Size | Author |
---|---|---|---|
#16 | wrap_integer_in_quotes-1930226-16.patch | 285 bytes | shnark |
#16 | interdiff-4-16.txt | 287 bytes | shnark |
#4 | wrap_integer_in_quotes-1930226-3.patch | 285 bytes | bzitzow |
#3 | wrap_integer_in_quotes-1930226-3.patch | 285 bytes | bzitzow |
Comments
Comment #1
vijaycs85Comment #2
Gábor HojtsyBTW this would be important for diffing the data files when they change, so the diff will only show the real changes. Otherwise the .yml export would change pure formatting.
Comment #3
bzitzow CreditAttribution: bzitzow commentedMy first patch. Feedback appreciated. Thank you!
Comment #4
bzitzow CreditAttribution: bzitzow commentedUpdated status to needs review
Comment #5
vijaycs85Thanks for the patch @bzitzow. However this issue needs some discussion and decision on how are we going further with integer values. So it is kind of on hold for now (though your patch is valid). If you are looking for issues to work on, please check http://www.drupal8multilingual.org/issues/schema and let me(vijaycs85) know any question on IRC (#drupal-i18n).
Comment #6
Gábor HojtsyI am not sure what kind of discussion we are looking here. The standard already is to have integers in *single* quotes, because that is how Drupal would re-export it. I dont think that needs discussion?! As for the patch, it uses double quotes, so incorrect.
Comment #7
vijaycs85@Gábor Hojtsy, basically we don't want any quotes for integer. Other day on IRC @alexpott mentioned about an old issue where we tried to agree for this quotes stuff and haven't got any conclusion.
Comment #8
Gábor HojtsyThat issue would be good to reference then. As far as I know, the current Symfony .yml exporter would export the integer values in quotes, so as far as the current behaviour goes, it would need to be in quotes.
Comment #9
YesCT CreditAttribution: YesCT commentedrelated/follow-up #1945246: Can Symfony .yml exporter export integer/boolean values *without* quotes in configuration files?
Comment #10
DamienMcKennaRather than trying to make all YAML strings incorrect "for consistency", how about fixing them so the quotes aren't necessary? Drupal should be able to create and read YAML-spec-compliant files without adding more Drupalisms.
Comment #11
Gábor HojtsyI dont think we did anything to the Symfony yml parser to be painful, I believe we use it as-is, no?
Comment #12
Gábor HojtsyYeah, we dont use it as-is, see #1653026: [META] Use properly typed values in module configuration. if that is fixed, the direction of this patch would be reversed.
Comment #13
YesCT CreditAttribution: YesCT commentedhttp://drupal.org/node/1905070 is the d.o doc page pointed to from the change record (http://drupal.org/node/1905120) form the issue #1866610: Introduce Kwalify-inspired schema format for configuration
http://drupal.org/node/1905070
says:
That doc is more about the schema standards... I'll see if I can find the one for the config standards. but it's the same, need single quotes.
Comment #14
shnark CreditAttribution: shnark commentedI'll do the change in comment #6 and change the double quotes to single quotes.
Comment #15
YesCT CreditAttribution: YesCT commented#1602106: Document default configuration files is the closest I could come to the regular config yml standards
Comment #16
shnark CreditAttribution: shnark commentedI changed the double quotes to single quotes.
Comment #17
YesCT CreditAttribution: YesCT commentedrelated: #1938580: [META] Make active config save format match the default yml file (order and quotes)
next step, check if any other files in dblog need similar fixing.
Comment #18
vijaycs85Closing this as duplicate of #1653026: [META] Use properly typed values in module configuration
Comment #18.0
vijaycs85added related/follow-up