Page MenuHomePhabricator

Remove API functions from MediaWiki core which got deprecated in MediaWiki core 1.25
Closed, ResolvedPublic

Description

There are some MediaWiki core methods which has been deprecated since 1.25. So,

  • check if these methods are present in core by searching using the code search tool for example, search getPropertyDescriptions,
  • remove them and
  • update the table below by assigning your self in the appropriate section of the table below (see example in the first row);
Tasks to be completedAssigneespatch linkStatus
ApiBase::getModuleProfileName@Jayprakash12345https://gerrit.wikimedia.org/r/c/mediawiki/core/+/418051Done
ApiBase::getDescriptionBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465673/Done
ApiBase::getParamDescriptionBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465673/Done
ApiBase::getExamplesBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465673/Done
ApiQueryImageInfo::getPropertyDescriptionsDone
ApiBase::profileInBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465675/Done
ApiBase::profileOutBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465675/Done
ApiBase::safeProfileOutBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465675/Done
ApiBase::profileDBInBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465675/Done
ApiBase::profileDBOutBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465675/Done
ApiQueryLogEvents::addLogParamsBrad Jorschhttps://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/465675/Done
  • ApiFormatBase::getDescription
  • ApiBase::getModuleProfileName
  • ApiBase::getProfileTime
  • ApiBase::getProfileDBTime

In case you search and the functions has already been removed, move it to the list of removed methods above.

Setup MediaWiki core locally using the documentation in the Gerrit Tutorials: https://www.mediawiki.org/wiki/Gerrit/Tutorial#Installation

Acceptance Criteria

  1. Remove 2 deprecated functions found in MediaWiki core and add a link to the patch beside the function you're working on in the table above.
  2. Check around if the removed functions have tests (in the tests/phpunit/ directory in MediaWiki core and remove them too keeping an eye on any regressions by running unit tests using (php tests/phpunit/phpunit.php tests/phpunit/).
  3. Mention in the RELEASE-NOTES-1.32 that the deprecated function has been removed.

See example patch: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/418051, https://gerrit.wikimedia.org/r/c/mediawiki/core/+/418053.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 418051 had a related patch set (by Jayprakash12345) published:
[mediawiki/core@master] Remove deprecated function ApiBase::getModuleProfileName

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

Change 418053 had a related patch set (by Jayprakash12345) published:
[mediawiki/core@master] Remove deprecated function ApiBase::getProfileDBTime

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

Change 418054 had a related patch set (by Jayprakash12345) published:
[mediawiki/core@master] Remove deprecated function ApiBase::getProfileTime

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

Change 418053 merged by jenkins-bot:
[mediawiki/core@master] Remove deprecated function ApiBase::getProfileDBTime

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

Change 418051 merged by jenkins-bot:
[mediawiki/core@master] Remove deprecated function ApiBase::getModuleProfileName

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

Change 418054 merged by jenkins-bot:
[mediawiki/core@master] Remove deprecated function ApiBase::getProfileTime

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

Krinkle renamed this task from Remove deprecated functions From Api Classes to Remove functions from Api classes deprecated in 1.25.Jul 13 2018, 11:15 PM
xSavitar subscribed.

Sounds like a good Google-Code-in-2018 task, will mentor this for GCI.

@Gopavasanth, @D3r1ck01: Please edit the task description to explain how students are supposed to find such code and where, where to find RELEASE-NOTES-1.32, how much a student is supposed to do ("Remove code for 2 deprecated functions" from all and every extension until 2 listed functions do not exist anymore anywhere? Or just 2 occurrences in random extensions? How to exactly find these affected extensions to fix, as a student?). Thanks!

Aklapper renamed this task from Remove functions from Api classes deprecated in 1.25 to Remove API functions from extensions which got deprecated in MediaWiki core 1.25.Oct 9 2018, 11:31 AM

@Gopavasanth, @D3r1ck01: This task needs instructions how students are supposed to find such code repositories that still need code updates. [Wrong comment. This task is about MediaWiki core. Not about extensions.]

@Gopavasanth, @D3r1ck01: This task needs instructions how students are supposed to find such code repositories that still need code updates.

Using codesearch most likely, @Gopavasanth and I are chatting about this now and he'll update the task description :)

xSavitar updated the task description. (Show Details)
xSavitar updated the task description. (Show Details)
Aklapper updated the task description. (Show Details)
Aklapper renamed this task from Remove API functions from extensions which got deprecated in MediaWiki core 1.25 to Remove API functions from MediaWiki core which got deprecated in MediaWiki core 1.25.Oct 14 2018, 10:11 PM
Aklapper updated the task description. (Show Details)
Aklapper updated the task description. (Show Details)

This task got messy so I reverted some changes in this task.
This task is about MediaWiki core. For MediaWiki extensions, please create separate tasks.

xSavitar updated the task description. (Show Details)

Remove 2 deprecated function only and add links to patches beside the function you're working on.

As long as no instructions are provided how to replace a specific deprecated function within MediaWiki core with code that is not deprecated, and (even more important) there is no previous checking whether a student would have to remove 1 or 100 occurrences of a single function in the MediaWiki core code base to finish a GCI task, this task cannot be a Google Code-in task IMHO. (Workload for one student is not fair compared to workload for another student.)

So this is Done for now, @D3r1ck01 can you delete this task in GCI website?

MGChecker assigned this task to Anomie.