Page MenuHomePhabricator

Deprecate and remove $wgUser
Open, MediumPublic

Description

See parent task for reasoning.

Live search for current uses of global $wgUser in wikimedia deployed code: https://codesearch.wmflabs.org/deployed/?q=global%5B%5E%3B%5D%2B%5C%24wgUser%5B%2C%3B%5D&i=nope&files=&repos=

Live search for current code using $wgUser in deployed code: https://codesearch.wmcloud.org/deployed/?q=wgUser(%5B%3B%2C%27%22-%5D%7C%5Cs%7C%24)&i=nope&files=%5C.php%24&repos=

Patches that need to be reviewed: https://gerrit.wikimedia.org/r/#/q/topic:global-wguser+status:open

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
DannyS712 removed subtasks: T244112: MassMessage needs uses of global $wgUser removed, T243922: UserMerge needs uses of global $wgUser removed, T243874: Thanks needs uses of global $wgUser removed, T243823: Newsletter needs uses of global $wgUser removed, T243807: TorBlock needs uses of global $wgUser removed, T243733: LdapAuthentication needs uses of global $wgUser removed, T243732: Echo needs uses of global $wgUser removed, T243577: OpenStackManager needs uses of global $wgUser removed, T243554: ArticlePlaceholder needs uses of global $wgUser removed, T242994: CentralAuth needs uses of global $wgUser removed, T242936: ConfirmEdit needs uses of global $wgUser removed, T242677: CodeReview needs uses of global $wgUser removed, T242557: GeoCrumbs needs uses of global $wgUser removed, T241952: WikiEditor needs uses of global $wgUser removed, T241947: Stop using $wgUser in Wikibase, T241924: PagedTiffHandler needs uses of global $wgUser removed, T241923: SecurePoll needs uses of global $wgUser removed, T241915: Jade needs uses of global $wgUser removed, T241912: Translate needs uses of global $wgUser removed, T241911: WikibaseLexeme needs uses of global $wgUser removed, T241903: TimedMediaHandler needs uses of global $wgUser removed, T241815: Nostalgia needs uses of global $wgUser removed, T241704: SpamBlacklist needs uses of global $wgUser removed, T241630: WikimediaIncubator needs uses of global $wgUser removed, T241619: LiquidThreads needs uses of global $wgUser removed, T241618: GlobalCssJs needs uses of global $wgUser removed, T241617: GlobalBlocking needs uses of global $wgUser removed, T241616: Collection needs uses of global $wgUser removed, T241615: CentralNotice needs uses of global $wgUser replaced, T241608: FlaggedRevs needs uses of global $wgUser replaced, T241583: GettingStarted needs uses of global $wgUser replaced, T241582: GeoData needs use of global $wgUser replaced, T241575: PageTriage needs uses of global $wgUser removed.Feb 23 2020, 10:30 PM

Trying to organize subtasks - T245959: WMF deployed extensions need uses of global $wgUser removed [tracking] is tracking all WMF deployed extensions and the progress towards hard deprecation

Anomie added a subscriber: Anomie.

Untagging from Clinic Duty as there does not seem to be any open patches remaining on this task.

Anomie removed a subscriber: Anomie.Mar 11 2020, 4:52 PM
DannyS712 added a subscriber: Anomie.

Untagging from Clinic Duty as there does not seem to be any open patches remaining on this task.

All of the patches in https://gerrit.wikimedia.org/r/#/q/topic:global-wguser+status:open are part of this, though they are listed as for individual subtasks. Retagging to make it clear that there are still patches to review (rather than tagging each subtask)

