mediawiki-skins-Vector/includes/FeatureManagement
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
..
Requirements [fix] "Existing account only" skin version config 2020-04-29 18:36:03 +00:00
FeatureManager.php [Hygiene] featureManager: Move SimpleRequirement... 2020-04-21 18:22:07 +01:00
Requirement.php featureManager: Add Requirement interface 2020-03-09 11:06:26 +00:00
TODO.md featureManager: Add DynamicConfigRequirement requirement 2020-03-18 10:10:42 +00:00