// disable (problematic) object cache types explicitly, preserving all other (working) ones
// bug T113843
- $emptyCache = [ 'class' => 'EmptyBagOStuff' ];
+ $emptyCache = [ 'class' => EmptyBagOStuff::class ];
$objectCaches = [
CACHE_NONE => $emptyCache,
$this->parserTitle = Title::newFromText( 'Installer' );
$this->parserOptions = new ParserOptions( $wgUser ); // language will be wrong :(
$this->parserOptions->setEditSection( false );
- $this->parserOptions->setWrapOutputClass( false );
// Don't try to access DB before user language is initialised
$this->setParserLanguage( Language::factory( 'en' ) );
}
global $wgAutoloadClasses;
$wgAutoloadClasses = [];
- // @codingStandardsIgnoreStart
// LocalSettings.php should not call functions, except wfLoadSkin/wfLoadExtensions
// Define the required globals here, to ensure, the functions can do it work correctly.
+ // phpcs:ignore MediaWiki.VariableAnalysis.UnusedGlobalVariables
global $wgExtensionDirectory, $wgStyleDirectory;
- // @codingStandardsIgnoreEnd
MediaWiki\suppressWarnings();
$_lsExists = file_exists( "$IP/LocalSettings.php" );
$out = $wgParser->parse( $text, $this->parserTitle, $this->parserOptions, $lineStart );
$html = $out->getText( [
'enableSectionEditLinks' => false,
+ 'unwrap' => true,
] );
} catch ( MediaWiki\Services\ServiceDisabledException $e ) {
$html = '<!--DB access attempted during parse--> ' . htmlspecialchars( $text );
// implementation that won't stomp on PHP's cookies.
$GLOBALS['wgSessionProviders'] = [
[
- 'class' => 'InstallerSessionProvider',
+ 'class' => InstallerSessionProvider::class,
'args' => [ [
'priority' => 1,
] ]