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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vijaycs85’s picture

Title: Update integer/boolean value with quotes in configuration files. » Update integer/boolean values with quotes in configuration files.
Gábor Hojtsy’s picture

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.

bzitzow’s picture

My first patch. Feedback appreciated. Thank you!

bzitzow’s picture

Assigned: Unassigned » bzitzow
Status: Active » Needs review
FileSize
285 bytes

Updated status to needs review

vijaycs85’s picture

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 http://www.drupal8multilingual.org/issues/schema and let me(vijaycs85) know any question on IRC (#drupal-i18n).

Gábor Hojtsy’s picture

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.

vijaycs85’s picture

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

Gábor Hojtsy’s picture

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.

YesCT’s picture

DamienMcKenna’s picture

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.

Gábor Hojtsy’s picture

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

Gábor Hojtsy’s picture

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.

YesCT’s picture

http://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:

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.

shnark’s picture

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

YesCT’s picture

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

shnark’s picture

Status: Needs work » Needs review
FileSize
287 bytes
285 bytes

I changed the double quotes to single quotes.

YesCT’s picture

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.

vijaycs85’s picture

Assigned: bzitzow » Unassigned
Status: Needs review » Closed (duplicate)
vijaycs85’s picture

Issue summary: View changes

added related/follow-up