Task filed for UW and MediaViewer: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/854

---------- Forwarded message ----------
From: Timo Tijhof <ttijhof@wikimedia.org>
Date: Wed, Sep 3, 2014 at 2:41 AM
Subject: [Engineering] [BREAKING CHANGE] Deprecated JavaScript methods removed in MediaWiki 1.25
To: engineering Wikimedia List <engineering@lists.wikimedia.org>


TL;DR:
* Several deprecated methods in MediaWiki's JavaScript modules will be removed
in a few weeks' time.
* Check your code to ensure it won't break with these changes, and update it
if needed.
* Check and fix any gadgets or scripts you or your wikis rely upon, to prevent
breakage.

As part of the regular update cycle, a number of deprecated methods in our
JavaScript modules will be removed in the MediaWiki 1.25 release. This is an
announcement to give people notice they should update any extensions, gadgets
and scripts they have written, maintain, or rely upon.

Usually we don't give this much attention to removal of deprecated methods,
but due to this being our first proper development cycle for our front-end
code base, I want to make sure this reaches everyone. You're likely not yet in
the habit of updating front-end code between MediaWiki releases.

Deprecated methods to be removed in MediaWiki 1.25:

* Remove mw.user.name() method. [1]
Deprecated since MediaWiki 1.20. Use mw.user.getName() instead.

* Remove mw.user.anon() method. [1]
Deprecated since MediaWiki 1.20): Use mw.user.isAnon() instead.

* Remove mediawiki.api methods' "ok" and "err" callback parameters. [2]
Deprecated since MediaWiki 1.23. Use the returned Promise interface instead.

* Remove mediawiki.api.category "async" parameter. [2]
Deprecated since MediaWiki 1.23. The ability to override $.ajax() to not be
asynchronous has been removed. The default (asynchronous) behaviour remains.
Use the Promise interface to retreive the fetched data from the API.

* Remove jquery.json module.
Deprecated since MediaWiki 1.24. [3] Use standardised JSON.stringify and
JSON.parse methods. And depend on the "json" module to ensure a polyfill is
lazy-loaded for cross-browser support.

## Timeline

These removals will land in MediaWiki 1.25alpha in early October 2014, being
deployed to Wikimedia wikis in October 2014 (probably 1.25wmf2 or 1.25wmf3).

The MediaWiki 1.25.0 stable release is expected to come out around April
2015.

You should make sure that your code is updated before your wiki upgrades to
MediaWiki 1.25. If you know code you rely upon will be affected but don't know
how to fix it, please check with your wiki's community for local experts. If
none of them can help, you can ask for assistance on the the
wikitech-ambassadors mailing list. [5]

## Reminders

In case you've missed the previous announcements:

* The migration period for jQuery core is still on-going and is also scheduled
for MediaWiki 1.25. [4] More about that in the mail from June 2014:
        https://www.mail-archive.com/mediawiki-l%40lists.wikimedia.org/msg13651.html

* Learn about deprecation notices and how you can see them in your browser.
        https://www.mail-archive.com/wikitech-l%40lists.wikimedia.org/msg72198.html

[1] https://gerrit.wikimedia.org/r/#/c/111422/
[2] https://gerrit.wikimedia.org/r/#/c/118733/
[3] https://gerrit.wikimedia.org/r/#/c/140560/
[4] https://gerrit.wikimedia.org/r/#/c/137168/
[5] https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors

– Timo

PS: You can get a sense of the progress on our different migrations, past and
present, via these graphs: http://codepen.io/Krinkle/full/zyodJ/

PS2: This will soon be sent to wikitech-l, mediawiki-l and wikitech-ambassadors as well.
_______________________________________________
Engineering mailing list
Engineering@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/engineering