Composer/es

Composer es un gestor de dependencias para bibliotecas de PHP. Además, puede emplearse para la instalación de extensiones MediaWiki (disponibles desde ). A partir de la versión de MediaWiki, las dependencias de bibliotecas externas del núcleo están siendo gestionadas con "Composer".

En Unix/Linux y macOS
Hay diferentes maneras de utilizar install Composer, además de la más sencilla, :

Descargar la última versión estable:

Esto descarga la última versión estable. También hay phars para versiones alfa, tales como 1.0.0-alpha.

Los usuarios de OS X pueden utilizar Homebrew para instalar Composer:

Si esto no funciona o no tienes Homebrew instalado, puedes intentar lo siguiente:

Jenkins y el distribuidor de extensiones usan la copia de Composer almacenada en el repositorio git "integration/composer".

Una vez Composer esté instalado, puedes ejecutar comando por medio del phar descargado.

Puedes querer mover el phar a tu  para que pueda ser utilizado como un ejecutable normal:

Si el comando  falla debido a permisos, ejecútalo de nuevo con.

En Windows
Just download and run the installer from the download page. If you prefer manual installation, you can follow the above steps except that Windows doesn’t have wget (or APT or Homebrew) by default, and there is no /usr/local/bin directory.

Usage in MediaWiki core
MediaWiki 1.25+ depends on some external libraries which are managed with Composer. Composer creates an autoloader at, which is included by.

Composer managed dependencies are bundled into tarball distributions of MediaWiki and extensions so system administrators do not need to use composer directly. When installing MediaWiki using Git, dependencies declared in  can either be installed locally by running   or the   repository can be cloned to provide the same libraries used on the Wikimedia production cluster.

Using composer-merge-plugin
MediaWiki core "owns"  and will change the contents of that file in both tarball and Git managed updates. In order to allow local installs to use Composer to load optional libraries and/or manage extensions with Composer, a special plugin for Composer named composer-merge-plugin was developed. This plugin and the MediaWiki core  configuration allow a local deployment to add required extensions and libraries to a file   inside the root MediaWiki directory.

can also be used to install Composer managed libraries that are needed by extensions that are not installed using Composer themselves. This is only needed when the extensions are not installed from tarballs generated by Extension Distributor.

To enable Composer to discover and process the  files that may be included in any and all of your locally installed extensions, add something like this to  :

After any changes to, you need to remove   before running   again so that Composer will recalculate the dependencies and the changes will take effect.

Resources

 * List of extensions that can or must be installed with Composer
 * Composer (software)
 * Composer (software)
 * Composer (software)
 * Composer (software)
 * Composer (software)
 * Composer (software)