How does Composer know what MediaWiki extensions to load?

147 views Asked by At

We've switched from using Semantic Bundle to install extensions by using Composer. Now we can skip, for some extensions, manually including entry points at the LocalSettings.php file (http://www.bn2vs.com/blog/2013/11/24/introduction-to-composer-for-mediawiki-developers). But how does MediaWiki know which extensions to load. Does it read composer.json?

1

There are 1 answers

0
Dror S. On BEST ANSWER

The answer, as stated in www.mediawiki.org/wiki/Composer:

Composer creates an autoloader at vendor/autoload.php, which is included by WebStart.php

I verified this - WebStart.php simply does this:

# Load composer's autoloader if present
if ( is_readable( "$IP/vendor/autoload.php" ) ) {
    require_once "$IP/vendor/autoload.php";
}