Page MenuHomePhabricator

[Tracking] Avoid use of deprecated core classes, class methods, configs, and constants in MF
Closed, ResolvedPublic

Description

In most cases, and even at the moment, MobileFrontend requires the latest MW version (now master requires 1.35), it would be also good practice to avoid uses of deprecated methods, classes or configs from core in the extension.

I'm particularly interested in cleaning up deprecation usages and wooyaa my root extension for this will now be MobileFrontend. @pmiazga, @Jdlrobson, is it a good idea to always reduce usage of deprecated functions in this extension?

Details

ProjectBranchLines +/-Subject
mediawiki/extensions/MobileFrontendmaster+12 -4
mediawiki/extensions/MobileFrontendmaster+5 -5
mediawiki/extensions/MobileFrontendmaster+5 -3
mediawiki/extensions/MobileFrontendmaster+4 -4
mediawiki/extensions/MobileFrontendmaster+2 -1
mediawiki/extensions/MobileFrontendmaster+13 -1
mediawiki/extensions/MobileFrontendmaster+25 -5
mediawiki/extensions/MobileFrontendmaster+41 -10
mediawiki/extensions/MobileFrontendmaster+15 -8
mediawiki/extensions/MobileFrontendmaster+29 -8
mediawiki/extensions/MobileFrontendmaster+6 -2
mediawiki/extensions/MobileFrontendmaster+2 -2
mediawiki/extensions/MobileFrontendmaster+4 -1
mediawiki/extensions/MobileFrontendmaster+36 -25
mediawiki/extensions/MobileFrontendmaster+29 -22
mediawiki/extensions/MobileFrontendmaster+3 -7
Show related patches Customize query in gerrit

Event Timeline

xSavitar created this task.Apr 26 2019, 6:10 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 26 2019, 6:10 PM
xSavitar renamed this task from Avoid usage of deprecated methods, classes, configs etc in MobileFrontend extension to Avoid usage of deprecated core methods, classes, configs etc in MobileFrontend extension.Apr 26 2019, 6:14 PM

@D3r1ck01 yes, if something is deprecated we should stop using it.

xSavitar renamed this task from Avoid usage of deprecated core methods, classes, configs etc in MobileFrontend extension to (Tracking) Avoid usage of deprecated core methods, classes, configs in MF.EditedApr 26 2019, 6:37 PM

@D3r1ck01 yes, if something is deprecated we should stop using it.

Right! In that case, any deprecation you find in this code base, please you can create a subtask and I'll be more than happy to handle it :)

Change 506899 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/extensions/MobileFrontend@master] Avoid usage of deprecated methods ::getStore() and ::setTOCEnabled()

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

Change 506899 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Avoid usage of deprecated methods ::getStore() and ::setTOCEnabled()

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

xSavitar moved this task from Backlog to Doing [WIP] on the User-xSavitar board.Jul 22 2019, 10:19 AM
xSavitar renamed this task from (Tracking) Avoid usage of deprecated core methods, classes, configs in MF to (Tracking) Avoid usage of deprecated core methods, classes, configs, and constants in MF.EditedJul 23 2019, 11:56 AM

I'm cleaning up all constants in the deprecated Revision class, submitting a patch soon.

Change 525067 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/extensions/MobileFrontend@master] Avoid use of deprecated Revision::* constants in MobileFrontend

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

xSavitar renamed this task from (Tracking) Avoid usage of deprecated core methods, classes, configs, and constants in MF to [Tracking] Avoid use of deprecated core classes, class methods, configs, and constants in MF.Jul 23 2019, 11:59 AM
xSavitar moved this task from Doing [WIP] to Under Review on the User-xSavitar board.

Change 525067 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Avoid use of deprecated Revision::* constants in MobileFrontend

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

xSavitar updated the task description. (Show Details)Aug 3 2019, 10:38 AM

Change 527838 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/extensions/MobileFrontend@master] 💩 diff: Avoid usage of deprecated Revision::newFromId() method

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

Change 527839 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/extensions/MobileFrontend@master] 💩 specials: Follow up on change I24cbcd6ca1d3e85cdc5db70

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

Change 527839 abandoned by D3r1ck01:
💩 specials: Follow up on change I24cbcd6ca1d3e85cdc5db70

Reason:
will resurrect this if need be.

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

xSavitar updated the task description. (Show Details)Aug 20 2019, 2:37 AM

Change 531015 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/extensions/MobileFrontend@master] api: Avoid use of deprecated MWHttpRequest::factory() method

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

Change 531015 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] 💩 api: Avoid use of deprecated MWHttpRequest::factory()

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

xSavitar updated the task description. (Show Details)
xSavitar updated the task description. (Show Details)

Change 570065 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] specials: Avoid deprecated calls to ->isAllowed() method

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

Change 570065 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] 💩 specials: Avoid deprecated calls to ->isAllowed() method

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

xSavitar moved this task from Under Review to Doing [WIP] on the User-xSavitar board.

Change 527838 abandoned by D3r1ck01:
💩 diff: Avoid usage of deprecated Revision::newFromId() method

Reason:
will revisit as part of the deprecation cleanup work I'm doing for MF

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

Change 608876 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] Replace deprecated calls to User::getOption() method, use service

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/ /608876

Change 608908 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] Replace deprecated calls to User::getOption() method, use service

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/ /608908

Change 608876 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Replace deprecated calls to User::getOption() method, use service

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/ /608876

Change 608908 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Replace deprecated calls to User::getOption() method, use service

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/ /608908

Change 609107 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] Avoid deprecated calls to User::setOption() method, use service

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/ /609107

Change 609108 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] specials: Avoid deprecated calls to User::getOption(), use service

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/ /609108

Change 609107 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Avoid deprecated calls to User::setOption() method, use service

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

Change 609108 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] specials: Avoid deprecated calls to User::getOption(), use service

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

Change 609867 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] specials: Avoid usage of deprecated ->getGroups() method

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

Change 609872 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] MobileContext: Avoid usage of deprecated User::getOptons() method

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

Change 609867 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] specials: Avoid usage of deprecated User::getGroups() method

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

Change 609872 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] MobileContext: Avoid usage of deprecated User::getOptions() method

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

Change 612426 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] specials: Avoid usage of deprecated Language::getVariants()

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

Change 612426 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] specials: Avoid usage of deprecated Language::getVariants()

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

Change 613135 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] Avoid usage of deprecated Language::hasVariants() method

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

Change 613135 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Avoid usage of deprecated Language::hasVariants() method

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

Change 614860 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] api: Avoid use of Languauge::convert(), make use of LanguageConverter

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

Change 614860 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] api: Avoid use of Languauge::convert(), make use of LanguageConverter

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

Jdlrobson moved this task from Backlog to Team: web on the MobileFrontend board.Jul 24 2020, 2:53 AM

Change 616126 had a related patch set uploaded (by D3r1ck01; owner: Derick A):
[mediawiki/extensions/MobileFrontend@master] tests: Avoid usage of deprecated methods in automated tests

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

Change 616126 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] tests: Avoid usage of deprecated methods in automated tests

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

xSavitar closed this task as Resolved.Aug 8 2020, 12:24 PM

All PHP deprecations have been cleaned up apart from:

@Jdlrobson, I'll resolve this task for now and create a new task to track the last remaining things to cleanup! Thanks for all the reviews :)