Page MenuHomePhabricator

Clean up ContentHandler deprecated functions and hooks
Closed, ResolvedPublic

Description

The ContentHandler project deprecated a bunch of stuff. Many of those functions and hooks are still in active use and don't emit deprecation warnings. Given that we have another large refactoring planned (MCR), we should clean up this technical debt first.

This task should be closed once all hooks and functions deprecated by ContentHandler are emitting deprecation warnings (e.g. using wfDeprecated). That means updating at least all Wikimedia-deployed extensions.

functiondeprecated noticedeprecated func doccomment
Article::getContent()noyestasks filed
Article::fetchContent()yesyestasks filed
Article::doEdit() / WikiPage::doEdit()yesyestasks filed
Article::getText()yesyesno apparent usages
Revision::getText()yesyesused by WikiPage::getText() and various extensions (Echo, MobileFrontend, MWSearch, SpamBlacklist...).
WikiPage::getText()yesyestasks filed
WikiRevision::getText()yesyesno apparent uses
WikiPage::getAutosummary()yesyestasks filed
Article::getAutosummary()(done in WikiPage)yesonly used in ArticleTest::testStaticFunctions()
Article::prepareTextForEdit()(done in WikiPage)yestasks filed
WikiPage::prepareTextForEdit()yesyestasks filed

Hooks (crossed out means marked as deprecated when called):

  • ArticleAfterFetchContent
  • ArticleInsertComplete
  • ArticleSave
  • ArticleSaveComplete
  • ArticleViewCustom
  • EditFilterMerged
  • EditPageGetDiffText
  • EditPageGetPreviewText
  • ShowRawCssJs
  • TitleIsCssOrJsPage
  • TitleIsWikitextPage

Related Objects

StatusAssignedTask
ResolvedFilip
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
Resolveddaniel
Resolvedenigmaeth
ResolvedYaron_Koren
ResolvedNone
Resolvedrohitt
Resolvedrohitt
DeclinedNone
ResolvedReedy
Resolvedenigmaeth
ResolvedFilip
ResolvedReedy
InvalidNone
ResolvedFlorian
Resolvedenigmaeth
ResolvedReedy
Resolvedenigmaeth
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
Resolveddaniel
Resolvedenigmaeth
Resolved Mattflaschen-WMF
Resolvedenigmaeth
Resolvedenigmaeth
Resolvedrafidaslam
Resolveddaniel
Resolveddaniel
Resolveddaniel
ResolvedReedy
ResolvedJdforrester-WMF
ResolvedReedy
ResolvedNone
ResolvedReedy
ResolvedReedy
ResolvedLegoktm
ResolvedReedy
ResolvedLegoktm
ResolvedLegoktm
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedLegoktm
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedReedy
ResolvedLegoktm
ResolvedLegoktm
ResolvedReedy
ResolvedReedy
ResolvedReedy
InvalidNone
ResolvedFilip
ResolvedFilip

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Reedy updated the task description. (Show Details)Oct 5 2016, 12:30 AM
Jdforrester-WMF triaged this task as Normal priority.Oct 5 2016, 4:51 PM
Reedy added a comment.Oct 5 2016, 11:17 PM

Heads up.. We're getting close to the the end of the 1.28 development cycle... So if we want to get stuff marked as deprecated in this release, we've only got a few more weeks to get it really done (else we're backporting to the 1.28 branch etc)

I'll evaluate those hooks I created tasks for (87-92) and see about making some more patches...

From the core side, we're mostly there, just a couple more deprecation notices to bring in... Extensions, well, hopefully the deprecated notices will help out there

Change 314208 merged by jenkins-bot:
Mark 3 hooks deprecated by ContentHandler as such

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

Reedy updated the task description. (Show Details)Oct 6 2016, 1:17 PM
Reedy updated the task description. (Show Details)
Reedy updated the task description. (Show Details)Oct 6 2016, 1:24 PM
Reedy updated the task description. (Show Details)
Reedy updated the task description. (Show Details)Oct 6 2016, 1:34 PM

So, for functions, just https://gerrit.wikimedia.org/r/#/c/314548/ for prepareTextForEdit and that's them all done...

Change 314565 had a related patch set uploaded (by Reedy):
Final deprecation of ContentHandler hooks

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

Change 314556 had a related patch set uploaded (by Reedy):
Make more ContentHandler replaced hooks emit deprecation warnings

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

Change 314556 merged by jenkins-bot:
Make more ContentHandler replaced hooks emit deprecation warnings

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

Reedy updated the task description. (Show Details)Oct 6 2016, 11:21 PM

Change 314630 had a related patch set uploaded (by Reedy):
Deprecation of 2 more ContentHandler hooks

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

Change 314630 merged by jenkins-bot:
Deprecation of 2 more ContentHandler hooks

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

Reedy updated the task description. (Show Details)Oct 8 2016, 11:47 AM

Change 314821 had a related patch set uploaded (by Reedy):
Remove ContentHandler::deprecated()

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

Paladox added a subscriber: Paladox.Oct 9 2016, 5:29 PM

Change 315137 had a related patch set uploaded (by Paladox):
Mark 1 hooks deprecated by ContentHandler as such

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

Change 315137 abandoned by Paladox:
Mark 1 hooks deprecated by ContentHandler as such

Reason:
https://gerrit.wikimedia.org/r/#/c/314565/2

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

Change 314821 merged by jenkins-bot:
Remove ContentHandler::deprecated()

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

Change 314565 merged by jenkins-bot:
Deprecate EditFilterMerged hook, final ContentHandler replaced hook

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

Change 324703 had a related patch set uploaded (by Reedy):
Remove ContentHandler functions with no usages at all

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

Change 324705 had a related patch set uploaded (by Reedy):
Article::getAutosummary() and WikiPage::getAutosummary() were removed

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

Change 324710 had a related patch set uploaded (by Reedy):
ArticleViewCustom, EditPageGetDiffText and ShowRawCssJs were removed

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

Change 324703 merged by jenkins-bot:
Remove ContentHandler functions with no usages at all

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

Change 324705 merged by jenkins-bot:
Article::getAutosummary() and WikiPage::getAutosummary() were removed

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

Change 324710 merged by jenkins-bot:
ArticleViewCustom, EditPageGetDiffText and ShowRawCssJs were removed

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

Change 326382 had a related patch set uploaded (by Reedy):
WikiPage::prepareTextForEdit() was removed

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

Change 326382 merged by jenkins-bot:
WikiPage::prepareTextForEdit() was removed

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

Change 326498 had a related patch set uploaded (by Reedy):
WikiPage::getText() was removed

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

Change 326498 merged by jenkins-bot:
WikiPage::getText() was removed

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

Change 326507 had a related patch set uploaded (by Reedy):
Article::fetchContent() was removed

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

Change 326507 merged by jenkins-bot:
Article::fetchContent() was removed

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

Change 331118 had a related patch set uploaded (by Filip):
Removed deprecated function 'Article::getContent()'

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

Filip added a subscriber: Filip.Jan 15 2017, 11:07 AM

We only need to resolve T154498 , and everything will be done.

OK, all child tasks are now Resolved (or moved away)… so can we close this?

Filip added a comment.Jan 19 2017, 4:27 PM

@Reedy: So its done? All subtasks are gone

Filip closed this task as Resolved.Jan 19 2017, 4:28 PM
Filip claimed this task.

Change 331118 abandoned by Reedy:
Removed deprecated function 'Article::getContent()'

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