Page MenuHomePhabricator

Let BetaFeatures extension maintain the default preference values of features
Open, Needs TriagePublic

Description

For now, extensions need to set default values in the extension.json or UserGetDefaultOptions hook to avoid the regression of T291748.
This is the only place where other extensions interact with user options stuff in the core, registering and checking enabled or not are cleanly wrapped by the BetaFeatures extension.
By the way, fix and improvements to the auto-enrollment feature need those values default to null, but it's hard to make sure other extensions set it as expected.
But we can't simply run the GetBetaFeaturePreferences hook during the UserGetDefaultOptions hook, since handlers can access the User parameter and cause a dead loop, and there is a use case in the IP Info extension: change 741735.
So I think the GetBetaFeaturePreferences hook should decouple with the User parameter, and provide a new callback parameter to filter out unavailable features for a specific user in the descriptor.
Can I deprecate the use of that parameter only, or a different hook should be provided?

Event Timeline

Change 764921 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/services/parsoid@master] WIP: Update Parsoid to load integrated mode Config classes from core

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

@ssastry It seems that the patch you uploaded has the wrong task number.

@ssastry It seems that the patch you uploaded has the wrong task number.

Oops, yes. Will fix. Thanks!

Change 764921 abandoned by Subramanya Sastry:

[mediawiki/services/parsoid@master] WIP: Update Parsoid to load integrated mode Config classes from core

Reason:

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