DannyS712 removed subtasks: T247772: DynamicPageList needs uses of global $wgUser removed, T246732: ShoutWikiAds needs uses of global $wgUser removed, T246308: SiteScout needs uses of global $wgUser removed, T246307: SimpleSecurity needs uses of global $wgUser removed, T246306: RightFunctions needs uses of global $wgUser removed, T246305: RevisionCommentSupplement needs uses of global $wgUser removed, T246304: OnlineStatusBar needs uses of global $wgUser removed, T244455: BlueSpice extensions needs uses of global $wgUser removed [tracking], T244453: Social tools extensions need uses of global $wgUser removed [tracking], T243567: AccessControl needs uses of global $wgUser removed, T243566: AkismetKlik needs uses of global $wgUser removed, T243541: Metrolook needs uses of global $wgUser removed, T243534: OpenBadges needs uses of global $wgUser removed, T243532: MediaWikiChat needs uses of global $wgUser removed, T243531: GroupsSidebar needs uses of global $wgUser removed, T243527: LiveTranslate needs uses of global $wgUser removed, T243526: Lingo needs uses of global $wgUser removed, T243487: PageForms needs uses of global $wgUser removed, T243372: CollapsibleVector needs uses of global $wgUser removed, T242937: WikiLexicalData needs uses of global $wgUser removed, T242890: BibManager needs uses of global $wgUser removed, T242695: OfflineImportLexicon needs uses of global $wgUser removed, T242694: News needs uses of global $wgUser removed, T242693: Favorites needs uses of global $wgUser removed, T242567: AddPersonalUrls needs uses of global $wgUser removed, T242566: OpenID needs uses of global $wgUser removed, T242565: JsonData needs uses of global $wgUser removed, T242564: ImageRating needs uses of global $wgUser removed, T241816: Lockdown needs uses of global $wgUser removed, T241813: SVGEdit needs uses of global $wgUser removed, T241812: OnlyRecentRecentChanges needs uses of global $wgUser removed, T241810: AutoProxyBlock needs uses of global $wgUser removed, T241805: FilterListUsers needs uses of global $wgUser removed, T241804: EtherpadLite needs uses of global $wgUser removed, T241803: DisableAccount needs uses of global $wgUser removed, T241802: DataTable2 needs uses of global $wgUser removed, T241801: Commentbox needs uses of global $wgUser removed, T241799: BlockAndNuke needs uses of global $wgUser removed, T241703: SiteSettings needs uses of global $wgUser removed, T241702: ShowRealUsernames needs uses of global $wgUser removed, T241701: RT needs uses of global $wgUser removed, T241700: PrivateDomains needs uses of global $wgUser removed, T241699: PopupPages needs uses of global $wgUser removed, T241698: PopcornEditor needs uses of global $wgUser removed, T241697: PhpTagsStorage needs uses of global $wgUser removed, T241696: LookupUser needs uses of global $wgUser removed, T241695: LinkSuggest needs uses of global $wgUser removed, T241631: ArticleFeedbackv5 needs uses of global $wgUser removed, T241629: TwitterLogin needs uses of global $wgUser removed, T241628: Duplicator needs uses of global $wgUser removed, T241627: Drafts needs uses of global $wgUser removed, T241626: AzharAuth needs uses of global $wgUser removed, T241625: Athena needs uses of global $wgUser removed, T241624: MarkAsHelpful needs uses of global $wgUser removed, T241622: AnonPrivacy needs uses of global $wgUser removed, T241621: RegexBlock needs uses of global $wgUser removed, T241620: Survey needs uses of global $wgUser removed, T241613: AbsenteeLandlord needs uses of global $wgUser replaced, T241612: OAuthAuthentication needs uses of global $wgUser replaced, T241611: LogEntry needs uses of global $wgUser replaced, T241610: EditSimilar needs uses of global $wgUser replaced, T241609: Cargo needs uses of global $wgUser replaced, T241581: UserPageViewTracker needs uses of global $wgUser replaced, T241579: SocialLogin needs use of global $wgUser removed, T241578: Html2Wiki needs uses of global $wgUser removed, T241577: AdminLinks needs uses of global $wgUser removed, T241576: ApprovedRevs needs uses of global $wgUser removed.Mar 16 2020, 9:49 PM

All of the patches in https://gerrit.wikimedia.org/r/#/q/topic:global-wguser+status:open are part of this, though they are listed as for individual subtasks. Retagging to make it clear that there are still patches to review (rather than tagging each subtask)

Our current working process is to have the actual task with the patch on the workboard, making use of either the task's "Related Gerrit Patches" section or a bot-generated list like the one at https://wikifarm.wmflabs.org/cpt/index.php/Phab:T159299 to find the patches from the task. So when a task has no patches, it's confusing to still have it in the "needs review" column on the workboard.

There has been some discussion about somehow switching to a Gerrit dashboard that would contain just the patches needing Clinic Duty review. I don't know any details as to how that might wind up working as a replacement though.

Change 582285 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Declare $wgUser to be deprecated in version 1.35

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

Didn't happen in 1.34, patch above declares it (soft) deprecated as of 1.35

Change 582285 merged by jenkins-bot:
[mediawiki/core@master] Declare $wgUser to be deprecated in version 1.35

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

Status update for all uses of global $wgUser in deployed code

Core

Maintenance scripts writing to $wgUser

Needed until all reads are removed:
cleanupSpam.php, cleanupTable.inc, deleteBatch.php, eleteDefaultMessages.php, deleteEqualMessages.php, edit.php, importImages.php, importSiteScripts.php, moveBatch.php, preprocessorFuzzTest.php

Tests
  • ParserTestRunner.php - to be addressed
  • MediaWikiIntegrationTestCase.php - to be addressed
  • ApiMainTest.php - testing code that uses $wgUser, needed until removal from ApiMain
  • ApiTestCase.php - to be addressed
  • ApiUserrightsTest.php - to be addressed
  • LanguageConverterTest.php - testing code that uses $wgUser, needed until removal from LanguageConverter

Some tests also use setMwGlobals to interact with $wgUser: EditPageTest.php, RevisionDbTest.php, RevisionTest.php, CheckBlocksSecondaryAuthenticationProviderTest.php, RequestContextTest.php, LogFormatterTest.php, ParserOptionsTest.php, UserTest.php, DumpTestCase.php - all to be addressed

Deployed extensions

Still used in

The codesearch linked in the task description didn't catch some of these, because they were accessed via $GLOBALS, setMwGlobals, or were in the global context already. I'm updating the link to hopefully catch them all.

DannyS712 updated the task description. (Show Details)Sep 11 2020, 7:14 PM
Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:02 PM
DannyS712 renamed this task from Deprecate $wgUser to Deprecate and remove $wgUser.Sun, Nov 15, 12:17 AM