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:

(add when find one).


related/follow-up #1945246: Can Symfony .yml exporter export integer/boolean values *without* quotes in configuration files?

#16 wrap_integer_in_quotes-1930226-16.patch285 bytesEllaTheHarpy
PASSED: [[SimpleTest]]: [MySQL] 53,260 pass(es).
[ View ]
#16 interdiff-4-16.txt287 bytesEllaTheHarpy
#4 wrap_integer_in_quotes-1930226-3.patch285 bytesbzitzow
PASSED: [[SimpleTest]]: [MySQL] 52,429 pass(es).
[ View ]
#3 wrap_integer_in_quotes-1930226-3.patch285 bytesbzitzow
PASSED: [[SimpleTest]]: [MySQL] 52,389 pass(es).
[ View ]


Title:Update integer/boolean value with quotes in configuration files.Update integer/boolean values with quotes in configuration files.

BTW 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.

new285 bytes
PASSED: [[SimpleTest]]: [MySQL] 52,389 pass(es).
[ View ]

My first patch. Feedback appreciated. Thank you!

Assigned:Unassigned» bzitzow
Status:Active» Needs review
new285 bytes
PASSED: [[SimpleTest]]: [MySQL] 52,429 pass(es).
[ View ]

Updated status to needs review

Thanks 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 and let me(vijaycs85) know any question on IRC (#drupal-i18n).

Status:Needs review» Needs work

I 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.

@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.

That 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.

Issue tags:+Drupalism

Rather 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.

I dont think we did anything to the Symfony yml parser to be painful, I believe we use it as-is, no?

Yeah, 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. is the d.o doc page pointed to from the change record ( form the issue #1866610: Introduce Kwalify-inspired schema format for configuration

In Drupal, integer values contained YAML config data files are cast to string and therefore are wrapped in single quotes.

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.

I'll do the change in comment #6 and change the double quotes to single quotes.

#1602106: Document default configuration files is the closest I could come to the regular config yml standards

Status:Needs work» Needs review
new287 bytes
new285 bytes
PASSED: [[SimpleTest]]: [MySQL] 53,260 pass(es).
[ View ]

I changed the double quotes to single quotes.

related: #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.

Assigned:bzitzow» Unassigned
Status:Needs review» Closed (duplicate)

Issue summary:View changes

added related/follow-up