Problem/Motivation
The Book module's settings have 4 property paths that are not yet validatable:
$ vendor/bin/drush pm:install book
[success] Successfully enabled: book
$ ./vendor/bin/drush config:inspect --filter-keys=book.settings --detail --list-constraints --fields=key,validatability,constraints
➜ 🤖 Analyzing…
------------------------------------------ ------------- ------------------------------------------
Key Validatable Validation constraints
------------------------------------------ ------------- ------------------------------------------
book.settings 56% ValidKeys: '<infer>'
book.settings: Validatable ValidKeys: '<infer>'
book.settings:_core Validatable ValidKeys:
- default_config_hash
book.settings:_core.default_config_hash Validatable NotNull: { }
Regex: '/^[a-zA-Z0-9\-_]+$/'
Length: 43
↣ PrimitiveType: { }
book.settings:allowed_types NOT ⚠️ @todo Add validation constraints here
book.settings:allowed_types.0 NOT ⚠️ @todo Add validation constraints here
book.settings:block Validatable ValidKeys: '<infer>'
book.settings:block.navigation Validatable ValidKeys: '<infer>'
book.settings:block.navigation.mode NOT ⚠️ @todo Add validation constraints here
book.settings:child_type 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/drush
vendor/bin/drush config:inspect --filter-keys=book.settings --detail --list-constraints
Proposed resolution
- Add validation constraints.
- Mark
FullyValidatable
.
Remaining tasks
Review.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
N/A