Refine ValidKeysConstraintValidator's messages: use #3401883's new Mapping infrastructure

Created on 6 December 2023, almost 2 years ago
Updated 10 January 2024, almost 2 years ago

Problem/Motivation

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

ℹ️ This MR contains 310 insertions(+), 59 deletions(-) of the 1125 insertions(+), 151 deletions(-) that the MR for πŸ“Œ Configuration schema & required keys Fixed contains. IOW: this shrinks the other MR by ~30%. The other MR can be layered cleanly on top of this one; not a single line added there would need to change.

Now that πŸ“Œ Introduce Mapping::getValidKeys(), ::getRequiredKeys() etc. Active landed, a small part of πŸ“Œ Configuration schema & required keys Fixed can actually land ahead of the bigger/more contentious change: the ability to provide more precise validation error messages for when keys are invalid due to a dynamic type (a "variable value" in the config schema type).

For example:

block.block.*:
  type: config_entity
  label: 'Block'
  mapping:
…
    plugin:
      type: string
      label: 'Plugin'
      constraints:
        PluginExists:
          manager: plugin.manager.block
          interface: Drupal\Core\Block\BlockPluginInterface
    settings:
      type: block.settings.[%parent.plugin]

Steps to reproduce

N/A

Proposed resolution

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated about 1 month ago

Created by

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

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024