ConfigInspectorItemForm::buildFormConfigElement() should use a type hierarchy instead of hardcoding form items for types

Created on 24 October 2023, about 1 year ago
Updated 9 January 2024, 10 months ago

Problem/Motivation

Discovered while making tests run on Drupal 10.2 over at 📌 Adopt GitLab CI Fixed .

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

🐛 Bug report
Status

Needs work

Version

2.1

Component

Code

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024