3 * Extra settings useful for MediaWiki development.
5 * To enable built-in debug and development settings, add the
6 * following to your LocalSettings.php file.
8 * require "$IP/includes/DevelopmentSettings.php";
10 * Alternatively, if running phpunit.php (or another Maintenance script),
11 * you can use the --mwdebug option to automatically load these settings.
20 // Enable showing of errors
21 error_reporting( -1 );
22 ini_set( 'display_errors', 1 );
25 * Debugging for MediaWiki
28 global $wgDevelopmentWarnings, $wgShowExceptionDetails, $wgShowHostnames,
29 $wgDebugRawPage, $wgCommandLineMode, $wgDebugLogFile,
30 $wgDBerrorLog, $wgDebugLogGroups, $wgLocalisationCacheConf;
32 // Use of wfWarn() should cause tests to fail
33 $wgDevelopmentWarnings = true;
35 // Enable showing of errors
36 $wgShowExceptionDetails = true;
37 $wgShowHostnames = true;
38 $wgDebugRawPage = true; // T49960
41 $logDir = getenv( 'MW_LOG_DIR' );
43 if ( $wgCommandLineMode ) {
44 $wgDebugLogFile = "$logDir/mw-debug-cli.log";
46 $wgDebugLogFile = "$logDir/mw-debug-www.log";
48 $wgDBerrorLog = "$logDir/mw-dberror.log";
49 $wgDebugLogGroups['ratelimit'] = "$logDir/mw-ratelimit.log";
50 $wgDebugLogGroups['exception'] = "$logDir/mw-exception.log";
51 $wgDebugLogGroups['error'] = "$logDir/mw-error.log";
56 * Make testing possible (or easier)
61 // Disable rate-limiting to allow integration tests to run unthrottled
62 // in CI and for devs locally (T225796)
66 * Experimental changes that may later become the default.
67 * (Must reference a Phabricator ticket)
70 global $wgSQLMode, $wgLegacyJavaScriptGlobals;
72 // Enable MariaDB/MySQL strict mode (T108255)
73 $wgSQLMode = 'TRADITIONAL';
75 // Disable legacy javascript globals in CI and for devs (T72470)
76 $wgLegacyJavaScriptGlobals = false;
78 // Localisation Cache to StaticArray (T218207)
79 $wgLocalisationCacheConf['store'] = 'array';