Architecture:MediaWiki/maintenance layer
This page is under construction Please help review and edit this page. |
The maintenance layer contains functionality for maintaining a MediaWiki installation, to be triggered from the command line. This includes background processes, housekeeping jobs, trouble shooting, error investigations, etc.
Status: As per August 2020, the maintenance layer is well defined and long established. However, at this time, each maintenance script acts as its own separate entry point, which means that the maintenance logic resides in the entry point file, while the shared bootstrapping code is pulled in as a utility. This is conceptually backwards, and is bound to change in the future (see T99268). As of version 1.40, invoking maintenance scripts directly from the command line is deprecated in favor of using maintenance/run.php, which fixes the previously mentioned issue.
Dependencies and Constraints: Code in the maintenance layer can make use of anything except for installer related code.
Typical patterns: The pattern used by most code in the maintenance layer is the maintenance script pattern. However, this may be refactored to make use of the command pattern instead, when a command line "runner" has been created (per T99268).
Example: The most important maintenance script is update.php.