- Issue created by @narendraR
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The big question: what would we do to any config that does have
|
,(
or)
in their name? 🤔
This is what \Drupal\Core\Config\ConfigBase::validateName()
looks like:
// The name must not contain any of the following characters:
// : ? * < > " ' / \
if (preg_match('/[:?*<>"\'\/\\\\]/', $name)) {
throw new ConfigNameException("Invalid character in Config object name $name.");
}
But …
Agreed we can question the wisdom of `ConfigBase::validateName()`, but that's not up to Recipes to change. Recipes should be able to install any config that is valid. So let's open a core issue to tighten that instead? :blush:
@chx requested in #1701014-63: Validate config object names → to disallow
|
and a range of other characters (but not(
or)
) and @xjm implemented it in #1701014-73: Validate config object names → … but forgot|
. So AFAICT the best course of action is to create a follow-up to tighten this in Drupal core 👍
— #3420209-17: Allow config actions to be applied to multiple config entities using wildcards →
This is that follow-up!
$ touch "foo|bar.yml" $ touch "foo(bar).yml" $ ls -l *.yml -rw-r--r-- 1 wim.leers staff 0 Feb 26 13:19 foo(bar).yml -rw-r--r-- 1 wim.leers staff 0 Feb 26 13:18 foo|bar.yml
…
The existing test coverage was added in #1701014: Validate config object names → . `@chx` requested over at #1701014-63: Validate config object names → to disallow
|
, but not(
or)
. @xjm implemented his suggestion 10 comments later at #1701014-73: Validate config object names → , but apparently forgot about the pipe. So it seems like this was a simple oversight!
— source: https://git.drupalcode.org/project/distributions_recipes/-/merge_request...
Active
11.0 🔥
Last updated
Enhances developer experience.
A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.
The big question: what would we do to any config that does have |
, (
or )
in their name? 🤔