Problem/Motivation
system.cron has 3 property path that are not yet validatable:
./vendor/bin/drush config:inspect --filter-keys=system.cron --detail --list-constraints
➜ 🤖 Analyzing…
Legend for Data:
✅❓ → Correct primitive type, detailed validation impossible.
✅✅ → Correct primitive type, passed all validation constraints.
--------------------------------------------- --------- ------------- ------ ------------------------------------------
Key Status Validatable Data Validation constraints
--------------------------------------------- --------- ------------- ------ ------------------------------------------
system.cron Correct 56% ✅❓ ValidKeys: '<infer>'
system.cron: Correct Validatable ✅✅ ValidKeys: '<infer>'
system.cron:_core Correct Validatable ✅✅ ValidKeys:
- default_config_hash
system.cron:_core.default_config_hash Correct Validatable ✅✅ NotNull: { }
Regex: '/^[a-zA-Z0-9\-_]+$/'
Length: 43
↣ PrimitiveType: { }
system.cron:logging Correct NOT ✅❓ ⚠️ @todo Add validation constraints here
system.cron:threshold Correct Validatable ✅✅ ValidKeys: '<infer>'
system.cron:threshold.requirements_error Correct NOT ✅❓ ⚠️ @todo Add validation constraints here
system.cron:threshold.requirements_warning Correct NOT ✅❓ ⚠️ @todo Add validation constraints here
--------------------------------------------- --------- ------------- ------ ------------------------------------------
Steps to reproduce
- Get a local git clone of Drupal core
11.x. composer require drupal/config_inspector— or manually install https://www.drupal.org/project/config_inspector/releases/2.1.5 or newer (which supports Drupal 11!)composer require drush/drushvendor/bin/drush config:inspect --filter-keys=system.cron --detail --list-constraints
Proposed resolution
Add validation constraints to:
system.cron:loggingsystem.cron:threshold.requirements_errorsystem.cron:threshold.requirements_warning
For examples, search *.schema.yml files for the string constraints: 😊
Reach out to @borisson_ or @wimleers in the #distributions-and-recipes.
Remaining tasks
User interface changes
None.
API changes
Data model changes
More validation 🚀
Release notes snippet
None.
Issue fork drupal-3436671
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:
- 3436671-add-validation-constraints
changes, plain diff MR !7223
Comments
Comment #2
narendrarComment #3
wim leersComment #4
narendrarComment #5
wim leersThat was too sloppy.
If you'd have read the code you added
@sees for, you'd have spotted that the config schema does not make sense.Comment #6
narendrarComment #7
phenaproximaI think that makes sense. Removing the update path tag; this very clearly has one now.
Only one question, then I'd be okay RTBCing this.
Comment #8
phenaproximaNo complaints here!
Comment #9
alexpottCommitted and pushed b59a6f101b to 11.x and a15b012100 to 10.3.x. Thanks!
Comment #12
wim leers👏