In the genpass.schema.yml file, the genpass.settings array is defined as mapping. While mapping is the correct type for the way the properties are defined, module settings must be defined as config_object.
The reason behind this is that after installation, when the settings are imported into the site, core assigns them two extra properties that is assigning to all entries in the config table. These properties are the _core and the language.
The config_object datatype is defined in core.data_types.schema.yml and is including these two properties. By defining it as a config_object, it is still a mapping, but is extending the two core properties above.
The whole thing above, fails when a browser test is running and this module is required. Assertions regarding the schema integrity are ran and this breaks the tests.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | wrong_data_type_for_settings_array-2983222-D8-2.patch | 320 bytes | dimilias |
Comments
Comment #2
dimilias commentedAttaching a patch for this.
Comment #3
sardara commentedVery good explanation and patch is straightforward.
Comment #4
gregglesIs any kind of upgrade path needed? Or it's not needed because the installation just completely fails?
Comment #5
dimilias commentedNo, no upgrade path is needed. Drupal assigns the extra properties which identify the specific config object for the specific file. The file is still imported in the databases despite the lack of proper schema structure.
This is because the assertions do not run at this point and I think that they also don't run during site installation or module enabling.
The browser test though runs those assertions.
As far as the .schema.yml files are concerned, a cache clear will include the new schema. There is no upgrade path needed for clearing the cache and furthermore it is not needed because this thing does not create issues with the production application. These assertions also do not run during http requests.
There are also modules to check the integrity of the schema files.
Comment #7
gregglesGreat, thanks for the explanation!
Committed and pushed and I'll make a new stable beta2 release.