[MediaWiki-l] BREAKING CHANGE: Some API formats will be removed completely

Max Semenik maxsem.wiki at gmail.com
Thu Nov 13 02:01:08 UTC 2014

Per architecture review[1], several API output formats will be removed from
* wddx and dump - in 6 months (around May 12, 2015)
* yaml, txt and dbg - in 1 year (around November 12, 2015)

They are already deprecated which means that every request made with them
receives a warning about deprecation. So on aforementioned dates, these
formats will be gone from WMF sites and the removals will be part of next
MediaWiki releases (presumably, 1.26 and 1.27). After that, only 3 formats
will be left: json, xml and php. Ideally, we would really love to have only
json, but currently there are no plans of doing it any time soon.

== Migration guide ==
The preferred format for using with MediaWiki API is JSON. The easiest way
to migrate would be:
* "YAML" as used by the API has actually been JSON for years, so just
replace format=yaml with format=json and make sure that your code does not
barf at content-type set to application/json instead of application/yaml.
* WDDX is a type-aware format so the logical transition would be JSON.
* dump and txt were are "serialising" using the PHP functions that were
never supposed to return anything machine-readable; and while format=dbg is
kinda machine-readable, passing its output to PHP's exec() is not the way
of machine-readability any security-aware person would want :) For any of
these formats, just sticking with JSON would make your life much, much
easier. However, if you're relying on specifics of exported PHP state in
your PHP-based client, format=php might make sense for a quick switch.


Best regards,
Max Semenik ([[User:MaxSem]])

More information about the MediaWiki-l mailing list