Page MenuHomePhabricator

Allow extensions to modify $wgConditionalUserOptions via a hook
Closed, DeclinedPublic

Description

Currently, the only two places where conditional defaults can be defined is $wgConditionalUserOptions in LocalSettings.php (for configuration made by a sysadmin) and ConditionalUserOptions in extension.json (for configuration coming from extensions). This means that all conditional defaults config in extensions need to be statically-defined.

GrowthExperiments needs to make conditional defaults config conditional, to ensure our own config (namely, GEHomepageNewAccountEnablePercentage, GEHelpPanelNewAccountEnableWithHomepage and GEMentorshipNewAccountEnablePercentage) is respected. Adding a hook to modify conditional user options would allow the Growth team to complete T383700, reducing the number of rows we create on signup.

Event Timeline

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

[mediawiki/core@master] ConditionalDefaultsLookup: Move the hook call to the service itself

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

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

[mediawiki/core@master] Allow extensions to modify conditional user options via a hook

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

Change #1111280 merged by jenkins-bot:

[mediawiki/core@master] ConditionalDefaultsLookup: Move the hook call to the service itself

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

We decided this is not a good idea, as it does not actually allow the percentage from settings to be respected (we'd need the full history). Declining.

Change #1111281 abandoned by Urbanecm:

[mediawiki/core@master] Allow extensions to modify conditional user options via a hook

Reason:

task declined

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