Library infrastructure for MediaWiki
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date.
Our long-term goal is to make MediaWiki an application that is composed of many small purpose-built libraries (internally and/or externally developed) with interfaces that allow individual libraries to be exchanged for others. This flexibility allows easier tuning of major features for various use cases, and easier development of new large features by composition. For example, a (far) future project might replace the current revision storage with a system that has better performance characteristics for the Wikipedia wiki farm, simply by configuring an alternate implementation of the revision storage library rather than including two implementations and branching logic in the MediaWiki codebase.
- Make life better for new (and experienced) developers by organizing the code into simple components that can be easily understood.
- Reverse inertia toward ever expanding monolithic core by encouraging developers (in core) to develop their work as reusable modules with clearly-defined interfaces
- Start making true unit testing of core viable by having individually-testable units
- Provide an interim step on the way to service-oriented architecture in a way that is useful independently of that goal
- Encourage reuse and integration with larger software ecosystem. Done correctly, this will provide a useful means of expanding our development capacity through recruitment of library authors eager to showcase their work on a top 10 website.
- Share our awesome libraries with others and encourage contributions from them even if they aren't particularly interested in making our sites better.
Out of scopeEdit
Complete breakup of MediaWiki core into components.
The end goal is not to eliminate MediaWiki but instead to make MediaWiki the platform for creating massive multi-user versioned data-based projects, and make it a platform that is flexible enough to extend in novel ways. (For internal refactoring of classes and namespaces in the MediaWiki codebase to break dependency cycles, see phab:tag/mediawiki-decoupling instead.)
- Complete implementation and deployment of Structured logging RFC
- Status: Done Introduce Composer library management to MediaWiki's core git repository
- Status: Done Introduce mediawiki/vendor git repository to manage libraries for WMF cluster deployments
- Status: Done Introduce PSR-3 logging interface to MediaWiki
- Status: Done Introduce optional external library (Monolog) to implement PSR-3 interface
- Complete work for Composer managed libraries for use on WMF cluster RFC
- Document use of Composer for library management
- Procedures officially approved by architecture, security and operations groups
- Status: In progress Implement monitoring tools to track security vulnerabilities in external libraries
- Extract one component from MediaWiki, publish as a stand alone library and re-import to MediaWiki via Composer
- Status: Done Establish guidelines for git hosting, issue tracking and community management for independent libraries
- Status: Done cssjanus
- Status: Done cdb
- Status: Done Create list of future candidates for library extraction projects
- task T807
- Phabricator librarization project and its workboard
- Manual:External libraries
- Manual:Developing libraries