Composer

Composer is a dependency manager for PHP libraries.
In addition, it can be used to manage the installation of MediaWiki extensions (available since MediaWiki 1.22).
Starting with MediaWiki 1.25, MediaWiki core's external library dependencies are being managed with Composer.

MediaWiki 1.25+ depends on some external libraries which are managed with Composer.
Composer creates an autoloader at vendor/autoload.php, which is included by WebStart.php.

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 $IP/composer.json can either be installed locally by running composer update --no-dev or the mediawiki/vendor.git repository can be cloned to provide the same libraries used on the Wikimedia production cluster.[1]

MediaWiki core "owns" $IP/composer.json 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.[2]
This plugin and the MediaWiki core composer.json configuration allow a local deployment to add required extensions and libraries to a file composer.local.json inside the root MediaWiki directory.

composer.local.json 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 composer.json files that may be included in any and all of your locally installed extensions, add something like this to $IP/composer.local.json: