Requests for comment/MediaWiki libraries

This is a request for comments regarding MediaWiki libraries.

Request for comment (RFC)
MediaWiki libraries
Component General
Creation date
Author(s) Ryan Lane
Document status implemented
This seems to be the phab:/tag/Librarization project now that Composer managed libraries for use on WMF cluster is implemented.

Background

edit

A number of developers are hosting libraries as MediaWiki extensions, which creates an additional layer of dependencies for extensions and puts an additional burden on MediaWiki administrators.

Compare the case where libraries are developed (mainly) for an extension by its authors and are shipped with it, but hosted on different repos as the jQuery modules of milkshake hosted at GitHub.

Proposal

edit

Add a libs directory for MediaWiki which would hold all PHP libraries. Additionally, libraries would be stably versioned with releases of MediaWiki, so that extension authors could target specific library versions along with specific MediaWiki versions for compatibility. Libraries in the libs directory would be submodules, like extensions or skins.

Scope

edit

Some examples of extension libraries:

  • Elastica
  • LdapAuthentication
  • All of the Wikibase extensions

See also

edit