Composer managed libraries required or recommended for use with MediaWiki. This repository is maintained for use on the Wikimedia Foundation production and testing clusters, but may be useful for anyone wishing to avoid directly managing MediaWiki dependencies with Composer.
Checkout this library into $IP/vendor using git clone <URL>
or add the repository as a git submodule using git submodule add <URL> vendor
followed by git submodule update --init
.
composer --version
. Everyone using the same version means that diffs from the autoloader are minimal and so easier to validate and manually rebase. This is most easily done with Docker. For example, to run composer update --no-dev
do:docker run --rm -it -u "$(id -u):$(id -g)" -v "$PWD/.git:/src/.git:ro" -v "$PWD:/src" -w /src docker-registry.wikimedia.org/releng/composer-php74:0.3.3-s4 update --no-dev
composer require <package> <version> --no-update
to do so as composer will then automatically sort the composer.json file.composer update --no-dev
to download files and update the autoloader.export-ignore
ing unwanted files in library's .gitattributes
file), you can skip checking them in by listing them in .gitignore
file.Note that you MUST pair patches changing versions of libraries used by MediaWiki itself with ones for the "core" repo. Specifically, the patch in mediawiki/core must have a Depends-On
footer to the patch in mediawiki/vendor.
The vendor repo has special configuration, which skips the integrity checks and so allowing a circular dependency Gordian knot to be fixed. However, this means that, if merged alone without a pair, you'll cause ALL patches in MediaWiki and ALL extensions to fail their continuous integration tests.
If in doubt, seek advice from regular commiters to this repository.