Problem/Motivation
Discovered while making tests run on Drupal 10.2 over at #3396042: Adopt GitLab CI.
Drupal 10.2 added:
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
- Use a type hierarchy to determine appropriate form elements:
required_labelextendslabelwhich extendsstring. - 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
Issue fork config_inspector-3396297
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
Comment #3
wim leersA hard-coded work-around is available in the MR, but this really should implement the proposed resolution instead.
Comment #4
wim leersI 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.