From b1c73fc670461c2e8ac5e64edb1e450e8873b189 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Mon, 15 Jul 2013 17:33:49 +0200 Subject: [PATCH] Move inclusion of the Composer autoloader to after inclusion of DefaultSettings If it is before, settings set by extensions will end up being overriden. Change-Id: Ibe80d621cfaa7258cfd759094a1e9f0008a469b1 --- includes/WebStart.php | 10 +++++----- maintenance/doMaintenance.php | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/includes/WebStart.php b/includes/WebStart.php index 901b1e8e36..604a3c04ce 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -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 ); diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index 866ec5af67..4658d36666 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -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 ); -- 2.20.1