MediaWiki REL1_37
DevelopmentSettings.php
Go to the documentation of this file.
1<?php
20// Enable showing of errors
21error_reporting( -1 );
22ini_set( 'display_errors', 1 );
23
31
32// Use of wfWarn() should cause tests to fail
34
35// Enable showing of errors
37$wgShowHostnames = true;
38$wgDebugRawPage = true; // T49960
39
40// Enable log files
41$logDir = getenv( 'MW_LOG_DIR' );
42if ( $logDir ) {
43 if ( $wgCommandLineMode ) {
44 $wgDebugLogFile = "$logDir/mw-debug-cli.log";
45 } else {
46 $wgDebugLogFile = "$logDir/mw-debug-www.log";
47 }
48 $wgDBerrorLog = "$logDir/mw-dberror.log";
49 $wgDebugLogGroups['ratelimit'] = "$logDir/mw-ratelimit.log";
50 $wgDebugLogGroups['error'] = "$logDir/mw-error.log";
51 $wgDebugLogGroups['exception'] = "$logDir/mw-error.log";
52}
53unset( $logDir );
54
60
61// Set almost infinite rate limits. This allows integration tests to run unthrottled
62// in CI and for devs locally (T225796), but doesn't turn a large chunk of production
63// code completely off during testing (T284804)
64foreach ( $wgRateLimits as $right => &$limit ) {
65 foreach ( $limit as $group => &$groupLimit ) {
66 $groupLimit[0] = PHP_INT_MAX;
67 }
68}
69
70// Enable Special:JavaScriptTest and allow `npm run qunit` to work
71// https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing
73
74// Enable development/experimental endpoints
75$wgRestAPIAdditionalRouteFiles = [ 'includes/Rest/coreDevelopmentRoutes.json' ];
76
84
85// Enable MariaDB/MySQL strict mode (T108255)
86$wgSQLMode = 'TRADITIONAL';
87
88// Localisation Cache to StaticArray (T218207)
89$wgLocalisationCacheConf['store'] = 'array';
90
91// Experimental Book Referencing feature (T236255)
93
94// The default value is false, but for development it is useful to set this to the system temp
95// directory by default (T218207)
96$wgCacheDirectory = TempFSFile::getUsableTempDirectory() .
97 DIRECTORY_SEPARATOR .
98 rawurlencode( WikiMap::getCurrentWikiId() );
99
100// Enable uploads for FileImporter browser tests (T190829)
101$wgEnableUploads = true;
102
103// Enable the new wikitext mode for browser testing (T270240)
105// Currently the default, but repeated here for safety since it would break many source editor tests.
106$wgDefaultUserOptions['visualeditor-newwikitext'] = 0;
$wgDefaultUserOptions['visualeditor-newwikitext']
global $wgCacheDirectory
global $wgSQLMode
Experimental changes that may later become the default.
global $wgDebugLogGroups
global $wgShowHostnames
global $wgEnableJavaScriptTest
global $wgDebugLogFile
global $wgCommandLineMode
global $wgRestAPIAdditionalRouteFiles
global $wgDBerrorLog
global $wgCiteBookReferencing
global $wgLocalisationCacheConf
global $wgShowExceptionDetails
global $wgEnableUploads
global $wgDebugRawPage
$wgVisualEditorEnableWikitext
global $wgDevelopmentWarnings
Debugging for MediaWiki.
global $wgRateLimits
Make testing possible (or easier)