Manual:Extension support

This is a resource for Extension authors looking to support official older versions of MediaWiki older core releases. There are many administrators out there running older wiki's who for one reason or another have not upgraded their core. For the purpose of this article core refers to the MediaWiki version and not to extension code.

Some reasons might include: This is a sad common scenario in workplace/corporate wikis.
 * Key extensions they use (3rd party or in-house) only work on specific cores.
 * They have made core code changes [ they don't want to/or can't ] reproduce on newer versions
 * Their workplace requires them to put all core software upgrades through a certification process that is costly
 * Their administrator no longer has the time to upgrade to new core version, but may still install extensions (that work)

Depending on the amount of work required, you can extend the audience of your extension by making it compatible with older cores. This is especially true of extensions aiming at or catering to MediaWiki_is_a_corporate_solution

Here is a table that attempts to paint a picture of what version branches are most used on public facing mediawikis:

and with specific version breakdowns:

Because warnings and errors have changed over PHP versions, a good approach to setting up a sandbox to test your extension is to install multiple version of xampp/lampp that match core versions.

Here is a table that attempts to document the likely version of PHP/MySQL to use with which core version. It can be used to document common extension changes to support older cores.

It will also link to hacks you can use to resolve problems to get cores working on newer versions of PHP and MySQL to avoid XAMPP setups. Be aware that if you use a newer version of PHP, your extension may not work in older versions of PHP, even if it works in the older core.

PHP compatibility
Internal changes in PHP sometimes cause code that used to work to stop working on newer versions of PHP. New versions of MediaWiki tend to update to work around this, but if you have an old version, you may run into surprises!


 * reference errors, especially on PHP 5.3 and later
 * Usually these can be resolved by removing one or more '&'s from a function declaration -- you may have to alter the extension to match the calls made in core

Character set problems
Updating from older to newer versions of MediaWiki occasionally ends up with problems relating to character encoding / collation settings on tables.


 * how to resolve this?