From: Timo Tijhof Date: Fri, 10 Nov 2017 00:35:19 +0000 (-0800) Subject: Setup: Include StartProfiler before others X-Git-Tag: 1.31.0-rc.0~1556^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=25d3185dde7631a24ec5833f045658aa6aa2ad4c;p=lhc%2Fweb%2Fwiklou.git Setup: Include StartProfiler before others Bug: T180183 Change-Id: Ibcf78d094cf4dcf09bc919a5f8168f45ae225ebc --- diff --git a/includes/Setup.php b/includes/Setup.php index 5d8520bfa5..4c281b13ce 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -37,18 +37,18 @@ if ( !defined( 'MEDIAWIKI' ) ) { * Pre-config setup: Before loading LocalSettings.php */ +// Get profiler configuraton +$wgProfiler = []; +if ( file_exists( "$IP/StartProfiler.php" ) ) { + require "$IP/StartProfiler.php"; +} + // Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; // Load up some global defines require_once "$IP/includes/Defines.php"; -// Start the profiler -$wgProfiler = []; -if ( file_exists( "$IP/StartProfiler.php" ) ) { - require "$IP/StartProfiler.php"; -} - // Load default settings require_once "$IP/includes/DefaultSettings.php"; diff --git a/tests/phpunit/autoload.ide.php b/tests/phpunit/autoload.ide.php index f883cf6e20..6f09d4c9b7 100644 --- a/tests/phpunit/autoload.ide.php +++ b/tests/phpunit/autoload.ide.php @@ -38,14 +38,13 @@ $maintenance->setup(); // to $maintenance->mSelf. Keep that here for b/c $self = $maintenance->getName(); global $IP; -# Start the autoloader, so that extensions can derive classes from core files -require_once "$IP/includes/AutoLoader.php"; - -# Start the profiler +# Get profiler configuraton $wgProfiler = []; if ( file_exists( "$IP/StartProfiler.php" ) ) { require "$IP/StartProfiler.php"; } +# Start the autoloader, so that extensions can derive classes from core files +require_once "$IP/includes/AutoLoader.php"; $requireOnceGlobalsScope = function ( $file ) use ( $self ) { foreach ( array_keys( $GLOBALS ) as $varName ) {