Drupal's next leap: configuration validation

4 Jun 2023, 11:30 pm
50 minutes

Drupal 8 shipped with many exciting new concepts, including "configuration", "configuration and content entities", "validation constraints" and "API-First".

The missing link between these has always been the inability to modify configuration through Drupal's REST or JSON:API. Because only content entities have validation constraints.

This has been the #1 blocker to the Drupal (JS) Admin UI initiative: validation of configuration unfortunately (but understandably) still is hardcoded in the PHP-based form logic.

But … in the background, the foundation was laid during the Drupal 8 cycle to validate configuration. In fact, one contrib module has been doing it since 3 years before this DrupalCon is taking place — no core hacks required.

Drupal 10's CKEditor 5 module is the first time that Drupal core is using validation constraints instead of form-based validation logic!

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!

It also paves the path for the Recipes Initiative as well as the many configuration management-related modules to become much more reliable.

When:  to 

Room: Room 323

Track: drupal core

Learning Objectives

Learn how to start using validation constraints on your configuration _today_.

Prerequisites

configuration system (config schema knowledge optional)

Synopsis

Configuration validation: more reliable Drupal modules, more reliable sites and *truly* API-First Drupal!

Other Sessions