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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | update-config-schema-check-2550407-4.patch | 2.29 KB | berdir |
| #2 | update-config-schema-check-2550407-1.patch | 2.27 KB | berdir |
Comments
Comment #2
berdirComment #3
jibranThis makes a lot of sense.
Comment #4
berdirSame patch, just a better comment, copied the old one from StandardTest.
Comment #5
jibranLooks good now.
Comment #6
jhedstromThis 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.
Comment #7
alexpottI like it! Committed e27e962 and pushed to 8.0.x. Thanks!
I've confirmed that
Drupal\system\Tests\Update\UpdatePathTestBaseTestfails if changes to system.install are not applied.