Last modified: 2014-03-05 19:35:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63372, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61372 - Add a warning when deprecated parameters of mw.Api are used
Add a warning when deprecated parameters of mw.Api are used
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.23.0
All All
: Normal enhancement (vote)
: 1.23.0 release
Assigned To: Helder
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-14 11:51 UTC by Helder
Modified: 2014-03-05 19:35 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2014-02-14 11:51:19 UTC
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
Comment 1 Gerrit Notification Bot 2014-02-27 13:34:42 UTC
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
Comment 2 Bartosz Dziewoński 2014-03-05 19:32:15 UTC
Thanks!
Comment 3 Gerrit Notification Bot 2014-03-05 19:35:06 UTC
Change 115898 merged by jenkins-bot:
mediawiki.api: Emit warning when deprecated callback parameters are used

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links