Drupal’s Next Leap: Configuration Validation
Hidden in plain sight but unknown to most: Drupal 8.4 added the foundations for validating configuration! Then it took until Drupal 9.4 for actual adoption: the CKEditor 5 module. Since Drupal 10.1, those foundations have been steadily growing! 🚀
Since Drupal 10.2, it's possible for any module to delete their hardcoded PHP form validation logic and switch to validation constraints using #config_target within minutes for simple config, with additional benefits to boot — for both developers and site builders!
👆 LIVE DEMO to show how to adopt #config_target in 5 minutes 🤩
Not only does this allow modifying configuration through APIs, it also allows us to eliminate subtle configuration errors that go unnoticed, and thus make Drupal more reliable in general!
👆 LIVE DEMO to show how to easily make more of your module/site's configuration validatable (no more painful config diffs!) 🤓
Config validation has been the missing link to enable many things:
- modifying configuration through using REST/JSON:API/GraphQL 👈 LIVE DEMO 🤖
- the Drupal (JS) admin UI initiative
- Guaranteed-To-Work Recipes 👈 LIVE DEMO 👨🏻🍳
- more reliable config_split, Automatic Updates, and … more reliable modules in general!