Page MenuHomePhabricator

Remove deprecated mediawiki.api.* dependencies from extensions
Closed, ResolvedPublic

Description

In rECHO/extension.json (line 76) the deprecated "mediawiki.api.options" is still requested.

That is merged into "mediawiki.api" this month in ecc812f0.

Obviously this is bothering me by dropping deprecation warnings on console, while I searched hundreds of JS units for an mw.loader.using() call.

Perhaps there are more similar cases hidden in diffusion.

https://codesearch.wmflabs.org/search/?q=mediawiki%5C.api%5C.(category%7Cedit%7Clogin%7Coptions%7Cparse%7Cupload%7Cuser%7Cwatch%7Cmessages%7Crollback)&i=nope&files=&repos=

Details

Related Gerrit Patches:
mediawiki/core : mastermediawiki.api: Remove deprecated module aliases
mediawiki/extensions/Translate : masterAvoid deprecated mediawiki.api aliases on MW 1.32+
mediawiki/extensions/CollaborationKit : masterDon't use deprecated `mediawiki.api.edit`
mediawiki/extensions/BlueSpiceCategoryManager : masterDon't use deprecated `mediawiki.api.edit`
mediawiki/extensions/BlueSpiceFoundation : masterDon't use deprecated `mediawiki.api.upload`
mediawiki/extensions/UniversalLanguageSelector : masterRemove dependencies on deprecated modules 'mediawiki.api.*'
mediawiki/extensions/CookieWarning : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/TranslationNotifications : masterDon't use deprecated `mediawiki.api.parse`
mediawiki/extensions/UploadWizard : masterDon't use deprecated `mediawiki.api.{edit|messages|parse}`
mediawiki/extensions/Wikibase : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/TwnMainPage : masterDon't use deprecated `mediawiki.api.login`
mediawiki/extensions/UniversalLanguageSelector : masterDon't use deprecated `mediawiki.api.options` or `mediawiki.api.parse`
mediawiki/extensions/Translate : masterDon't use deprecated `mediawiki.api.parse`
mediawiki/extensions/CirrusSearch : masterDon't use deprecated `mediawiki.api.messages`
mediawiki/extensions/MobileFrontend : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/TwoColConflict : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/Echo : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/TemplateData : masterDon't use deprecated `mediawiki.api.messages`
mediawiki/extensions/MultimediaViewer : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/LiquidThreads : masterDon't use deprecated `mediawiki.api.watch`
mediawiki/extensions/CodeEditor : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/Citoid : masterDon't use deprecated `mediawiki.api.options`
mediawiki/extensions/GuidedTour : masterDon't use deprecated `mediawiki.api.parse`

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Nirmos added a subscriber: Nirmos.Jun 10 2018, 12:50 PM

Change 439514 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/GuidedTour@master] Don't use deprecated mediawiki.api.parse

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

Change 439515 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/LiquidThreads@master] Don't use deprecated mediawiki.api.watch

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

Change 439516 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/TemplateData@master] Don't use deprecated mediawiki.api.messages

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

phuedx updated the task description. (Show Details)Jun 11 2018, 1:18 PM

Change 439514 merged by jenkins-bot:
[mediawiki/extensions/GuidedTour@master] Don't use deprecated mediawiki.api.parse

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

Change 439388 merged by jenkins-bot:
[mediawiki/extensions/Citoid@master] Don't use deprecated mediawiki.api.options

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

Change 439389 merged by jenkins-bot:
[mediawiki/extensions/CodeEditor@master] Don't use deprecated mediawiki.api.options

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

Change 439392 merged by jenkins-bot:
[mediawiki/extensions/MultimediaViewer@master] Don't use deprecated mediawiki.api.options

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

Change 439390 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Don't use deprecated mediawiki.api.options

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

Change 439516 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] Don't use deprecated mediawiki.api.messages

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

Change 439515 merged by jenkins-bot:
[mediawiki/extensions/LiquidThreads@master] Don't use deprecated mediawiki.api.watch

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

Just noting here that there are two modules mentioned in ecc812f0 that are not present in PerfektesChaos's comment. These are:
mediawiki.api.login
mediawiki.api.rollback

Change 439393 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Don't use deprecated mediawiki.api.options

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

Change 439391 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Don't use deprecated mediawiki.api.options

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

Change 434739 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/UniversalLanguageSelector@master] Remove dependencies on deprecated modules 'mediawiki.api.*'

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

Vvjjkkii renamed this task from Remove deprecated mediawiki.api.* dependencies from extensions to lcbaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
Petar.petkovic renamed this task from lcbaaaaaaa to Remove deprecated mediawiki.api.* dependencies from extensions.Jul 1 2018, 11:15 PM
Petar.petkovic raised the priority of this task from High to Needs Triage.
Petar.petkovic updated the task description. (Show Details)
Petar.petkovic added a subscriber: Aklapper.
Petar.petkovic added a subscriber: Petar.petkovic.
PerfektesChaos added a comment.EditedJul 7 2018, 10:33 AM

I still receive api.options warnings with no detectable cause.

No user script known to be involved, no trace in loaded JS codes, nothing in dewiki:MediaWiki namespace, still after disabled Greasemonkey. Even as an anonymous guest on a foreign browser without my sophisticated development environment on Special:Preferences which blocks site and user resources, trying on an exotic wiki.

