Problem/Motivation
Configuration schemas for core's plugins do not use the Plugin module's unified format of plugin.plugin_configuration.$plugin_type.$plugin_id
, and as such configuration of those plugins cannot be stored/validated dynamically in a unified way.
Proposed resolution
Expose core's plugin configuration schemas using 'aliases' that conform to the plugin.plugin_configuration.$plugin_type.$plugin_id
format.
Remaining tasks
Find out how to alias schemas that do not contain the plugin ID in the configuration, but only in the data type. In these cases, we have no way of extracting the plugin ID, and mapping the alias to the correct schema type that Drupal core provides. As can be seen in the patch, the alias for block and condition plugins dynamically get the plugin ID from the config data and use it to define the alias' data type. Entity reference selector configuration schemas (entity_reference_selection.*
) are an example of where that isn't possible, because the data contains no plugin IDs. This is good configuration design (plugin IDs should not be merged with plugin configuration in storage), but poses a problem for us.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#19 | plugin_2543420_19.patch | 43.13 KB | Xano |
#19 | interdiff.txt | 23.02 KB | Xano |
Comments
Comment #1
XanoComment #2
XanoComment #3
XanoSee #2629640: Configuration schema aliases for making it possible to expose existing schemas through aliases.
Comment #4
XanoConfig schema types are static, with the exception that they can be based on arbitrary values within the same config object. If we also store config schema names, we can use this behavior to 'dynamically' set schema types.
Comment #8
XanoMost of the failures are caused by #2633232: Missing fallback plugin configuration schemas.
Comment #9
XanoComment #13
XanoComment #14
XanoComment #15
XanoWe can add support for core's remaining plugin types, once #2633232: Missing fallback plugin configuration schemas lands.
Comment #16
XanoI talked to @GaborHojtsy and checked with Config Inspector, and all seems fine. Now all we need is an upgrade path.
Comment #17
XanoThis is still NR.
Comment #18
drunken monkeyYou have a trailing space there. Thought I'd point it out since I happened to see it – but, unfortunately, that's about as far as my expertise on this goes.
Comment #19
XanoThanks! I also updated the read of that documentation.
This patch introduces an upgrade path with test coverage.
Comment #20
Xano