Follow up for #1930226: Update integer/boolean values with quotes in configuration files. and @webchick's comment on #1938570-11: Make views active config save format match the default yml file (order and quotes)

Problem/Motivation

quoting ints, quotes around integers, in yml configuration files is strange.

Proposed resolution

make active config export ints without single quotes.

Remaining tasks

  • discuss if this is wanted, if it makes sense and if it is possible.
  • find other related, or background issues, and confirm this is not a duplicate of another issue

User interface changes

No UI changes.

API changes

No API changes. (?)

Related Issues

background: #1938580: [META] Make active config save format match the default yml file (order and quotes)
deep background: #1648930: Introduce configuration schema and use for translation
#1851498: Polish file format of configuration metadata (for translation)
Trying to figure out where the standards come from
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

Comments

YesCT’s picture

Note, the meta and the sub issues to make the default and active config match is great. #1938580: [META] Make active config save format match the default yml file (order and quotes) And it should proceed.

This issue is about changing the standard. If the standard gets changed later, those issues in the meta to make things match will be super helpful, because we will have identified the config files already and have people who are familiar with getting them changed.

alexpott’s picture

Tempted to mark this as a duplicate of #1653026: [META] Use properly typed values in module configuration

Personally I have always thought that we should be using YAML's ability to persist variable type... but the issue is the form api where all return values are a string (well apart from checkboxes... but this has an interesting @todo in it... http://api.drupal.org/api/drupal/core%21includes%21form.inc/function/for...).

However, now that we are using custom submit handlers (and not system_settings_form) to save config it would be possible to cast the values to the correct type then. Additionally the fact we have config schema's and can actually validate the type is another thing in favour of using YAML's variable type persistance functionality.

YesCT’s picture

I think

the fact we have config schema

refers (in part) to #1910624: [META] Introduce and complete configuration schemas in all of core

DamienMcKenna’s picture

Issue tags: +Drupalism

The YAML files should adhere to the YAML specification and be able to read files built as such, anything else is introducing Yet Another Drupalism.

webchick’s picture

Status: Active » Closed (duplicate)

Actually, I think this is a duplicate of #1653026: [META] Use properly typed values in module configuration. I knew we had discussed this somewhere.

alexpott’s picture

Status: Closed (duplicate) » Active

I'm not sure we're breaking the YAML spec here... all we're doing is casting everything to strings... cause that is what FAPI does... and yep FAPI is a drupalism :)

The function that does this: http://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Config%21C...

alexpott’s picture

Status: Active » Closed (duplicate)

Crosspost... resetting as a dupe of #1653026: [META] Use properly typed values in module configuration

However... I'd be great if people following this can chime in there!