diff --git a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php index 0836eaf..4d2bd11 100644 --- a/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php +++ b/core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php @@ -94,7 +94,8 @@ protected function checkValue($key, $value) { if ($element instanceof PrimitiveInterface) { $success = ($type == 'integer' && $element instanceof IntegerInterface) || - ($type == 'double' && $element instanceof FloatInterface) || + // Allow integer values in a float field. + (($type == 'double' || $type == 'integer') && $element instanceof FloatInterface) || ($type == 'boolean' && $element instanceof BooleanInterface) || ($type == 'string' && $element instanceof StringInterface) || // Null values are allowed for all types. diff --git a/core/modules/config/tests/config_test/config/install/config_test.types.yml b/core/modules/config/tests/config_test/config/install/config_test.types.yml index 4ab2cdc..060a2b0 100644 --- a/core/modules/config/tests/config_test/config/install/config_test.types.yml +++ b/core/modules/config/tests/config_test/config/install/config_test.types.yml @@ -2,6 +2,7 @@ array: [] boolean: true exp: 1.2e+34 float: 3.14159 +float_as_integer: 1 hex: 0xC int: 99 octal: 0775 diff --git a/core/modules/config/tests/config_test/config/schema/config_test.schema.yml b/core/modules/config/tests/config_test/config/schema/config_test.schema.yml index 80dc9fb..a557789 100644 --- a/core/modules/config/tests/config_test/config/schema/config_test.schema.yml +++ b/core/modules/config/tests/config_test/config/schema/config_test.schema.yml @@ -68,6 +68,9 @@ config_test.types: float: type: float label: 'Float' + float_as_integer: + type: float + label: 'Float' exp: type: float label: 'Exponential' diff --git a/core/modules/options/tests/options_config_install_test/config/install/core.entity_form_display.node.options_install_test.default.yml b/core/modules/options/tests/options_config_install_test/config/install/core.entity_form_display.node.options_install_test.default.yml index 24ef602..fa50c85 100644 --- a/core/modules/options/tests/options_config_install_test/config/install/core.entity_form_display.node.options_install_test.default.yml +++ b/core/modules/options/tests/options_config_install_test/config/install/core.entity_form_display.node.options_install_test.default.yml @@ -13,7 +13,7 @@ bundle: options_install_test mode: default content: title: - type: string + type: string_textfield weight: -5 settings: size: 60 diff --git a/core/modules/options/tests/options_config_install_test/config/install/field.instance.node.options_install_test.body.yml b/core/modules/options/tests/options_config_install_test/config/install/field.instance.node.options_install_test.body.yml index a5921fc..e206ebb 100644 --- a/core/modules/options/tests/options_config_install_test/config/install/field.instance.node.options_install_test.body.yml +++ b/core/modules/options/tests/options_config_install_test/config/install/field.instance.node.options_install_test.body.yml @@ -16,6 +16,5 @@ default_value: { } default_value_function: '' settings: display_summary: true - text_processing: true third_party_settings: { } field_type: text_with_summary