Composer

Composer es un gestor de dependencias para librarías de PHP. Adicionalmente, puede emplearse para gestionar la instalación de las extensiones de Mediawiki (como en MediaWiki 1.22). Comenzando con la versión 1.25, las dependencias principales centrales de MediaWiki se gestionan a través de composer.

Installing Composer
There are multiple ways to install composer: To grab the latest snapshot: wget https://getcomposer.org/composer.phar

That downloads a snapshot of the current master and will expire in 30 days. There are also phars for the alpha "releases" such as 1.0.0-alpha.

For users on OSX, you can use homebrew to install composer:. If that doesn't work, or you do not have homebrew installed, you can try.

Jenkins and the extension distributor use the copy of composer contained in the "integration/composer" git repo.

Once composer is installed, you can run commands via the downloaded phar: php composer.phar someCommand

You may want to move the phar into your path so it can be used as a normal executable: composer someCommand

Usage in MediaWiki core
MediaWiki depends on some external libraries which are brought in via composer. Composer creates an autoloader at, which is included by WebStart.php. These libraries are bundled with the tarball so system administrators do not need to use composer directly. More details can be found in the links below:

Resources

 * How to install extensions through Composer
 * Extension:Extension Installer - must be used for MediaWiki ≤ 1.21.x to install extension with Composer
 * List of extensions that can or must be installed with Composer
 * Category:Extensions supporting Composer
 * How to add external libraries to MediaWiki core or extensions
 * Best practices when creating a composer.json
 * Information about adding packages to packagist.org