Problem
- Many (core) developers did not notice that the config_prefix of config entities does NOT contain a trailing dot and forgot it when listing/querying for all available config object names within a config-prefix namespace.
- Omitting the trailing dot can very/too easily lead to false-positives. Essentially a very similar problem space we have with module hook implementation names already; e.g.,
foo_bar_baz()
can be foo's hook implementation ofhook_bar_baz()
, but also foo_bar's hook implementation ofhook_baz()
.
Proposed solution
No change to existing entity type meta-data/annotations.
Make the entity plugin manager perform this:
<?php
// Ensure that config_prefix ends with a trailing dot.
if (isset($definition['config_prefix'])) {
$definition['config_prefix'] = rtrim($definition['config_prefix'], '.') . '.';
}
?>Change all callers/actors that operate on config_prefix directly to remove the additional/custom futzing with a trailing dot.