Merge "Type hint against LinkTarget in WatchedItemStore"
[lhc/web/wiklou.git] / includes / DevelopmentSettings.php
1 <?php
2 /**
3 * Extra settings useful for MediaWiki development.
4 *
5 * To enable built-in debug and development settings, add the
6 * following to your LocalSettings.php file.
7 *
8 * require "$IP/includes/DevelopmentSettings.php";
9 *
10 * Alternatively, if running phpunit.php (or another Maintenance script),
11 * you can use the --mwdebug option to automatically load these settings.
12 *
13 * @file
14 */
15
16 /**
17 * Debugging for PHP
18 */
19
20 // Enable showing of errors
21 error_reporting( -1 );
22 ini_set( 'display_errors', 1 );
23
24 /**
25 * Debugging for MediaWiki
26 */
27 global $wgDevelopmentWarnings, $wgShowExceptionDetails, $wgShowHostnames,
28 $wgDebugRawPage, $wgSQLMode, $wgCommandLineMode, $wgDebugLogFile,
29 $wgDBerrorLog, $wgDebugLogGroups;
30
31 // Use of wfWarn() should cause tests to fail
32 $wgDevelopmentWarnings = true;
33
34 // Enable showing of errors
35 $wgShowExceptionDetails = true;
36 $wgShowHostnames = true;
37 $wgDebugRawPage = true; // T49960
38
39 // Enable MariaDB/MySQL strict mode
40 $wgSQLMode = 'TRADITIONAL';
41
42 // Enable log files
43 $logDir = getenv( 'MW_LOG_DIR' );
44 if ( $logDir ) {
45 if ( $wgCommandLineMode ) {
46 $wgDebugLogFile = "$logDir/mw-debug-cli.log";
47 } else {
48 $wgDebugLogFile = "$logDir/mw-debug-www.log";
49 }
50 $wgDBerrorLog = "$logDir/mw-dberror.log";
51 $wgDebugLogGroups['ratelimit'] = "$logDir/mw-ratelimit.log";
52 $wgDebugLogGroups['exception'] = "$logDir/mw-exception.log";
53 $wgDebugLogGroups['error'] = "$logDir/mw-error.log";
54 }
55 unset( $logDir );
56
57 // Disable rate-limiting to allow integration tests to run unthrottled
58 // in CI and for devs locally (T225796)
59 $wgRateLimits = [];
60
61 // Disable legacy javascript globals in CI and for devs (T72470)
62 $wgLegacyJavaScriptGlobals = false;