This patch ensures that we know which arrays are lists (JsonSchema type
"array") and which are maps (JsonSchema type "object"). We can then
default to array_merge for lists and to array_plus for maps. This seems
clearer than requiring an explicit merge strategy to be declared for all
arrays.
This patch specified a mergeTrategy for some config variables that need
behavior different from the default.
This patch also changes the merging behavior to allow non-array values
to replace arrays and vice versa. It also changes the behavior of
defaults to allow falsy values to override non-falsy defaults.
Bug: T300129
Change-Id: Ia7b0c0250af6a957eac1efb554fb47511f5e093f
GlobalConfigBuilder needs to use the appropriate merge strategy to
combine new values with the value already rpesent in a global variable.
For this, GlobalConfigBuilder needs to actually look at the current
value of the global variable. Also, we need to define merge strategies
for all settings that need them (at least the ones used directly by
ExtensionProcessor).
Change-Id: I834d4b3506bdd8d416e5eb6e03fb4dd6b60b6e05
$this->set was calling the overridden method, so if it was
called from setDefault, we'd end up double-prefixing the config.
Change-Id: I5f912332cc69cb58bb71e87cd9f8154246b53232
Not yet sure if config validation makes sense in production,
possibly before we write into cache we can validate, and then
trust that the cached values are all valid. This patch just
adds ability to validate the configuration.
"justinrainbow/json-schema" is already a transitive dependency
and is already in vendor.
Change-Id: Ib039c897a36a7e1911309fd29514657042b1b139