Page MenuHomePhabricator

Deprecate IContextSource::getWikiPage and IContextSource::canUseWikiPage
Open, MediumPublic

Description

WikiPage is going to be broken down into services. It's impossible to instantiate it within the context without using global state, and in general having WikiPage accessor in context violates the laws of nature.

The method usages should be found, replaced with explicit use of WikiPageFactory and method should be hard-deprecated and eventually removed.

Details

ProjectBranchLines +/-Subject
mediawiki/coremaster+61 -56
mediawiki/coremaster+61 -56
mediawiki/extensions/CognitiveProcessDesignermaster+10 -6
mediawiki/skins/MinervaNeuemaster+14 -8
mediawiki/coremaster+31 -6
mediawiki/extensions/AbuseFiltermaster+35 -31
mediawiki/extensions/FileImportermaster+4 -2
mediawiki/extensions/WikiEditormaster+12 -6
mediawiki/extensions/ConfirmEditmaster+23 -10
mediawiki/extensions/BlueSpiceFoundationmaster+13 -2
mediawiki/extensions/AbuseFiltermaster+1 -1
mediawiki/extensions/Wikibasemaster+3 -9
mediawiki/extensions/ConfirmEditmaster+3 -3
mediawiki/extensions/ConfirmEditmaster+4 -3
mediawiki/extensions/WikibaseMediaInfomaster+1 -12
mediawiki/extensions/WikiSharemaster+9 -7
mediawiki/extensions/MobileFrontendmaster+2 -2
mediawiki/extensions/EntitySchemamaster+21 -11
mediawiki/extensions/MsUploadmaster+9 -1
mediawiki/extensions/Wikispeechmaster+1 -1
mediawiki/extensions/TwoColConflictmaster+7 -3
mediawiki/extensions/MiniInvitemaster+10 -12
mediawiki/extensions/SpamBlacklistmaster+3 -1
mediawiki/extensions/AkismetKlikmaster+4 -1
mediawiki/extensions/BlueSpiceFoundationmaster+11 -5
mediawiki/extensions/BlueSpiceFoundationmaster+7 -0
mediawiki/extensions/ProofreadPagemaster+12 -6
mediawiki/extensions/Wikibasemaster+4 -3
Show related patches Customize query in gerrit

Event Timeline

daniel triaged this task as Medium priority.Mar 9 2021, 3:22 PM

Extensions list that should be updated:
Replace usage of IContextSource::getWikiPage:

  • Wikibase (merged)
  • ProofreadPage (merged)
  • BlueSpiceFoundation (merged)
  • EntitySchema
  • MobileFrontend
  • AbuseFilter (merged)
  • AkismetKlik (not-deployed)
  • CognitiveProcessDesigner (not-deployed)
  • ConfirmEdit (merged)
  • CreditsSource
  • MiniInvite (not-deployed) (merged)
  • MsUpload (not-deployed)
  • SpamBlacklist (merged)
  • TwoColConflict (merged)
  • WikibaseMediaInfo
  • WikiShare (not-deployed)
  • Wikispeech (not-deployed) (merged)

Extensions list that should be updated:
Replace usage of IContextSource::canUseWikiPage:

  • BlueSpiceFoundation (merged)
  • ConfirmEdit (merged)
  • MiniInvite (not-deployed) (merged)
  • MobileFrontend
  • ProofreadPage (merged)
  • WikiShare (not-deployed)

We have extension that extends/implements IContextSource so we need to update those methods deprecation also there:

  • BlueSpiceFoundation (Context.php, BSApiTasksBase.php)

Change 699911 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/Wikibase@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 699911 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701091 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/ProofreadPage@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701127 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/BlueSpiceFoundation@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 701091 merged by jenkins-bot:

[mediawiki/extensions/ProofreadPage@master] Replace depricating method IContextSource::getWikiPage & IContextSource::canUseWikiPage

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

Change 701356 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/BlueSpiceFoundation@master] Declare missing method of CsrfTokenSetProvider.

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

Change 701356 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceFoundation@master] Declare missing method of CsrfTokenSetProvider.

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

Change 701127 merged by jenkins-bot:

[mediawiki/extensions/BlueSpiceFoundation@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 701882 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/EntitySchema@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701893 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/MobileFrontend@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 701896 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/AbuseFilter@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701897 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/AkismetKlik@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701901 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/CognitiveProcessDesigner@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701903 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/ConfirmEdit@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 701911 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/MiniInvite@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 701916 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/MsUpload@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701920 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/SpamBlacklist@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701920 merged by jenkins-bot:

[mediawiki/extensions/SpamBlacklist@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701903 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 701896 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 702119 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/TwoColConflict@master] Replace depricating method IContextSource::getWikiPage

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

Change 702125 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/WikibaseMediaInfo@master] Replace depricating method IContextSource::getWikiPage

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

