Core Platform Team/Initiatives/Librarization

Jump to navigation Jump to search

Initiative Description

< Initiatives


Move components that do not depend on MediaWiki’s application logic out of the MediaWiki repository, and release them as separate libraries for use via composer.

Significance and Motivation

Keeps developers from introducing cross-dependencies by forcing the library code to function without MediaWiki.

Explicitly defining dependencies between components by expressing them in composer.json.

This also makes us Enable re-use outside of MediaWiki core, by unrelated projects but also by client code that wants to interact with MediaWiki.


Remove all files from libs directory

Baseline Metrics

None given

Target Metrics

None given



Known Dependencies/Blockers

There are already a number of components isolated that could be turned into proper libraries immediately. More such independent components are however expected to result from the Decoupling effort.

Epics, User Stories, and Requirements

< Initiatives Move test helpers into their own library(ies) (other libs depend on them)

  • MediaWikiCoversValidator
  • TestingAccessWrapper
  • PHPUnit4And6Compat

Select first non-test code in libs directory to extract (something easy/high impact) Remove any remaining dependencies from code (if needed)

  • <repeat steps for each lib>


A number of libraries have been isolated into the includes/libs directory, but so far have not been moved to separate repositories. More such libraries are expected to result from the Decoupling project.