Requests for comment/MediaWiki libraries

This is a request for comments regarding MediaWiki libraries.

Background
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.

Proposal
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
Some examples of extension libraries:


 * Elastica
 * LdapAuthentication
 * All of the Wikibase extensions