Drupal >=10.2: Use the new #config_target Form API property

Created on 19 December 2023, 12 months ago
Updated 21 December 2023, 12 months ago

Problem/Motivation

A new #config_target Form API property was added to simplify validation of simple config forms, and it will also be used in the core issue that plans on replacing the need for this module: 🐛 Display status message on configuration forms when there are overridden values Fixed . We should adopt it here as well to ease the transition to the core solution.

See the change record .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Comments & Activities

  • Issue created by @dieterholvoet
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    TIL thanks to @rosiel that this module exists! 🤯

    This would definitely have been helpful when we were working on landing the many issues that made the change record https://www.drupal.org/node/3373502 a reality. 😅

    #config_target will indeed be used to bring functionality similar to this module to Drupal core in 🐛 Display status message on configuration forms when there are overridden values Fixed — I think a review from you would be super valuable there!

    COI's #config vs core's #config_target

    @rosiel pointed me to https://www.drupal.org/docs/8/modules/config-override-inspector/integrat... .

    COI seems to not have been written with validation constraints in mind (which makes sense). That’s why there are architectural differences.

    Furthermore, COI will AFAICT only work when there’s a 1:1 mapping between UI/form elements and config property paths.

    That’s specifically what we wanted to avoid in core, because 1:1 mapping of that implies that the UI must be a literal match of the config structure. And config structure makes sense to computers/developers, not to humans 😄

    So, while COI looks like a fine contrib module, AFAICT it doesn’t “scale” to meet core’s requirements.

    Conclusion

    By no means did I mean to duplicate COI's work, I was unfortunately simply unaware. I hope that what you find in core will satisfy you … and I would LOVE to hear from you which things you believe should change/evolve in Drupal core, because I'm certain you have insights we do not yet have!

Production build 0.71.5 2024