Problem/Motivation
system.image and system.image.gd each has 1 property path that are not yet validatable:
./vendor/bin/drush config:inspect --filter-keys=system.image,system.image.gd --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.image Correct 75% ✅❓ ValidKeys: '<infer>'
system.image: Correct Validatable ✅✅ ValidKeys: '<infer>'
system.image:_core Correct Validatable ✅✅ ValidKeys:
- default_config_hash
system.image:_core.default_config_hash Correct Validatable ✅✅ NotNull: { }
Regex: '/^[a-zA-Z0-9\-_]+$/'
Length: 43
↣ PrimitiveType: { }
system.image:toolkit Correct NOT ✅❓ ⚠️ @todo Add validation constraints here
system.image.gd Correct 75% ✅❓ ValidKeys: '<infer>'
system.image.gd: Correct Validatable ✅✅ ValidKeys: '<infer>'
system.image.gd:_core Correct Validatable ✅✅ ValidKeys:
- default_config_hash
system.image.gd:_core.default_config_hash Correct Validatable ✅✅ NotNull: { }
Regex: '/^[a-zA-Z0-9\-_]+$/'
Length: 43
↣ PrimitiveType: { }
system.image.gd:jpeg_quality Correct NOT ✅❓ ⚠️ @todo Add validation constraints here
-------------------------------------------- --------- ------------- ------ ------------------------------------------
Steps to reproduce
- Get a local git clone of Drupal core
10.3.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=system.image,system.image.gd --detail --list-constraints
Proposed resolution
Add validation constraints to:
system.image:toolkitsystem.image.gd:jpeg_quality
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3439932-nr-bot.txt | 90 bytes | needs-review-queue-bot |
Issue fork drupal-3439932
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:
Comments
Comment #4
phenaproximaThis is probably ready to go...
Comment #5
wim leersNo hesitations — this looks perfect 😊
Comment #6
wim leers… except a single test (
ToolkitSetupFormTest) just failed 😅🙈Comment #7
phenaproximaUgh, gotta work around the langcode thing.
Comment #8
wim leersComment #9
larowlan#3427564: Require `langcode: …` only for simple config that contains translatable values is RTBC so let's postpone on that so we don't need the todo.
Comment #10
narendrarComment #11
wim leers#3427564: Require `langcode: …` only for simple config that contains translatable values is in!
Comment #12
wim leersComment #13
phenaproximaWorkarounds removed.
Comment #14
phenaproximaTests passing and all I did was remove the workarounds for langcode, so restoring the previous RTBC.
Comment #15
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #16
phenaproximaGet lost, bot!
Comment #17
alexpottCommitted and pushed 68628ccef2 to 11.x and 18cbe89f06 to 10.3.x. Thanks!