Requests for comment/Extension management with Composer

Request for comment (RFC)
Extension management with Composer
Component General
Creation date
Author(s) Markus Glaser
Document status declined
See Phabricator.



Upgrading MediaWiki is fairly easy, finding matching extension versions is not. To make things worse, there are extensions that depend on other extensions. There is currently no standard way to deal with this. So we need to:

  • Indicate an extension's version and dependencies
  • Manage various dependencies among extensions
  • Manage an extension's dependency on the MediaWiki version. This also helps to a faster deployment of extension updates

Current state of implementation

  • Composer support in MediaWiki core [1]
  • Semantic MediaWiki can be installed via Composer [2]



This RfC aims at formalizing Composer support and discussing the neccessary steps to get there.

Standardize Composer support


With Semantic Mediawiki as a proof of concept, we need to identify and propagate widely used scenarios of extension installation.

Extension configuration


Some extensions need to be configured or they need to execute an installation routine. The most prominent example is to run update.php in order to add some extra tables. There's Composer support for scripts during the installation process: [3]. We need to establish best practices on how to handle these.

Extension manager


A user interface is needed. These are the main tasks that an interface should help the user with:

  • Install extensions and their dependencies
  • Check upgrade compatibility ("I want to upgrade to MW1.22, what's the status of my extensions for that?")
  • Update extensions with a click if there is a newer version



All extensions using composer need to come from a central repository. We have to decide whether we want to maintain our own repo or use Packagist, the solution proposed by composer. We also need to establish how an extension gets from our git to the package repository. Composer works with tags to indicate versions. This has already been standardized and adopted by many projects. In this case we can enforce extension versioning. If extension developers want to publish their work via the Extension Manager, they need to add tag following a certain convention.

Development stack

  • Vagrant based installations can ship with Composer installed and use this as a basis for loading additional extensions.

Drawbacks / Issues

  • No support for external tools like vipsscaler or lilypond. These need to be installed manually.
  • Global scope assumtions need to be removed. More details can be found in this blog post by Jeroen.
  • Composer is still in alpha. Jordi Boggiano, developer of Composer, wrote "The reason it is still in alpha though is that I don't like to call it beta while there is still a remote chance that something might need to be broken, and we still have a few open issues that relate to that". However, it's already very widely spread.

See also