diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index 2416947..d05d69d 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -171,14 +171,14 @@ public function clearCachedDefinitions() { * Colons are also used, for example, * block.settings.system_menu_block:footer will check for definitions in the * following order: - * block.settings.system_menu_block* - * block.settings.* - * block.*.* - * block.* + * block.settings.system_menu_block:* + * block.settings.*:* + * block.*.*:* + * block.*:* */ protected function getFallbackName($name) { // Check for definition of $name with filesystem marker. - $replaced = preg_replace('/:?([^\.:]+)([\.:\*]*)$/', '*\2', $name); + $replaced = preg_replace('/([^\.:]+)([\.:\*]*)$/', '*\2', $name); if ($replaced != $name) { if (isset($this->definitions[$replaced])) { return $replaced; diff --git a/core/modules/config/src/Tests/ConfigSchemaTest.php b/core/modules/config/src/Tests/ConfigSchemaTest.php index 5e8f47b..16510b3 100644 --- a/core/modules/config/src/Tests/ConfigSchemaTest.php +++ b/core/modules/config/src/Tests/ConfigSchemaTest.php @@ -408,26 +408,26 @@ function testColonsInSchemaTypeDetermination() { $this->assertEqual($definition['type'], 'test.plugin_types.boolean'); $definition = $tests[1]->getDataDefinition()->toArray(); - $this->assertEqual($definition['type'], 'test.plugin_types.boolean*'); + $this->assertEqual($definition['type'], 'test.plugin_types.boolean:*'); $definition = $tests[2]->getDataDefinition()->toArray(); $this->assertEqual($definition['type'], 'test.plugin_types.*'); $definition = $tests[3]->getDataDefinition()->toArray(); - $this->assertEqual($definition['type'], 'test.plugin_types.*'); + $this->assertEqual($definition['type'], 'test.plugin_types.*:*'); $tests = \Drupal::service('config.typed')->get('config_schema_test.plugin_types')->get('test_with_parents'); $definition = $tests[0]['settings']->getDataDefinition()->toArray(); $this->assertEqual($definition['type'], 'test_with_parents.plugin_types.boolean'); $definition = $tests[1]['settings']->getDataDefinition()->toArray(); - $this->assertEqual($definition['type'], 'test_with_parents.plugin_types.boolean*'); + $this->assertEqual($definition['type'], 'test_with_parents.plugin_types.boolean:*'); $definition = $tests[2]['settings']->getDataDefinition()->toArray(); $this->assertEqual($definition['type'], 'test_with_parents.plugin_types.*'); $definition = $tests[3]['settings']->getDataDefinition()->toArray(); - $this->assertEqual($definition['type'], 'test_with_parents.plugin_types.*'); + $this->assertEqual($definition['type'], 'test_with_parents.plugin_types.*:*'); } } diff --git a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml index bcca468..17d6436 100644 --- a/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml +++ b/core/modules/config/tests/config_schema_test/config/schema/config_schema_test.schema.yml @@ -181,7 +181,7 @@ test.plugin_types.boolean: value: type: boolean -test.plugin_types.boolean*: +test.plugin_types.boolean:*: type: test.plugin_types.boolean test_with_parents.plugin_types.boolean: @@ -190,7 +190,7 @@ test_with_parents.plugin_types.boolean: value: type: boolean -test_with_parents.plugin_types.boolean*: +test_with_parents.plugin_types.boolean:*: type: test_with_parents.plugin_types.boolean test.plugin_types.*: @@ -201,8 +201,14 @@ test.plugin_types.*: value: type: string +test.plugin_types.*:*: + type: test.plugin_types.* + test_with_parents.plugin_types.*: type: mapping mapping: value: type: string + +test_with_parents.plugin_types.*:*: + type: test_with_parents.plugin_types.*