Looking at rMW /resources/Resources.php line 875 until 885: Is this still meaningful?

And this search from task desc still finds extensions/CookieWarning and ULS which are active in all projects, and other living extensions among discontinued stuff.

Change 445003 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Wikibase@master] Don't use deprecated mediawiki.api.options

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

Change 445004 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/CookieWarning@master] Don't use deprecated mediawiki.api.options

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

Change 445006 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/UniversalLanguageSelector@master] Don't use deprecated mediawiki.api.options or mediawiki.api.parse

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

Change 445007 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/TwnMainPage@master] Don't use deprecated mediawiki.api.login

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

Change 445008 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/TranslationNotifications@master] Don't use deprecated mediawiki.api.parse

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

Change 445009 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/UploadWizard@master] Don't use deprecated mediawiki.api.{edit|messages|parse}

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

Change 445010 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Translate@master] Don't use deprecated mediawiki.api.parse

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

Change 445011 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/CirrusSearch@master] Don't use deprecated mediawiki.api.messages

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

Change 445011 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Don't use deprecated mediawiki.api.messages

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

Change 445010 abandoned by Jforrester:
Don't use deprecated mediawiki.api.parse

Reason:
Already done in If1bd7521.

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

Change 434738 had a related patch set uploaded (by Jforrester; owner: Petar.petkovic):
[mediawiki/extensions/Translate@master] Remove dependencies on deprecated modules 'mediawiki.api.*'

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

Change 445006 abandoned by Jforrester:
Don't use deprecated mediawiki.api.options or mediawiki.api.parse

Reason:
Already done in I27dd62fae.

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

Change 445003 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Don't use deprecated mediawiki.api.options

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

Change 445007 merged by jenkins-bot:
[mediawiki/extensions/TwnMainPage@master] Don't use deprecated mediawiki.api.login

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

Change 445009 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Don't use deprecated mediawiki.api.{edit|messages|parse}

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

Change 445008 merged by jenkins-bot:
[mediawiki/extensions/TranslationNotifications@master] Don't use deprecated mediawiki.api.parse

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

Change 445004 merged by jenkins-bot:
[mediawiki/extensions/CookieWarning@master] Don't use deprecated mediawiki.api.options

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

Change 434739 merged by jenkins-bot:
[mediawiki/extensions/UniversalLanguageSelector@master] Remove dependencies on deprecated modules 'mediawiki.api.*'

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

Change 464944 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/BlueSpiceFoundation@master] Don't use deprecated mediawiki.api.upload

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

Change 464945 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/BlueSpiceCategoryManager@master] Don't use deprecated mediawiki.api.edit

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

Change 464946 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/CollaborationKit@master] Don't use deprecated mediawiki.api.edit

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

Change 464945 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceCategoryManager@master] Don't use deprecated mediawiki.api.edit

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

Change 464944 merged by jenkins-bot:
[mediawiki/extensions/BlueSpiceFoundation@master] Don't use deprecated mediawiki.api.upload

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

Change 464946 merged by jenkins-bot:
[mediawiki/extensions/CollaborationKit@master] Don't use deprecated mediawiki.api.edit

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

Krenair added a subscriber: Krenair.

I've gone through @Krinkle's mwgreps and dealt with on-wiki uses of those modules

Change 485146 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] mediawiki.api: Remove deprecated module aliases

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

Change 434738 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Avoid deprecated mediawiki.api aliases on MW 1.32+

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

Change 485146 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.api: Remove deprecated module aliases

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

Krinkle removed a subscriber: Krinkle.
Jdforrester-WMF closed this task as Resolved.Jan 22 2019, 10:08 PM

We removed this from extensions to find out that all software parts using it is now broken for REL1_31 (have not tested REL1_32). The alias is not being recognized at least in REL1_31. @Jdforrester-WMF @Krinkle ?

@Kghbln The aliases were removed in MediaWiki 1.33.0. They are present in 1.31.x and 1.32.x. In what way are they not recognised? Which exact tag or git hash of MediaWiki does this happen on? Does the content of resources/Resources.php match that of the tarball release? (source code)

Krinkle reopened this task as Open.Aug 24 2019, 9:11 PM
Krinkle moved this task from Limbo to Watching on the Performance-Team (Radar) board.
Kghbln added a comment.EditedAug 24 2019, 9:15 PM

We are getting a "TypeError: api.parse is not a function" error: see here. The wiki showing the error uses fe531ceb271ee9418a23a092276a7b81cedabd2d

@Kghbln OK. Based on the comment from mwjames on that GitHub issue, I think there was a misunderstanding. It is not mediawiki.api that was deprecated aliased, rather modules like mediawiki.api.parse were deprecated after merging into mediawiki.api and kept as alias for 1 release.

  • In MW 1.31 and earlier, methods like mw.Api#parse existed in mediawiki.api.parse.
  • In MW 1.32, these were merged into mediawiki.api. With mediawiki.api.parse as alias. Using either works on this release, and one should migrate toward mediawiki.api.
  • In MW 1.33, the deprecated aliases were removed, and mediawiki.api must be used instead.
Krinkle closed this task as Resolved.Aug 24 2019, 9:29 PM
Krinkle claimed this task.

@Krinkle Thanks for clarifying. We were working on this report which suggested that the alias was added in MW 1.31