Required for proper initialization of MWStake components

1.0.0 2022-01-10 15:05 UTC

This package is auto-updated.

Last update: 2022-06-07 16:52:02 UTC


ComponentLoader for MediaWiki

If a MWStake component needs to access variables from <mediawiki>/includes/DefaultSettings.php (e.g. for registering a new "MediaWiki service") this can no longer be done in the regular static file autoloader, provided by Composer (See

Therefore such components need to require the "componentloader" and extensions using the component must explicitly invoke the "componentloader" at manifest.callback time!

This can easily be done, either directly within the manifest file (e.g. extension.json):

    "callback": "mwsInitComponents"

or, in custom code by direct invocation. E.g.

    "callback": "MediaWiki\\Extension\\MyExt\\Setup::callback"

namespace MediaWiki\Extension\MyExt;

class Setup {

	public static function callback() {
		// Own code