There are 4 cases in core, where the sequence type isn't specified for config schema elements of type "sequence". They were found while scanning them by potx in #2601370: [META] Parsing notices with Drupal 8 RC2.
core/modules/image/config/schema/image.schema.yml
image.effect.image_desaturate:
type: sequence
core/modules/user/config/schema/user.schema.yml
search.plugin.user_search:
type: sequence
label: 'User search'
core/modules/views/config/schema/views.cache.schema.yml
views.cache.none:
type: views_cache
label: 'No caching'
mapping:
options:
type: sequence
label: 'Options'
views.cache.tag:
type: views_cache
label: 'Tag based caching'
mapping:
options:
type: sequence
label: 'Options'
Comment | File | Size | Author |
---|---|---|---|
#8 | 2601594-8.patch | 1000 bytes | herom |
#6 | 2601594-test-only.patch | 423 bytes | herom |
Comments
Comment #2
Gábor HojtsyAdding #2601370: [META] Parsing notices with Drupal 8 RC2 as parent.
Comment #3
Gábor HojtsyComment #4
Gábor HojtsyI may have been mistaken when I said empty sequences are not allowed. I vaguely remember now that we used these to define lists that may never have elements (all their items are undefined type). Eg.
vs.
The sequence type would fall back on no item definition AKA undefined items, which will throw errors, if there are children of the list. This is indeed an awkward way of defining types that do not allow values, but there is no other way. There do not seem to be explicit tests for it in schema tests.
Also, not sure if all the listed items belong to this rule, the user and image ones do look like so. The views ones look likely as well.
Comment #5
Gábor HojtsySo I think empty sequence should be supported in potx.
Comment #6
herom CreditAttribution: herom commentedThis is a quick fix.
But let's try with a test-only patch first, see if it fails.
Comment #8
herom CreditAttribution: herom commentedGreat! Now, let's try a fix.
Comment #9
Gábor HojtsyMakes sense to me.
Comment #11
herom CreditAttribution: herom commentedThanks. Fixed.
Comment #12
Gábor Hojtsy