It's almost New Year, and time for presents (according to the Russian
traditions).
I hereby present you the API versioning framework. Navigate to
https://gerrit.wikimedia.org/r/#/c/41014/ and get that patch to your local
installation for a test run.
There shouldn't be any visible functionality changes. At least that was the
goal. But now we can easily add a new version module or a submodule
(prop/list/etc) without breaking existing code.
To see it in action -- in ApiMain.php, add this line into $Modules array:
'query2' => 'ApiQuery',
it adds another version of query implemented by the same existing class.
now if you look at
http://localhost/api.php you will see
* action=query *
This module is obsolete. See old documentation at
api.php?action=help&modules=query
* action=query2 *
... -- the regular query parameters -- ...
both query and query2 will work identically in this example unless you
change ApiQuery.php.
Let the rotten egg throwing commence!
Once we settle on this, I propose you join me at the mediawiki labs --
https://labsconsole.wikimedia.org/wiki/Nova_Resource:Mediawiki-api
to develop and test the actual changes to the APIv2 interface. To keep it
going full steam ahead, I will accept ideas, criticisms, cookies, code
patches, small unmarked bills and large paychecks, but most importantly -
your time analyzing and commenting this effort.
--Yurik