Problem/Motivation

In #2464427: Replace CacheablePluginInterface with CacheableDependencyInterface, we noticed a problem when trying to add a second views update function that is trying to change something in views.

Now, the strict config schema checker prevents the first update function from views from completing because they, very much by design, save view configuration that does not comply with the schema.

That makes it impossible to write update tests for such updates for core and also anyone else and I guess that makes this a critical.

Proposed resolution

Set the strict config schema flag to FALSE to prevent runtime schema checks. Instead, we check the configuration after running all updates.

Since that covers *all* configuration, not just what is being saved, this has additional advantages and e.g. covers configuration objects and keys that are renamed/removed and allows us easily test that.

One such example that this uncovered is that we don't remove the system.filter configuration after removing it.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Berdir created an issue. See original summary.

berdir’s picture

Status: Active » Needs review
StatusFileSize
new2.27 KB
jibran’s picture

This makes a lot of sense.

berdir’s picture

StatusFileSize
new2.29 KB

Same patch, just a better comment, copied the old one from StandardTest.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

Looks good now.

jhedstrom’s picture

This makes sense to me. I'd taken to simply disabling the check all together on update tests, but I like the idea of running them all at the end.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

I like it! Committed e27e962 and pushed to 8.0.x. Thanks!

I've confirmed that Drupal\system\Tests\Update\UpdatePathTestBaseTest fails if changes to system.install are not applied.

  • alexpott committed e27e962 on 8.0.x
    Issue #2550407 by Berdir: Strict config schema breaks update tests,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.