MediaWiki 2.0

From MediaWiki.org
Jump to: navigation, search

MediaWiki 2.0 would be a version which introduced extensive, backwards-incompatible changes to the codebase. While it would obviously need to be possible to upgrade existing wiki installations smoothly from 1.x versions, it would be reasonable for that process to involve substantial, perhaps irreversible, changes by an upgrade script.

Furthermore, extensions would likely need updating as well, and a 1.x version extension would not be guaranteed to work with MediaWiki 2.0.

bugzilla:70000 tracks this idea.

Breaking changes which would warrant/require 2.0[edit | edit source]

It's important that this not become merely a list of "things we wish we'd done differently in MW". A large, unfocused wishlist of changes would merely delay the version indefinitely, as well as including breaking changes which may not be strictly necessary and hence unnecessarily disruptive.

A new parser[edit | edit source]

A completely rewritten parser has been a pipe dream for many years, and restructuring it into a true 'parser' (rather than a spaghetti bowl of regexes) would probably require some backwards-incompatible changes to wikimarkup. A conversion script would need to identify pages on the wiki using edge-cases where the behaviour has changed, and either automagically convert them, or flag them for manual review, (or both for special cases).

Remove the vast majority of globals[edit | edit source]

Due to the nature of programming, globals are easy to work with. To quote Tim, "globals are magical structures, like little winged monkeys that fly your data from wherever it is generated to wherever it is needed." Right now, in order to use MediaWiki's code you have to set up a global instance of MediaWiki. This becomes difficult when trying to reuse MediaWiki code elsewhere. Of course, some things such as the FileRepo or Database code needs to operate in a singleton (which is just a global in disguise). However, all of the configuration variables and global objects ($wgTitle/$wgArticle, $wgOut, $wgRequest, etc) should either be killed or severely limited (and moved to a singleton). In an ideal world, this could be index.php:

<?php
// MediaWiki 2.0!
require_once( "includes/Autoloader" );
$mw = new MediaWiki();
$mw->doWebRequest();

This also means moving all file-scope code into classes.

Visual editor[edit | edit source]

Main page: Future

A visual editor is currently under development as Extension:VisualEditor. The editor would replace and/or supplement the current wikimarkup-based editing form that is currently in widespread use by MediaWiki.

Big refactorings and internal API improvements[edit | edit source]

Main page: Architecture guidelines

Brion in 2013: «yes, we're thinking of seriously going for a MediaWiki 2.0».[1]

Language: English