Voting starts in March for the Drupal Association Board election.
In configuration schema we have an 'undefined' type, that is meant to be used for configuration values whose type is not defined.
As it reads in core.data_types.schema.yml:
# Undefined type used by the system to assign to elements at any level where # configuration schema is not defined. Using explicitly has the same effect as # not defining schema, so there is no point in doing that. undefined: label: 'Undefined' class: '\Drupal\Core\Config\Schema\Undefined'
So it is supposed not to be actually used in schemas, it doesn't make too much sense to define something as 'undefined' (either it is defined or it is not), still it is used in two current schemas, namely: user.schema.yml and views.cache.schema.yml
The use case for those sequences with 'undefined' elements (all of them are in sequences) is the need for some arrays that do need to be empty, ie. they are standard plugin settings arrays that will not have elements in these types. The explicit undefined typing was added because the schema code did not deal well with no item type definition. Sincethe missing type definition will result in assumed undefined and behave the same way.
Remove those 'undefined' from configuration and instead let the runtime figure out that they are not defined. If there is any data in there, validation will fail because they will be undefined types. So this fulfils the need to define the empty arrays and gets rid of explicit uses of the undefined type.
These schemas already have test coverage even several times over with.
|#13||2285189-no-explicit-undefined.patch||1.09 KB||Gábor Hojtsy|
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 74,444 pass(es). View
|#9||5189-undefined-ignore.patch||1.09 KB||Jose Reyero|
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 72,636 pass(es). View
|#3||2285189-3.patch||2.99 KB||Jose Reyero|
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch 2285189-3.patch. Unable to apply patch. See the log in the details link for more information. View