Background
For config variables that are not defined in the on-wiki JSON page, Community configuration 1.0 attempts to read the same configuration variable (of the same name) from GlobalVarConfig and it uses the GlobalVarConfig-provided value as the fallback. This made sense back then, as Community configuration 1.0 only supports a very rudimentary validation (a datatype-based validation combined with an allowlist of variables).
In Community configuration 2.0, we're adding support for JSONSchemas, which contain a default key. Conceptually, it doesn't make much sense to have information about a configuration provider in multiple places: the JSON schema, extension.json (which needs to define the config variables as well) and possibly operations/mediawiki-config. Instead, we should have as much information as possible in a single place: the JSON schema itself.
If a client extension wishes to use GlobalVarConfig options as the default, we can make use of T358799: CommunityConfiguration: Switch to generating schemas from PHP classes rather than committing them as JSON files directly and simply dynamically load the default from that place, and it should work.
Acceptance Criteria
- default section of JSONSchema is respected and used in case a configuration variable is not present in the Community configuration
- Calling IConfigurationProvider::loadValidConfiguration() enhances the data loaded from the configuration store with the defaults