Hey all,
TL;DR:
* We did not make the breaking change last week for Wikimedia; it is postponed.
* MediaWiki 1.24.0 will ship with jQuery Migrate switched off.
* Wikimedia non-Wikimedia wikis can enable jQuery Migrate if needed.
* When MediaWiki 1.24 is released, we will switch off jQuery Migrate for
Wikimedia wikis.
As we said last month, we are upgrading MediaWiki's jQuery to version 1.11.x
[1],
which removes some long-deprecated functions. These were done in phase one [2]
and two [3] as of last week.
However, we have held off with phase 3 (removing the jQuery Migrate plugin) for
a while to give migration a little more time.
The amount of migration work necessary has been much less than I anticipated.
Very few scripts have actually needed changing, probably because these features
have been deprecated for quite a while now. Some of newer developers may never
have even known of these APIs.
Having said that, it does take a while for a message like this to spread out to
some members of our large community. While those wiki scripts and gadgets which
have active maintainers have been looked into, and (where needed) updated
accordingly, a large number of gadgets and scripts in the cluster of Wikimedia
wikis have not yet had a chance to get a grip on this, let alone extensions and
wikis outside of Wikimedia.
While I don't want to set another deadline, I think it makes sense to ship the
jQuery Migrate plugin for one release (with MediaWiki 1.24), and then remove it
in MediaWiki 1.25. This will give all wikis' communities and extension authors
a few more months until the MediaWiki 1.24 branch point (in Autumn 2014) before
they will need to make adjustments to work with MediaWiki master.
MediaWiki 1.24.0 stable will disable support for legacy jQuery by default. If
you find you have scripts, gadgets or extensions still using legacy jQuery APIs,
you can enable them with a simple line in LocalSettings.php:
$wgIncludejQueryMigrate = true;
And of course when you find you need to do this, please make an effort to
ensure the maintainers of those items still using these legacy features are
aware of this so they may patch the code accordingly (using the upgrade guide[4]
and my earlier announcement [5]). When MediaWiki 1.24 is released, we will
switch off jQuery Migrate for Wikimedia wikis.
— Krinkle
[1] https://bugzilla.wikimedia.org/show_bug.cgi?id=44740
[2] https://gerrit.wikimedia.org/r/#/c/131494/
[3] https://gerrit.wikimedia.org/r/#/c/133477/
[4] http://jquery.com/upgrade-guide/1.9/
[5] http://www.mail-archive.com/wikitech-l@lists.wikimedia.org/msg75735.html
On 7 May 2014, at 18:29, Krinkle krinklem...@gmail.com wrote:
Hey all,
TL;DR: jQuery will soon be upgraded from v1.8.3 to v1.11.x (the latest). This
major release removes deprecated functionality. Please migrate away from this
deprecated functionality as soon as possible.
It's been a long time coming but we're now finally upgrading the jQuery
package
that ships with MediaWiki.
We used to regularly upgrade jQuery in the past, but got stuck at v1.8 a
couple
of years ago due to lack of time and concern about disruption. Because of
this,
many developers have needed to work around bugs that were already fixed in
later
versions of jQuery. Thankfully, jQuery v1.9 (and its v2 counterpart) has been
the first release in jQuery history that needed an upgrade guide[1][2]. It's a
major release that cleans up deprecated and dubious functionality.
Migration of existing code in extensions, gadgets, and user site scripts
should be trivial (swapping one method for another, maybe with a slight change
to the parameters passed). This is all documented in the upgrade guide[1][2].
The upgrade guide may look scary (as it lists many of your favourite methods),
but they are mostly just addressing edge cases.
== Call to action ==
This is a call for you, to:
1) Get familiar with http://jquery.com/upgrade-guide/1.9/.
2) Start migrating your code.
jQuery v1.9 is about removing deprecated functionality. The new functionality
is
already present in jQuery 1.8 or, in some cases, earlier.
3) Look out for deprecation warnings.
Once instrumentation has begun, using ?debug=true will log jQuery
deprecation
warnings to the console. Look for ones marked JQMIGRATE [7]. You might also
find deprecation notices from mediawiki.js, for more about those see the mail
from last October [8].
== Plan ==
1) Instrumentation and logging
The first phase is to instrument jQuery to work out all the areas which will
need work. I have started work on loading jQuery Migrate alongside the current
version of jQuery. I expect that to land in master this week [6], and roll
out on
Wikimedia wikis the week after. This will enable you to detect usage of most
deprecated functionality through your browser console. Don't forget the
upgrade
guide[1], as Migrate cannot detect everything.
2) Upgrade and Migrate
After this, the