Page MenuHomePhabricator

CommunityConfiguration should provide a generic configuration reading object
Closed, ResolvedPublic

Description

Based on the conversation at T384184#10522794 et seq, CommunityConfiguration should allow two ways to access configuration:

  • MediaWikiConfigReader, which would be used to access only CC-based configuration; for non-CC configuration, it should throw a ConfigException
  • MediaWikiConfigRouter, which would determine whether a configuration is CC based or not, and either route it to MediaWikiConfigReader or to the MainConfig service

The first would be used in cases when a consumer is certain only CC config is needed. The other one would be used to make it easier to switch between MainConfig and CC (to ensure there is no need to audit all usages; one merely needs to add the config to CC).

Event Timeline

Change #1123427 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/CommunityConfiguration@master] Add MediaWikiConfigRouter

https://gerrit.wikimedia.org/r/1123427

Change #1123428 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Use MediaWikiConfigRouter

https://gerrit.wikimedia.org/r/1123428

Change #1123608 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/Babel@master] Use MediaWikiConfigRouter

https://gerrit.wikimedia.org/r/1123608

Change #1123427 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Add MediaWikiConfigRouter

https://gerrit.wikimedia.org/r/1123427

Change #1123428 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Use MediaWikiConfigRouter

https://gerrit.wikimedia.org/r/1123428

Change #1123608 merged by jenkins-bot:

[mediawiki/extensions/Babel@master] Use MediaWikiConfigRouter

https://gerrit.wikimedia.org/r/1123608

Change #1124372 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/CommunityConfiguration@master] fix(MediaWikiConfigReader): ->has() should not fall back to PHP settings

https://gerrit.wikimedia.org/r/1124372

Change #1124372 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] fix(MediaWikiConfigReader): ->has() should not fall back to PHP settings

https://gerrit.wikimedia.org/r/1124372

Sgs subscribed.

Tentatively moving to QA since all changes are merged.

Change #1154253 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/CampaignEvents@master] reafctor: Use MediaWikiConfigRouter for mixed configuration

https://gerrit.wikimedia.org/r/1154253

Change #1180092 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Cite@master] fix: use MediaWikiConfigRouter to access php config

https://gerrit.wikimedia.org/r/1180092

Change #1180092 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] fix: use MainConfig to access php config

https://gerrit.wikimedia.org/r/1180092

Change #1154253 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] refactor: Use MediaWikiConfigRouter for mixed configuration

https://gerrit.wikimedia.org/r/1154253