Problem/Motivation

Discovered while making tests run on Drupal 10.2 over at #3396042: Adopt GitLab CI.

Drupal 10.2 added:

  1. type: langcode
  2. type: machine_name
  3. type: required_label

Consequently, the hardcoded logic in \Drupal\config_inspector\Form\ConfigInspectorItemForm::buildFormConfigElement() that only supports a dozen or so types no longer works. And it has never worked for contrib-defined types.

Steps to reproduce

Use Config Inspector 2.1.5 on Drupal 10.2.x.

Proposed resolution

  1. Use a type hierarchy to determine appropriate form elements: required_label extends label which extends string.
  2. Bonus points: when installed, use Content Translation's config_translation_config_schema_info_alter() hardcoded improvements.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs work

A hard-coded work-around is available in the MR, but this really should implement the proposed resolution instead.

wim leers’s picture

Priority: Major » Normal

I was forced to introduce a subset of this in #3413217: Make tests pass on Drupal 10.2, for type: required_label.

It's still not using the full type hierarchy though; it's just using class (BooleanData, StringData, etc.).

So this issue remains relevant, but is less urgent now.