Page MenuHomePhabricator

Add a warning when deprecated parameters of mw.Api are used
Closed, ResolvedPublic

Description

There are many methods of mw.Api which accepted callback functions as parameters "ok" and "err" (e.g. mw.Api.get/post[1], mw.Api.parse[2], etc...), but most (all) of these are deprecated. Consider showing a warning message in the console when these are used. I'm not sure if this can be made using mw.log.deprecate.

[1] https://github.com/wikimedia/mediawiki-core/blob/60f114d8f5955d172680784935791e0254251c97/resources/mediawiki.api/mediawiki.api.js#L140-L149
[2] https://github.com/wikimedia/mediawiki-core/blob/aba0a461005058a3b0de377a2f67e5284004b5c6/resources/mediawiki.api/mediawiki.api.parse.js#L11-L12


Version: 1.23.0
Severity: enhancement

Details

Reference
bz61372

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:54 AM
bzimport set Reference to bz61372.
He7d3r created this task.Feb 14 2014, 11:51 AM

Change 115898 had a related patch set uploaded by Helder.wiki:
Add a warning when deprecated parameters of mw.Api are used

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

Change 115898 merged by jenkins-bot:
mediawiki.api: Emit warning when deprecated callback parameters are used

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