[meta] Make config schema checking something that can be ignored when testing contrib modules

Created on 19 May 2023, over 1 year ago
Updated 19 January 2024, 10 months ago

Problem/Motivation

This is via a live conversation with @alexpott, hopefully I'm summarising it correctly.

✨ Allow text field to enforce a specific text format Fixed introduced a new key for text fields 'allowed_formats'.

If a module or distribution ships a configuration file with 'allowed_formats', it will restrict the list of formats for the text field from 10.1 onwards.

In 10.0.0 and 9.5.x, this feature doesn't exist. At runtime, the system will just ignore the key it doesn't understand, and the text field will show all the formats. So the older sites don't get the benefit of the new feature, but also nothing breaks. This is fine.

However, if the module or distribution runs tests against 10.0 or 9.5, those tests will fail with SchemaIncompleteException

You can set KernelTestBase::strictConfigSchema to FALSE, but then none of your schema will be checked on any of your branches.

Steps to reproduce

Proposed resolution

  1. πŸ“Œ Configuration schema & required values: add test coverage for `nullable: true` validation support Fixed (corresponds roughly to #23 through #25), which blocks:
  2. πŸ“Œ Configuration schema & required keys Fixed
  3. One possibility might be something like this:

    Instead of throwing exceptions, trigger_error('....', E_USER_DEPRECATED). The advantage of this would be that tests against 10.1 could be run with deprecation failures enabled, but tests against 10.0 and 9.5 could be run without.

    However, not all config errors are 'deprecations' so it's possibly semantically not the right approach.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🌱 Plan
Status

Needs work

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated about 24 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

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.

  • Issue created by @catch
  • πŸ‡¬πŸ‡§United Kingdom catch
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    In 10.0.0 and 9.5.x, this feature doesn't exist. At runtime, the system will just ignore the key it doesn't understand, and the text field will show all the formats. So the older sites don't get the benefit of the new feature, but also nothing breaks. This is fine.

    IOW: it sort of works only A) by chance, B) because there is logic in the PHP that interprets this configuration to be missing to mean that it should fall back to some default value:

      public function defaultValuesFormValidate(array $element, array &$form, FormStateInterface $form_state) {
        if ($allowed_formats = $this->getSetting('allowed_formats')) {
    

    treats the default value of [] and the absence (which would return NULL β€” see \Drupal\Core\TypedData\DataDefinition::getSetting()) as the same

  • Status changed to Needs review over 1 year ago
  • last update over 1 year ago
    Custom Commands Failed
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Note that right now the absence of a key in a mapping does not cause a schema error!

    Which means that at least the example in the issue summary would today never cause tests to fail! πŸ™ˆ

    Let's verify that claim:

    1. Let's find a test that calls \Drupal\Tests\SchemaCheckTestTrait::assertConfigSchema() to check this.
    2. For example \Drupal\Tests\standard\Functional\StandardTest does:
          // Now we have all configuration imported, test all of them for schema
          // conformance. Ensures all imported default configuration is valid when
          // standard profile modules are enabled.
          $names = $this->container->get('config.storage')->listAll();
          /** @var \Drupal\Core\Config\TypedConfigManagerInterface $typed_config */
          $typed_config = $this->container->get('config.typed');
          foreach ($names as $name) {
            $config = $this->config($name);
            $this->assertConfigSchema($typed_config, $name, $config->get());
          }
      
    3. ✨ Allow text field to enforce a specific text format Fixed modified 4 files with default configuration to have the new allowed_formats key. Let's remove it from all of them and see what happens.
  • last update over 1 year ago
    Custom Commands Failed
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    This is for the inverse: a new key appears in a mapping that was not known. #4 is when a key is absent that config schema says should be present.

  • last update over 1 year ago
    CI error
  • last update over 1 year ago
    CI error
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • πŸ‡¬πŸ‡§United Kingdom catch
     public function defaultValuesFormValidate(array $element, array &$form, FormStateInterface $form_state) {
        if ($allowed_formats = $this->getSetting('allowed_formats')) {
    

    This code isn't in Drupal 10 so it would never run. The issue is Drupal 10.1-updated configuration on Drupal 10.0 sites. Note I didn't test this, just wrote down more or less what @alexpott talked about :)

  • last update over 1 year ago
    CI aborted
  • last update over 1 year ago
    Build Successful
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
    00:02:53.788   ERROR: Unknown argument '--group'.
    00:02:53.788 PHP Warning:  Trying to access array offset on value of type null in /var/www/html/core/scripts/run-tests.sh on line 1270
    

    πŸ™ˆ

  • last update over 1 year ago
    1 pass
  • last update over 1 year ago
    CI aborted
  • last update over 1 year ago
    1 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Getting a single test to run on DrupalCI is not the simplest thing. πŸ˜… Sorry for all the noise!

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Can you provide a patch that demonstrates the problem described in the issue summary? Because AFAICT these 2 patches disprove it? πŸ˜…

  • last update over 1 year ago
    Patch Failed to Apply
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Aha, I think that y'all were expecting this to trigger:

        if ($element instanceof Undefined) {
          return [$error_key => 'missing schema'];
        }
    

    in \Drupal\Core\Config\Schema\SchemaCheckTrait::checkValue().

    That even has test coverage for the case reported in the issue summary: \Drupal\KernelTests\Core\Config\SchemaCheckTraitTest::testTrait() … except that it only works for top-level keys.

    There is an important omission in \Drupal\Core\Config\Schema\SchemaCheckTrait::checkValue() that is AFAICT intentional: it validates only the data it is given, and does not at all check if keys are missing that should be present.

    This omission has been present since day 1, i.e. since #2167623: Add test for all default configuration to ensure schema exists and is correct β†’ .

    It means that you could pass an empty array as the data for any piece of configuration and \Drupal\Core\Config\Schema\SchemaCheckTrait::checkConfigSchema() will consider it valid. Example attached.

  • last update over 1 year ago
    Build Successful
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • last update over 1 year ago
    1 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • πŸ‡¬πŸ‡§United Kingdom catch

    Nice work figuring this out, that means at least the text field example is a non-issue then. I can't think of any other examples off-hand where we might run into things.

  • Status changed to RTBC over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Based on #16 going to mark this. For the committer #15 does include a drupalci.yml change figured could be omitted when committing.

  • Status changed to Needs review over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    I don't think #15 is meant for commit.

  • Assigned to wim leers
  • Status changed to Needs work over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Indeed it is not.

    So how can we fix both #11 (i.e. detect new keys that are not known in the installed config schema AND detect missing keys) and #12 (detect missing keys at EVERY level)?

    I think I see a way! πŸ˜„

    (Been working on it for >12 of the past 24 hours β€” I've been nerdsniped by @catch & @lauriii πŸ™ˆ)

  • Open on Drupal.org β†’
    Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    Not currently mergeable.
  • @wim-leers opened merge request.
  • last update over 1 year ago
    1 pass
  • last update over 1 year ago
    1 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    4 commits, 4 roughly matching bullets:

    1. Update \Drupal\Core\Config\Schema\SchemaCheckTrait::checkConfigSchema() to also validate the validation constraints specified in the config schema β€” πŸ“Œ KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate Fixed does that.
    2. This still won't do anything for the originally reported problem because type: mapping does not have any validation constraints.
    3. Note that there is one mapping in Drupal core's config schema that already does this: config_test.validation, which has:
        constraints:
          Callback:
            callback: [\Drupal\config_test\ConfigValidation, validateMapping]
      
    4. Write a validation constraint that verifies that all keys defined for a mapping are present in the config schema. Already done: ✨ Add validation constraints to config_entity.dependencies Fixed allows us to add:
        constraints:
          ValidKeys: '<infer>'
      

      This would get us one of the things we need: .

    Next batch of commits will make it more interesting.

  • last update over 1 year ago
    1 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    So in the last of the aforementioned commits, we enabled it by default. The test coverage that we added proved that unknown keys trigger errors.

    But what about required keys? There are plenty of examples in Drupal core where code expects certain config keys to be present. As demonstrated in #11 and #12

    So let's make that possible!

    1. So let's add a new constraint, similar to ValidKeys, but doing the opposite: not just allowing keys, but requiring keys: RequiredKeys. This too should support
        constraints:
          RequiredKeys: '<infer>'
      

      i.e. by default all keys should be required.

    2. I realized (after a LOT of debugging πŸ™ˆ) that this cannot work, because we still need to be able to distinguish between optional keys vs optional values. There are plenty of examples where some piece of configuration (some key-value pair) may be required but have an optional value β€” in fact, those already exist!

      For example: editor.editor.*:image_upload.max_dimensions.width MUST be present in all Text Editor config entities, but it may be set to null to indicate there is no maximum image width.

      So we need a new key. This would be specific to type: mapping. I think requiredKey: false would make sense: the absence of this in the config schema would imply requiredKey: true πŸ‘

    Comes with explicit test coverage in \Drupal\KernelTests\Core\Config\SchemaCheckTraitTest::testTrait().

  • last update over 1 year ago
    2 fail
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #21 handled new/unknown keys.

    #22 handled missing/required keys.

    #22 then is closely related to the concept of "required data". But it applies it only for a subset of things: keys in mappings. That's not very consistent. It should be applied to everything. If configuration schema validation historically only checks the storage type, then the absence of a value is equivalent to NULL.

    In other words: if nullable: true is not present, we should assume that type: string maps to VARCHAR NOT NULL, type: int maps to INTEGER NOT NULL et cetera in the database.

    Sure enough, Typed Data already supports this: \Drupal\Core\TypedData\DataDefinition::isRequired() and \Drupal\Core\TypedData\DataDefinition::setRequired(). We simply don't use it for config yet! But we can:

    1. First, let's call ::setRequired(): everything is required unless nullable: true is present.
    2. … which led to discovering that NotNullConstraintValidator does not yet work correctly for sequences and mappings! 😱

    Rather than tell you, let me show you, with a failing test. This will show

    Exception: Exception when installing config for module config_test, message was: Schema errors for config_test.dynamic.dotted.default with the following errors: 0 [style] This value should not be null., 1 [size] This value should not be null., 2 [size_value] This value should not be null.
    

    for core/modules/config/tests/config_test/config/install/config_test.dynamic.dotted.default.yml, which looks like this:

    id: dotted.default
    label: Default
    weight: 0
    protected_property: Default
    # Intentionally commented out to verify default status behavior.
    # status: 1
    
  • last update over 1 year ago
    1 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    … and setting nullable: true in the commit I just pushed makes it pass πŸ‘

  • last update over 1 year ago
    1 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #23 explained the problem shown in the 2 commits preceding it.

    #24 then proved it can work with one commit.

    The 3 commits I just pushed add test coverage (and a small fix), proving it now works for all types.

    1. What's crucial: the key may be required while the value is optional!
    2. The whole nullable: true and "required value" aspect explained in #23 may seem out of scope, but after having spent hours debugging things I realized I was conflating the two concepts πŸ™ˆ So while we definitely can (and should!) independently land those aspects, I felt it was important for clarity and confidence to ensure the difference is clear.
    3. πŸ‘† The test coverage in \Drupal\KernelTests\Core\Config\SchemaCheckTraitTest::testTrait() proves that this is true for every type. πŸš€
  • last update over 1 year ago
    2 pass
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    That means that now we're finally in a place where we can truly start to solve the problem this issue was originally created for! πŸ˜„

    That is: gracefully handling keys in configuration that ships with module FOO, but which are specified in the config schema only in Drupal core 10.1 while the module still wants to be compatible with (and tested against) 10.0 and 9.5.

    In the 3 commits I just pushed, I added the infrastructure to make that happen, plus test coverage to prove it works.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    I've now proven it can all work in SchemaCheckTraitTest.

    But if you're anything like me, you're skeptical. "Will this work for all of core?"

    Well, let's find out. Let's run \Drupal\Tests\standard\Functional\StandardTest too.

  • last update over 1 year ago
    2 pass, 2 fail
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    I've now proven it can all work in SchemaCheckTraitTest. And I show some output for the Standard install profile showing deprecation errors.

    But if you're anything like me, you're skeptical. "Will this work for all of core?"

    Well, let's find out. Let's run \Drupal\Tests\standard\Functional\StandardTest too. That's the commit I just pushed.

  • last update over 1 year ago
    2 pass, 2 fail
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
    There was 1 error:
    
    1) Drupal\Tests\standard\Functional\StandardTest::testStandard
    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for system.file with the following errors: 0 [] 'path' is a required key.
    

    😬

    Pushed commit that fixes default config.

  • last update over 1 year ago
    Custom Commands Failed
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    No more default config errors, but just config schema problems now, because surely third party settings should not be required:

    There was 1 error:
    
    1) Drupal\Tests\standard\Functional\StandardTest::testStandard
    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for system.theme.global with the following errors: 0 [] 'third_party_settings' is a required key., 1 [logo.url] This value should not be null.
    

    😬

    Pushed commit that fixes config schema: lots of requiredKey: false additions, some nullable: true additions, a few plain bugfixes.

  • last update over 1 year ago
    Custom Commands Failed
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Now fast-forwarding a bit: shortcut_themes_installed() generates invalid config and views.* config … is not something we'll get squeaky clean in this issue. Pushed 2 commits for those.

  • last update over 1 year ago
    2 pass, 2 fail
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
    Testing Drupal\Tests\standard\Functional\StandardTest
    E                                                                   1 / 1 (100%)R
    
    Time: 00:07.143, Memory: 4.00 MB
    
    There was 1 error:
    
    1) Drupal\Tests\standard\Functional\StandardTest::testStandard
    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for core.entity_view_display.comment.comment.default with the following errors: 0 [content.links] 'type' is a required key., 1 [content.links] 'label' is a required key., 2 [content.links] 'settings' is a required key.
    

    The RequiredKeys constraint needs one more capability to support this kind of nuanced reuse of config schema types. For entity view displays, links is a special case, and for entity form displays, author is.

    Pushed commit for that.

  • last update over 1 year ago
    Custom Commands Failed
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
    Testing Drupal\Tests\standard\Functional\StandardTest
    E                                                                   1 / 1 (100%)R
    
    Time: 00:07.143, Memory: 4.00 MB
    
    There was 1 error:
    
    1) Drupal\Tests\standard\Functional\StandardTest::testStandard
    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for core.entity_view_display.comment.comment.default with the following errors: 0 [content.links] 'type' is a required key., 1 [content.links] 'label' is a required key., 2 [content.links] 'settings' is a required key.
    

    The RequiredKeys constraint needs one more capability to support this kind of nuanced reuse of config schema types. For entity view displays, links is a special case, and for entity form displays, author is.

    Pushed commit for that.

  • last update over 1 year ago
    2 pass, 2 fail
  • last update over 1 year ago
    3 pass
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    And … finish! 🏁

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Linking related issues.

  • Status changed to Needs work over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium borisson_ Mechelen, πŸ‡§πŸ‡ͺ

    Posted a review on gitlab, back to needs work to at least answer them

  • Status changed to Needs review over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Thanks for the early review!

    Quoting myself from Drupal Slack:

    I couldn’t get this out of my head and kept working on it β€” the vision you originally had, @catch & @alexpott, is now proven to be feasible, and it’s passing tests for all of Standard πŸ€“πŸ˜„

    I propose to change this to a meta and split it off into child issues. Roughly one patch stack with matching comment should become one child issue.

    I spent many, many hours making this as clear and cohesive as possible. I’d very much appreciate your input :pray: And I hope y’all will be excited about this 😊
    https://www.drupal.org/project/drupal/issues/3361423#comment-15080360 🌱 [meta] Make config schema checking something that can be ignored when testing contrib modules Active

    P.S.: excellent nerdsniping πŸ‘

    β€” https://drupal.slack.com/archives/C1BMUQ9U6/p1685219644013669?thread_ts=...

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Created child issues:

    1. πŸ“Œ Configuration schema & required values: add test coverage for `nullable: true` validation support Fixed (corresponds roughly to #23 through #25), which blocks:
    2. πŸ“Œ Configuration schema & required keys Fixed

    The first one extracts already ~20% from this MR into an isolated issue. The second one should extract even more. First getting those to green, will then continue splitting this up into child issues πŸ‘

  • Assigned to catch
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Assigning to @catch to hopefully get a high-level +1 on this direction πŸ€“πŸ˜‡

  • πŸ‡¬πŸ‡§United Kingdom catch

    I'm mostly afk this week but I feel bad about the nerdsniping ;)

    I don't think when @alexpott mentioned this issue or when I typed it up, either of us had fully considered the implications - i.e. we (or at least I) didn't realise there was no validation error on the 'extra' keys in the first place.

    The combination of much more precise validation but also being able to ignore some of these on older versions seems good. Agreed on making as many bugfixes prerequisites of this as possible - it would be good to commit it earlier than later in a minor release so that contrib has time to catch up.

  • Issue was unassigned.
  • πŸ‡¬πŸ‡§United Kingdom catch

    Unassigning me because I think this is a good idea, but tagging for subsystem maintainer review because config schema isn't really my area.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Clarifying title. The behavior per core branch is owned by the code in that older core branch/version. Which is always true.

    The goal of this issue is to minimize contrib disruption.

  • Status changed to Needs work over 1 year ago
  • The 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 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.

  • Status changed to Active over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Two times in two days now that I hit the "concurrent node edit causes node to get unpublished" bug on d.o 😳

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • Assigned to wim leers
  • Status changed to Needs work 11 months ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
  • Issue was unassigned.
  • Status changed to RTBC 11 months ago
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Since #42, a lot has changed. Most notably, πŸ“Œ Follow-up for #3361534: config validation errors in contrib modules should cause deprecation notices, not test failures Fixed and πŸ› Follow-up for #3361534: config validation errors can still occur for contrib modules, disrupting contrib Active landed, which made it so that config validation using schema truly is ignored.

    Drupal 10.2 has been out for 3 weeks, and there are no reports to my knowledge of contrib modules breaking (there were during the RC phase, which is why #3402168 happened). πŸ‘

    We now need πŸ“Œ Follow-up for #3361534: config validation errors in contrib modules should not cause deprecation notices, unless they opt in Active to enable contrib/custom modules to opt in.

    AFAICT that means this issue is … de facto done? πŸ˜„

    Per the research I did in #11 through #15, it appears that I was able to prove that the original reported issue is a non-issue. This is from May 2023 though, so ~7 months ago. We should double-check. At least I was able to convince @catch πŸ€“

    What I subsequently did was prove this through actual code + tests in #19 through #32. Back in May.

    ~12 hours ago, πŸ“Œ Configuration schema & required keys Fixed finally landed, a precursor of which was in the #19–#32 PoC. The other part of the PoC landed in πŸ“Œ Configuration schema & required values: add test coverage for `nullable: true` validation support Fixed .

    So … AFAICT this is done. See also πŸ“Œ Follow-up for #3361534: config validation errors in contrib modules should not cause deprecation notices, unless they opt in Active for more detail.

    Leaving this to @catch or @alexpott to confirm and mark this .

  • Open on Drupal.org β†’
    Environment: PHP 8.2 & MySQL 8
    last update 11 months ago
    Not currently mergeable.
  • Open on Drupal.org β†’
    Environment: PHP 8.2 & MySQL 8
    last update 10 months ago
    Not currently mergeable.
  • Open on Drupal.org β†’
    Environment: PHP 8.2 & MySQL 8
    last update 10 months ago
    Not currently mergeable.
  • Status changed to Needs work 10 months ago
  • The 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.

  • heddn Nicaragua

    I'm not sure how related or unrelated this is, but search_api_solr in 10.2 is throwing fits with the new config validation. πŸ› ValidKeysConstraintValidator thrown by config inspector Active has some details on what I'm seeing.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #48: I suspect that requires a development module to be installed: #3415861-3: ValidKeysConstraintValidator thrown by config inspector β†’ . Let's figure it out there, I'll report back our findings here 😊

Production build 0.71.5 2024