Setup: Include StartProfiler before others
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 10 Nov 2017 00:35:19 +0000 (16:35 -0800)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 10 Nov 2017 00:35:19 +0000 (16:35 -0800)
Bug: T180183
Change-Id: Ibcf78d094cf4dcf09bc919a5f8168f45ae225ebc

includes/Setup.php
tests/phpunit/autoload.ide.php

index 5d8520b..4c281b1 100644 (file)
@@ -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";
 
index f883cf6..6f09d4c 100644 (file)
@@ -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 ) {