Follows-up fdb7d36903. It seems these make unit tests on Travis CI
fail, per T187581. And when we briefly enabled DevelopmentSettings.php
in our Jenkins setup, the PHPUnit tests also failed.
Remove these from DevelopmentSettings.php to confirm that the
tests pass that way. Then, once our own Jenkins setup has switched
back to using DevelopmentSettings.php, we can re-consider adding
these in a way that is verified by Gerrit/Jenkins before merging.
Bug: T187581
Change-Id: Ib81c5909849598bdad02955f6414d68c038742c5
54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Extra settings useful for MediaWiki development.
|
|
*
|
|
* To enable built-in debug and development settings, add the
|
|
* following to your LocalSettings.php file.
|
|
*
|
|
* require "$IP/includes/DevelopmentSettings.php";
|
|
*
|
|
* Alternatively, if running phpunit.php (or another Maintenance script),
|
|
* you can use the --mwdebug option to automatically load these settings.
|
|
*
|
|
* @file
|
|
*/
|
|
|
|
/**
|
|
* Debugging: PHP
|
|
*/
|
|
|
|
// Enable showing of errors
|
|
error_reporting( -1 );
|
|
ini_set( 'display_errors', 1 );
|
|
|
|
/**
|
|
* Debugging: MediaWiki
|
|
*/
|
|
global $wgDevelopmentWarnings, $wgShowDBErrorBacktrace, $wgShowExceptionDetails,
|
|
$wgShowSQLErrors, $wgDebugRawPage,
|
|
$wgDebugComments, $wgDebugDumpSql, $wgDebugTimestamps,
|
|
$wgCommandLineMode, $wgDebugLogFile, $wgDBerrorLog, $wgDebugLogGroups;
|
|
|
|
// Use of wfWarn() should cause tests to fail
|
|
$wgDevelopmentWarnings = true;
|
|
|
|
// Enable showing of errors
|
|
$wgShowDBErrorBacktrace = true;
|
|
$wgShowExceptionDetails = true;
|
|
$wgShowSQLErrors = true;
|
|
$wgDebugRawPage = true; // T49960
|
|
|
|
// Enable log files
|
|
$logDir = getenv( 'MW_LOG_DIR' );
|
|
if ( $logDir ) {
|
|
if ( $wgCommandLineMode ) {
|
|
$wgDebugLogFile = "$logDir/mw-debug-cli.log";
|
|
} else {
|
|
$wgDebugLogFile = "$logDir/mw-debug-www.log";
|
|
}
|
|
$wgDBerrorLog = "$logDir/mw-dberror.log";
|
|
$wgDebugLogGroups['ratelimit'] = "$logDir/mw-ratelimit.log";
|
|
$wgDebugLogGroups['exception'] = "$logDir/mw-exception.log";
|
|
$wgDebugLogGroups['error'] = "$logDir/mw-error.log";
|
|
}
|
|
unset( $logDir );
|