Page MenuHomePhabricator

Deprecate, replace(?) and eventually remove current methods of overriding MW Installer Components
Open, Needs TriagePublic

Description

To quote @tstarling on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/988040

mw-config/overrides/README recommends making little subclasses of WebInstaller in private config code. A real nightmare for maintainability.

This has been the case since rMWd1effacdb1b8: Change the way installer overrides work for T135695: Patch mw-config/overrides.php instead of LocalSettingsGenerator.php

Event Timeline

The Debian package just has

$overrides['WebInstaller'] = DebianWebInstaller::class;

class DebianWebInstaller extends WebInstaller {
	public function getLocalSettingsLocation() {
		return '/etc/mediawiki/LocalSettings.php';
	}
}

The BlueSpice overrides are copying core code in bulk and modifying a lot of different things. There's a lot of spot-the-difference.

  • There are initial content overrides in BsCliInstaller, which is similar to something I want for Wikimedia in T352113.
  • BsLocalSettingsGenerator appends some static text and turns off $wgPingback. There is a wgPingback checkbox on the Name page which they presumably would like to disable.
  • BsWebInstallerDBConnect is apparently just overriding a help message (bs-installer-config-support-info).
  • BsWebInstallerDBSettings looks identical to the core class
  • BsWebInstallerOptions just adds a class to every fieldset for use in CSS. The custom CSS hides a bunch of settings.
  • BsWebInstallerOutput
    • overrides the title message
    • adds CSS and JS to the <head>
    • adds a custom footer

I think what we need is installer extensions. I suppose it would be a third type of extension manifest, after regular extensions and skins. In mw-config/overrides, just have a config file listing extension manifest locations. Give the installer a HookContainer populated with handlers loaded from the installer extension. Have some suitably narrow hook interfaces aimed at the exact things BlueSpice wants to do.

Thanks for looking at this.

As you might know, BlueSpice is a MediaWiki distribution. We decided to include a custom installer many years ago, because we required the installer to automatically install the bundled extensions and create a slightly modified version of LocalSettings.php. We also wanted to adjust the look (logo, colors) a little bit.

Back then it was very difficult to properly extend and modify (e.g. skipping entire steps, like the "select extensions" page) the installer. We had to do some copy-and-paste to make things work. Since then, the code has not much evolved. When we switched to new MediaWiki versions, we tested if it still worked and did just the modifications that were required to make it work.

To the current day we were not able to make Extension:SemanticMediaWiki be installed automatically. But that has nothing to do with the installer but more with the way SMW works.

In general I can tell, that we use die CLI installer much more than the Web installer nowadays.

Please tell me, if the BlueSpice team can be of any help with the changes you are planning.