Seen on an unrelated patch...
03:04:20 FILE: /workspace/src/extensions/Echo/includes/ForeignWikiRequest.php 03:04:20 ---------------------------------------------------------------------- 03:04:20 FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE 03:04:20 ---------------------------------------------------------------------- 03:04:20 69 | WARNING | Deprecated global $wgUser used 03:04:20 | | (MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgUser) 03:04:20 ----------------------------------------------------------------------
The code uses $wgUser and $this->user... Does it really need to?
protected function canUseCentralAuth() { global $wgFullyInitialised, $wgUser; return $wgFullyInitialised && $wgUser->isSafeToLoad() && $this->user->isSafeToLoad() && SessionManager::getGlobalSession()->getProvider() instanceof CentralAuthSessionProvider && $this->getCentralId( $this->user ) !== 0; }
Ping T139665: "User::loadFromSession called before the end of Setup.php" warning due to Echo and 83a181ce9c840cdf90cb07fce68861e64260a5e5
Roan wrote
Check it for both $wgUser and $this->user because they could theoretically be different.
I mean, he's not wrong... Is this likely today though?