diff --git a/core/lib/Drupal/Core/Config/TypedConfigManager.php b/core/lib/Drupal/Core/Config/TypedConfigManager.php index 11462ef..24b6366 100644 --- a/core/lib/Drupal/Core/Config/TypedConfigManager.php +++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php @@ -170,17 +170,16 @@ public function clearCachedDefinitions() { * Colons are also used, for example, * block.settings.system_menu_block:footer check will for definitions in the * following order: - * block.settings.system_menu_block:* - * block.settings.*:* + * block.settings.system_menu_block* * block.settings.* - * block.*.*:* + * block.*.* * block.* * * Returns null, if no matching element. */ 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; @@ -190,7 +189,7 @@ protected function getFallbackName($name) { // wildcard to see if there is a greedy match. For example, // breakpoint.breakpoint.*.* becomes // breakpoint.breakpoint.* - $one_star = preg_replace('/\.([:\.\*]*)$/', '.*', $replaced); + $one_star = preg_replace('/\.([\.\*]*)$/', '.*', $replaced); if ($one_star != $replaced && isset($this->definitions[$one_star])) { return $one_star; } diff --git a/core/modules/config/src/Tests/ConfigSchemaTest.php b/core/modules/config/src/Tests/ConfigSchemaTest.php index a050b46..010ea19 100644 --- a/core/modules/config/src/Tests/ConfigSchemaTest.php +++ b/core/modules/config/src/Tests/ConfigSchemaTest.php @@ -406,7 +406,7 @@ function testSchemaTypeResolver() { $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.*'); @@ -419,7 +419,7 @@ function testSchemaTypeResolver() { $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.*'); 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 888ad5f..bcca468 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.*: