|This page is currently a draft.
More information and discussion about changes to this draft on the talk page.
composer is a dependency manager for PHP libraries. In addition, it can be used to manage the installation of MediaWiki extensions (as of MediaWiki 1.22). Starting with 1.25, MediaWiki core's external dependencies are being managed with composer.
Installing Composer[edit | edit source]
There are multiple ways to install composer: Grab the latest snapshot:
wget https://getcomposer.org/composer.phar php composer.phar someCommand
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:
brew tap josegonzalez/homebrew-php && brew install composer.
Jenkins and the extension distributor use the copy of composer contained in the "integration/composer" git repo.
You may want to move the downloaded phar into your path so it can be used as a normal executable:
Resources[edit | edit source]
- 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