Introduce Mapping::getValidKeys(), ::getRequiredKeys() etc.

Created on 15 November 2023, about 1 year ago
Updated 1 February 2024, 11 months ago

Problem/Motivation

Split off from πŸ“Œ Configuration schema & required keys Fixed .

Introduce Mapping::getValidKeys(), ::getRequiredKeys(), etc.

For full history of how we (@bircher and I) arrived at this, see πŸ“Œ Configuration schema & required keys Fixed .

Unblocks

  1. core: πŸ“Œ Configuration schema & required keys Fixed
  2. contrib: https://www.drupal.org/project/config_split β†’ β†’ πŸ“Œ Use required keys of mappings instead of special casing Needs review
  3. contrib: https://www.drupal.org/project/config_inspector β†’

Proposed resolution

  1. Mapping::getValidKeys()
  2. Mapping::getRequiredKeys()
  3. Mapping::getOptionalKeys()
  4. Mapping::getDynamicallyValidKeys()

Remaining tasks

Review.

User interface changes

None.

API changes

New methods on \Drupal\Core\Config\Schema\Mapping:

  1. Mapping::getValidKeys()
  2. Mapping::getRequiredKeys()
  3. Mapping::getOptionalKeys()
  4. Mapping::getDynamicallyValidKeys()

New method public TypedConfigManager::findFallback(), which is the public alias of HEAD's protected TypedConfigManager::getFallbackName(). That one remains around, unchanged, to avoid disruption for any contrib/custom subclasses of TypedConfigManager.
(This new public method is necessary for Mapping::getDynamicallyValidKeys().)

Data model changes

None.

Release notes snippet

None.

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated 2 days ago

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024