Manual:External libraries/fr

This page documents how to add new external libraries to MediaWiki core. We use composer to manage dependencies.

It should be available on packagist, and have a tagged release that you wish to use. Security reviews are required for any externally written code (not by a MediaWiki developer). Please add the MediaWiki-Vendor project to the task. (This step can be done earlier, but can't be merged until the security review is complete.)
 * 1) Find your external library.
 * 1) File a bug in Phabricator requesting a security review of the library.
 * 1) Once the security review is approved, submit a patch to the mediawiki/vendor repository, adding the library.
 * Your patch should use fixed version numbers (e.g. 1.0.0) so we always use a specific version of the library instead of depending upon the upstream maintainer to properly follow the semantic versioning rules as many don't.
 * 1) Upload your mediawiki/core patchset which uses the library and include a link to your mediawiki/vendor commit in the comments.
 * Dans votre correction, vous devrez éventuellement mettre à jour également le fichier noyau composer.json. (en utilisant un numéro de version fixe)
 * 1) Suivez le processus de relecture de code habituel. Once your code is ready for merging, the mediawiki/vendor patch should be merged, and then the mediawiki/core patch, so unit tests will be able to use the library.

For Wikimedia-deployed extensions, the process is similar. You will need to create a composer.json file for your extension listing your dependencies. In your extension.json file, set  (documentation) so those dependencies are loaded.

The extension distributor automatically packages composer dependencies, so tarball users won't have to do it manually. You'll then need to add the library to the mediawiki/vendor repository after the security review is complete.