Provide a way to validate the current configuration state

Created on 23 November 2017, almost 7 years ago
Updated 31 January 2023, over 1 year ago

Problem/Motivation

The configuration system in D8 is really complex and if we don't watch out then the current active configuration might get into a state where not everything will even pass the validation we have when a config is being imported. We've ran recently into such a situation and detected it because the validation failed after we wanted to import configuration over the UI - \Drupal\config\Form\ConfigSingleImportForm. It would've been nice if we were able to check if after updates and deployment our configuration state is still correct.

Proposed resolution

Drupal has an internal way of checking the configuration on importing a new config. Let's make this internal checking publicly available by moving it to a new service - Config Validator.

Remaining tasks

  1. Write tests
  2. Discuss a drush command like "config:validate" to check the currently active configuration for errors (#18)

User interface changes

API changes

Data model changes

Feature request
Status

Needs work

Version

10.1

Component
Configuration 

Last updated 5 days ago

Created by

🇩🇪Germany hchonov 🇪🇺🇩🇪🇧🇬

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇩🇪Germany Anybody Porta Westfalica

    @alexpott: The @needs-review-queue-bot just pinged me about this.
    What do you think about this issue 4 years later? Should we proceed here and does this still make sense in core or should this be left for contrib (config_inspector etc.)

    I still like the idea, but to save us all from useless work, perhaps core maintainer feedback would make sense first?

Production build 0.71.5 2024