Move inclusion of the Composer autoloader to after inclusion of DefaultSettings
authorjeroendedauw <jeroendedauw@gmail.com>
Mon, 15 Jul 2013 15:33:49 +0000 (17:33 +0200)
committerjeroendedauw <jeroendedauw@gmail.com>
Mon, 15 Jul 2013 15:33:50 +0000 (17:33 +0200)
If it is before, settings set by extensions will end up being overriden.

Change-Id: Ibe80d621cfaa7258cfd759094a1e9f0008a469b1

includes/WebStart.php
maintenance/doMaintenance.php

index 901b1e8..604a3c0 100644 (file)
@@ -91,11 +91,6 @@ if ( $IP === false ) {
        }
 }
 
-# Load composer's autoloader if present
-if ( is_readable( "$IP/vendor/autoload.php" ) ) {
-       require_once "$IP/vendor/autoload.php";
-}
-
 # Get MWInit class
 require_once "$IP/includes/Init.php";
 
@@ -119,6 +114,11 @@ wfProfileIn( 'WebStart.php-conf' );
 # Load default settings
 require_once "$IP/includes/DefaultSettings.php";
 
+# Load composer's autoloader if present
+if ( is_readable( "$IP/vendor/autoload.php" ) ) {
+       require_once "$IP/vendor/autoload.php";
+}
+
 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
        # Use a callback function to configure MediaWiki
        MWFunction::call( MW_CONFIG_CALLBACK );
index 866ec5a..4658d36 100644 (file)
@@ -53,10 +53,6 @@ $maintenance->setup();
 // to $maintenance->mSelf. Keep that here for b/c
 $self = $maintenance->getName();
 
-# Load composer's autoloader if present
-if ( is_readable( "$IP/vendor/autoload.php" ) ) {
-       require_once "$IP/vendor/autoload.php";
-}
 # Get the MWInit class
 require_once "$IP/includes/Init.php";
 # Start the autoloader, so that extensions can derive classes from core files
@@ -74,6 +70,11 @@ if ( file_exists( "$IP/StartProfiler.php" ) ) {
 require_once "$IP/includes/Defines.php";
 require_once MWInit::compiledPath( 'includes/DefaultSettings.php' );
 
+# Load composer's autoloader if present
+if ( is_readable( "$IP/vendor/autoload.php" ) ) {
+       require_once "$IP/vendor/autoload.php";
+}
+
 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
        # Use a callback function to configure MediaWiki
        MWFunction::call( MW_CONFIG_CALLBACK );