Change 702130 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/WikiShare@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 702131 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/Wikispeech@master] Replace depricating method IContextSource::getWikiPage

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

Change 701911 merged by jenkins-bot:

[mediawiki/extensions/MiniInvite@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 702131 merged by jenkins-bot:

[mediawiki/extensions/Wikispeech@master] Replace depricating method IContextSource::getWikiPage

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

Change 702119 merged by jenkins-bot:

[mediawiki/extensions/TwoColConflict@master] Replace depricating method IContextSource::getWikiPage

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

Change 701916 merged by jenkins-bot:

[mediawiki/extensions/MsUpload@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 701882 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Replace depricating method IContextSource::getWikiPage to WikiPageFactory usage

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

Change 702365 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/core@master] WIP: Hard deprecate IContextSource::getWikiPage and IContextSource::canUseWikiPage

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

Change 702372 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/BlueSpiceFoundation@master] WIP: Hard deprecate IContextSource::getWikiPage and IContextSource::canUseWikiPage

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

Change 701893 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Replace deprecated method IContextSource methods

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

Change 702125 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Replace depricating method IContextSource::getWikiPage

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

Change 702130 merged by jenkins-bot:

[mediawiki/extensions/WikiShare@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 702614 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/core@master] Replace depricating methods IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 702678 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/Wikibase@master] Replace custom Title mock to MockTitleTrait

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

Change 701903 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/ConfirmEdit@master] Replace depricating method IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Caused T285959: Captcha interface is not shown to unregistered users, page save is not possible.

I'd be concerned what other side effects these patches may be having.

Also, please don't merge patches with typos/grammer errors in them. "depricating" is not a word, it would be "deprecating", but that would be the action of deprecating something... But in this case, "Replace deprecated methods" would be the appropriate wording.

Change 702698 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/ConfirmEdit@master] Replaced deprecate methods IContextSource::getWikiPage && IContextSource::canUseWikiPage.

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

Change 702698 abandoned by Roman Stolar:

[mediawiki/extensions/ConfirmEdit@master] Replaced deprecate methods IContextSource::getWikiPage && IContextSource::canUseWikiPage.

Reason:

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

Change 702678 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Replace custom Title mock to MockTitleTrait

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

Ok, please cease from merging any more of these patches.

With T286140: AbuseLog no longer recording revids of saved edits, this is the second regression that these have caused in production.

It would seem they're not being tested, and are clearly breaking things because they're not doing the right thing.

Change 737353 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/ConfirmEdit@master] Replace deprecated methods IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 737383 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/WikiEditor@master] Replace usage of ConfirmEdit_ActivateCaptcha random properties.

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

Change 737353 merged by jenkins-bot:

[mediawiki/extensions/ConfirmEdit@master] Replace deprecated methods IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 737383 merged by jenkins-bot:

[mediawiki/extensions/WikiEditor@master] Replace usage of ConfirmEdit_ActivateCaptcha random properties.

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

Change 739128 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/AbuseFilter@master] Replace usage of the method IContextSource::getWikiPage that will be deprecated to WikiPageFactory usage

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

Change 739274 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/extensions/FileImporter@master] Replace usage of the method IContextSource::getWikiPage that will be deprecated, to WikiPageFactory usage

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

Change 739274 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Replace usage of the method IContextSource::getWikiPage that will be deprecated, to WikiPageFactory usage

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

Change 739547 had a related patch set uploaded (by Roman Stolar; author: Roman Stolar):

[mediawiki/skins/MinervaNeue@master] Replace usage of the methods IContextSource::getWikiPage & canUseWikiPage that will be deprecated to WikiPageFactory usage

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

Change 702614 merged by jenkins-bot:

[mediawiki/core@master] Replace deprecated methods IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

Change 739547 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Replace usage of the methods IContextSource::getWikiPage & canUseWikiPage that will be deprecated to WikiPageFactory usage

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

Change 702614 merged by jenkins-bot:

[mediawiki/core@master] Replace deprecated methods IContextSource::getWikiPage && IContextSource::canUseWikiPage

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

For reference, this was reverted because of T297744: Page tabs like "Edit", "View history" do not appear on Special:WhatLinksHere.

Change 747227 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/core@master] Replace deprecated IContextSource methods (attempt #2)

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