mediawiki-skins-Vector/includes/FeatureManagement/Requirements
Stephen Niedzielski 709772fa12 [fix] "Existing account only" skin version config
de76ab5 added the config,
`$wgVectorDefaultSkinVersionForExistingAccounts`. Its usage in
`Hooks::onUserGetDefaultOptions()` was invoked not only for existing
accounts but anonymous users _as well._  This is a bug, due to my own
misconceptions about the hook, that went against both the config's name
and its documentation.

Unfortunately, user sessions are unavailable in
`Hooks::onUserGetDefaultOptions()` so it does not seem to be possible to
determine whether the active user is an anonymous or existing account.
This patch drops the hook and centralizes all version determination
logic in SkinVersionLookup::getVersion(). SkinVersionLookup requires a
the active User object and can make the anonymous / existing account
determination by checking login state.

The issued was identified while responding to review feedback given by
@polishdeveloper / @pmiazga in
I52d80942b4270c008d4e45050589ed9220255a50.

Bug: T251415
Change-Id: I7982b4c34283ba81d0232ee6f501c44cf0a74b98
2020-04-29 18:36:03 +00:00
..
DynamicConfigRequirement.php [docs] [dev] [PHP] [FeatureManager] revise docs and add DynamicConfigRequirement test 2020-03-26 20:39:40 +00:00
LatestSkinVersionRequirement.php [fix] "Existing account only" skin version config 2020-04-29 18:36:03 +00:00
SimpleRequirement.php [Hygiene] featureManager: Move SimpleRequirement... 2020-04-21 18:22:07 +01:00