Page MenuHomePhabricator

Remove all methods that were hard-deprecated in the 1.41 release
Open, Needs TriagePublic

Description

Hard-deprecated methods can be removed when they have been emitting deprecation warnings by calling wfDeprecated for at least three months, and the call to wfDeprecated is included in at least one stable release (see the Stable Interface Policy).

As of April 2024, all methods that had been hard-deprecated in the 1.41 release can be removed (See https://phabricator.wikimedia.org/source/mediawiki/browse/REL1_41/ for the code of that release).

Code search can be used to find calls to wfDeprecated. For instance, to find methods that have been soft-deprecated in 1.39 or earlier, use https://codesearch.wmcloud.org/search/?q=wfDeprecated%5C%28.*%2C+%271%5C.3&files=&excludeFiles=&repos=MediaWiki+core

Note however that the version number in the call indicates when the code was soft deprecated by tagging it. Sometimes, a method was soft-deprecated for many releases, but only got hard deprecated recently - so a method that says 1.35 in the wfDeprecated call can probably be removed, but if that call to wfDeprecated wasn't present in the 1.41 release, then it can't be removed yet.

Also, codesearch should be used to double-check that the method in question is no longer used in any deployed code: https://codesearch.wmcloud.org/deployed/. If remaining (ungated) usages are found, a ticket should be filed about that issue.

NOTE: Each method should be removed in a separate patch. That makes it easier to revert the change in case problems arise.

Event Timeline

daniel renamed this task from Remove hard-deprecated methods that have been deprecated since 1.39 or longer to Remove all methods that were hard-deprecated in the 1.41 release.Apr 16 2024, 11:19 AM
daniel updated the task description. (Show Details)

Change #1027195 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/core@master] Block: Drop DatabaseBlock::purgeExpired

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

Change #1027197 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/core@master] Block: Drop AbstractBlock::getPermissionsError

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

Change #1027212 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/core@master] Specials: Drop SpecialBlock::getTargetAndType

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

Change #1027218 had a related patch set uploaded (by Lewis Cawte; author: Lewis Cawte):

[mediawiki/core@master] Remove unused deprecated functions from SpecialEmailUser.php.

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

Change #1027195 merged by jenkins-bot:

[mediawiki/core@master] Block: Drop DatabaseBlock::purgeExpired

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

Change #1027197 merged by jenkins-bot:

[mediawiki/core@master] Block: Drop AbstractBlock::getPermissionsError

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

Change #1027243 had a related patch set uploaded (by Lewis Cawte; author: Lewis Cawte):

[mediawiki/core@master] Remove doDeleteArticleBatched from WikiPage

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

Change #1027243 merged by jenkins-bot:

[mediawiki/core@master] Remove doDeleteArticleBatched from WikiPage

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

Change #1027174 had a related patch set uploaded (by Addshore; author: Lewis Cawte):

[mediawiki/core@master] Refactor ApiEmailUser to use EmailUser/EmailUserFactory classes.

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

Change #1027174 merged by jenkins-bot:

[mediawiki/core@master] Refactor ApiEmailUser to use EmailUser/EmailUserFactory classes.

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

Change #1027218 abandoned by Lewis Cawte:

[mediawiki/core@master] Remove unused deprecated functions from SpecialEmailUser.php.

Reason:

Split into three patches (1027508, 1027511, 1027512)

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

Change #1027212 merged by jenkins-bot:

[mediawiki/core@master] Specials: Drop SpecialBlock::getTargetAndType

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

Change #1049654 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/core@master] UserMailer: delete method rfc822Phrase()

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

Change #1049655 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/core@master] OutputPage: delete method getCSPNonce()

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

Change #1049656 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/core@master] ParserOptions: delete 3 hard deprecated methods

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

Change #1049657 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/core@master] Sanitizer: delete method removeHTMLtags()

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

Change #1049656 merged by jenkins-bot:

[mediawiki/core@master] ParserOptions: delete 3 hard deprecated methods

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

Change #1049657 merged by jenkins-bot:

[mediawiki/core@master] Sanitizer: delete method removeHTMLtags()

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

Change #1049655 merged by jenkins-bot:

[mediawiki/core@master] OutputPage: delete method getCSPNonce()

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

Change #1049654 merged by jenkins-bot:

[mediawiki/core@master] UserMailer: delete method rfc822Phrase()

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

I want to contribute , can I get source code; gerrit source code

@Adityakumar0545: Hi and thanks for your interest. Please read T337916#9948021 and avoid repetitive comments on tasks - thanks! :)