mediawiki-skins-Vector/tests/phpunit/integration
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
..
FeatureManagement/Requirements [fix] "Existing account only" skin version config 2020-04-29 18:36:03 +00:00
SkinVersionLookupTest.php [fix] "Existing account only" skin version config 2020-04-29 18:36:03 +00:00
VectorHooksTest.php [fix] "Existing account only" skin version config 2020-04-29 18:36:03 +00:00
VectorTemplateTest.php Refactor: DRY up menu creation! 2020-04-27 13:36:39 -07:00