Follow up for #1953404: Add config schema to field and instance config entities

Problem/motivation

#1866610: Introduce Kwalify-inspired schema format for configuration introduced the idea of config schema. The changelog leads to (hopefully extensive) documentation on the format at http://drupal.org/node/1905070. As a part of schema addition to field module(#1953404: Add config schema to field and instance config entities), found that we have to provide schema for field types, field widgets and field storage.

Proposed solution

Create a configuration schema for field types, field widget and field storage (if applicable) defined in number module.
Schema in place

Schema not yet in place
field.number_integer.settings
field.number_integer.instance_settings
field.number_integer.value

field.number_decimal.settings
field.number_decimal.instance_settings
field.number_decimal.value

field.number_float.settings
field.number_float.instance_settings
field.number_float.value

field_widget.number.settings

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vijaycs85’s picture

vijaycs85’s picture

Component: field system » number.module
swentel’s picture

+++ b/core/modules/number/config/schema/number.schema.ymlundefined
@@ -0,0 +1,127 @@
+# Schema for configuration files of the Number module.

The config schema for text does not capitalize the field module name. I'm not sure what the policy is, but let's make sure it's all the same :)

+++ b/core/modules/number/config/schema/number.schema.ymlundefined
@@ -0,0 +1,127 @@
+field.number_integer.settings:
+  type: sequence
+  label: 'Integer settings'
+  sequence:
+    - type: string
+      label: 'setting'

I'm trying to figure out where this points to ? Sorry if this is a stupid question :/

One other thing I've been wondering: 'DefaultNumberFormatter' class contains settings for the formatter ('Thousand marker' and 'Display prefix and suffix'). Is that something that needs to be in the config schema as well ?

swentel’s picture

Title: Provide config schema to field types, widgets and storage in number module » Provide config schema to field types and storage in number module
Status: Needs review » Needs work
Nitesh Sethia’s picture

Everything working fine from my side.
Good to go....

AjitS’s picture

Status: Needs work » Needs review
FileSize
2.63 KB

Removing widget as per #4.

AjitS’s picture

Please ignore the previous patch. Changed the module's name to lower case as per #3. Though I'm not sure about the 'DefaultNumberFormatter'.

yched’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
2.35 KB

I just removed the user_register_form instance setting, it's a thing from the past now that form "form modes" are in.

Other than that, looks good, thanks !

Status: Reviewed & tested by the community » Needs work
Issue tags: -Configuration system, -D8MI, -Field API, -language-config, -Configuration schema, -Field configuration schema

The last submitted patch, 1973450-config-schema-field-number-8.patch, failed testing.

yched’s picture

yched’s picture

Status: Needs review » Reviewed & tested by the community
yched’s picture

Note : opened #2049485: Remove traces of the 'user_register_form' field setting to remove 'user_register_form' from the existing config entries and config schemas

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed fc7cd79 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.