Problem/Motivation
This is via a live conversation with @alexpott, hopefully I'm summarising it correctly.
#784672: Allow text field to enforce a specific text format 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
- #3364109: Configuration schema & required values: add test coverage for `nullable: true` validation support (corresponds roughly to #23 through #25), which blocks:
- #3364108: [PP-1] Configuration schema & required keys
- 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.