Site Builder (e.g., me)
Site Editor (e.g., my wife)
Exactly one copy or version
Creates zero or more items
Credit: Gábor Hojtsy
Quality
Coordination
Metadata
Repeatability
Verification
Consistency
Documentation
Control
for establishing and maintaining consistency
config/install
Only read at install time
core/modules/system/config/install/system.image.gd.yml
admin/config/media/image-toolkit
admin/config/development/configuration
system.schema.yml
Everyone is happy 🤓
Configuration System is robust
1st value:
“Individuals and interactions over processes and tools”
You are the only developer of a site and the configuration system is annoying
Contentment
Enable different modules in different environments
Articles recommend config split
Have you used the
config_split
module?
Have you experienced problems with the config_split
module?
A truly reliable config_split
needs infrastructure that doesn’t exist
Recommendations for ALL sites
config_exclude_modules
will be used for enabling modules on development sites.”settings.local.php
$settings['config_exclude_modules'] = ['devel', 'stage_file_proxy'];
Deployed configuration does not match local environments
Fingers were pointed 👉
Always use the configuration system (UI or drush) to export configuration
You exported with Drush,
but import still doesn’t work
Important config twice
Config import sometimes needs be run several times to fully sync
“Confirm Drupal site configuration is always in a default state”
if [[ $(./vendor/bin/drush config:status --format=json --state=Different) != '[]' ]]; then
echo "Config export does not match database."
./vendor/bin/drush config:status
exit 1;
fi
Who cares?
'#config_target'
ConfigExists
Length
NotBlank
Range
Regex
#config_target
Automatic Updates
Currently only targeting Drupal core
Updates to configuration in contrib modules are unreliable without config validation
Recipes
Without validation, Recipes can fail when multiple recipes are combined
Because of config validation,
Recipes can roll back
Write configuration via
JSON:API, GraphQL, etc.
Decoupled admin UI
more “API-First” than Drupal 8
still has a way to go
JS Admin UI was limited by a lack of configuration validation
Reliable config_split
?
[meta] Add constraints to all simple configuration
[meta] Add constraints to all config entity types
Wim Leers: Drupal’s next leap: configuration validation — it’s here!
… in your next project
Solve all of the world’s problems