MediaWiki master
Setup.php
Go to the documentation of this file.
1<?php
53// phpcs:disable MediaWiki.Usage.DeprecatedGlobalVariables
82use Psr\Log\LoggerInterface;
83use Wikimedia\RequestTimeout\RequestTimeout;
86
94// This file must be included from a valid entry point (e.g. WebStart.php, Maintenance.php)
95if ( !defined( 'MEDIAWIKI' ) ) {
96 exit( 1 );
97}
98
99// PHP must not be configured to overload mbstring functions. (T5782, T122807)
100// This was deprecated by upstream in PHP 7.2 and was removed in PHP 8.0.
101if ( ini_get( 'mbstring.func_overload' ) ) {
102 die( 'MediaWiki does not support installations where mbstring.func_overload is non-zero.' );
103}
104
105// The MW_ENTRY_POINT constant must always exists, to make it safe to access.
106// For compat, we do support older and custom MW entrypoints that don't set this,
107// in which case we assign a default here.
108if ( !defined( 'MW_ENTRY_POINT' ) ) {
114 define( 'MW_ENTRY_POINT', 'unknown' );
115}
116
117// The $IP variable is defined for use by LocalSettings.php.
118// It is made available as a global variable for backwards compatibility.
119//
120// Source code should use the MW_INSTALL_PATH constant instead.
121global $IP;
122$IP = wfDetectInstallPath(); // ensures MW_INSTALL_PATH is defined
123
129require_once MW_INSTALL_PATH . '/includes/AutoLoader.php';
130require_once MW_INSTALL_PATH . '/includes/Defines.php';
131
132// Assert that composer dependencies were successfully loaded
133if ( !interface_exists( LoggerInterface::class ) ) {
134 $message = (
135 'MediaWiki requires the <a href="https://github.com/php-fig/log">PSR-3 logging ' .
136 "library</a> to be present. This library is not embedded directly in MediaWiki's " .
137 "git repository and must be installed separately by the end user.\n\n" .
138 'Please see the <a href="https://www.mediawiki.org/wiki/Download_from_Git' .
139 '#Fetch_external_libraries">instructions for installing libraries</a> on mediawiki.org ' .
140 'for help on installing the required components.'
141 );
142 echo $message;
143 trigger_error( $message, E_USER_ERROR );
144}
145
146// Deprecated global variable for backwards-compatibility.
147// New code should check MW_ENTRY_POINT directly.
149
156
158
159$wgSettings = SettingsBuilder::getInstance();
160
161if ( defined( 'MW_USE_CONFIG_SCHEMA_CLASS' ) ) {
162 // Load config schema from MainConfigSchema. Useful for running scripts that
163 // generate other representations of the config schema. This is slow, so it
164 // should not be used for serving web traffic.
165 $wgSettings->load( new ReflectionSchemaSource( MainConfigSchema::class ) );
166} else {
167 $wgSettings->load( new PhpSettingsSource( MW_INSTALL_PATH . '/includes/config-schema.php' ) );
168}
169
170require_once MW_INSTALL_PATH . '/includes/GlobalFunctions.php';
171
172// Install callback for normalizing headers.
173HeaderCallback::register();
174
175// Tell HttpStatus to use HeaderCallback for reporting warnings when
176// attempting to set headers after the headers have already been sent.
178 [ HeaderCallback::class, 'warnIfHeadersSent' ]
179);
180
181// Set the encoding used by PHP for reading HTTP input, and writing output.
182// This is also the default for mbstring functions.
183mb_internal_encoding( 'UTF-8' );
184
189// Initialize some config settings with dynamic defaults, and
190// make default settings available in globals for use in LocalSettings.php.
191$wgSettings->putConfigValues( [
192 MainConfigNames::ExtensionDirectory => MW_INSTALL_PATH . '/extensions',
193 MainConfigNames::StyleDirectory => MW_INSTALL_PATH . '/skins',
194 MainConfigNames::UploadDirectory => MW_INSTALL_PATH . '/images',
195 MainConfigNames::ServiceWiringFiles => [ MW_INSTALL_PATH . '/includes/ServiceWiring.php' ],
196 'Version' => MW_VERSION,
197] );
198$wgSettings->apply();
199
200// $wgSettings->apply() puts all configuration into global variables.
201// If we are not in global scope, make all relevant globals available
202// in this file's scope as well.
203$wgScopeTest = 'MediaWiki Setup.php scope test';
204if ( !isset( $GLOBALS['wgScopeTest'] ) || $GLOBALS['wgScopeTest'] !== $wgScopeTest ) {
205 foreach ( $wgSettings->getConfigSchema()->getDefinedKeys() as $key ) {
206 $var = "wg$key";
207 // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix
208 global $$var;
209 }
210 unset( $key, $var );
211}
212unset( $wgScopeTest );
213
214try {
215 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
216 call_user_func( MW_CONFIG_CALLBACK, $wgSettings );
217 } else {
218 wfDetectLocalSettingsFile( MW_INSTALL_PATH );
219
220 if ( getenv( 'MW_USE_LOCAL_SETTINGS_LOADER' ) ) {
221 // NOTE: This will not work for configuration variables that use a prefix
222 // other than "wg".
223 $localSettingsLoader = new LocalSettingsLoader( $wgSettings, MW_INSTALL_PATH );
224 $localSettingsLoader->loadLocalSettingsFile( MW_CONFIG_FILE );
225 unset( $localSettingsLoader );
226 } else {
227 if ( str_ends_with( MW_CONFIG_FILE, '.php' ) ) {
228 // make defaults available as globals
229 $wgSettings->apply();
230 require_once MW_CONFIG_FILE;
231 } else {
232 $wgSettings->loadFile( MW_CONFIG_FILE );
233 }
234 }
235 }
236
237 // Make settings loaded by LocalSettings.php available in globals for use here
238 $wgSettings->apply();
239} catch ( MissingExtensionException $e ) {
240 // Make a common mistake give a friendly error
241 $e->render();
242}
243
244// If in a wiki-farm, load site-specific settings
245if ( $wgSettings->getConfig()->get( MainConfigNames::WikiFarmSettingsDirectory ) ) {
246 $wikiFarmSettingsLoader = new WikiFarmSettingsLoader( $wgSettings );
247 $wikiFarmSettingsLoader->loadWikiFarmSettings();
248 unset( $wikiFarmSettingsLoader );
249}
250
251// All settings should be loaded now.
252$wgSettings->enterRegistrationStage();
253
261if ( defined( 'MW_SETUP_CALLBACK' ) ) {
262 call_user_func( MW_SETUP_CALLBACK, $wgSettings );
263 // Make any additional settings available in globals for use here
264 $wgSettings->apply();
265}
266
267// Apply dynamic defaults declared in config schema callbacks.
269$dynamicDefaults->applyDynamicDefaults( $wgSettings->getConfigBuilder() );
270
271// Make updated config available in global scope.
272$wgSettings->apply();
273
274// Apply dynamic defaults implemented in SetupDynamicConfig.php.
275// Ideally, all logic in SetupDynamicConfig would be converted to
276// callbacks in the config schema.
277require __DIR__ . '/SetupDynamicConfig.php';
278
279if ( defined( 'MW_AUTOLOAD_TEST_CLASSES' ) ) {
280 require_once __DIR__ . '/../tests/common/TestsAutoLoader.php';
281}
282
283// Start time limit
284if ( $wgRequestTimeLimit && MW_ENTRY_POINT !== 'cli' ) {
285 RequestTimeout::singleton()->setWallTimeLimit( $wgRequestTimeLimit );
286}
287
291if ( defined( 'MW_AUTOLOAD_TEST_CLASSES' ) ) {
292 ExtensionRegistry::getInstance()->setLoadTestClassesAndNamespaces( true );
293}
294
295ExtensionRegistry::getInstance()->setSettingsBuilder( $wgSettings );
296ExtensionRegistry::getInstance()->loadFromQueue();
297// Don't let any other extensions load
298ExtensionRegistry::getInstance()->finish();
299
305if ( defined( 'MW_FINAL_SETUP_CALLBACK' ) ) {
306 call_user_func( MW_FINAL_SETUP_CALLBACK, $wgSettings );
307 // Make any additional settings available in globals for use below
308 $wgSettings->apply();
309}
310
311// Config can no longer be changed.
312$wgSettings->enterReadOnlyStage();
313
314// Set an appropriate locale (T291234)
315// setlocale() will return the locale name actually set.
316// The putenv() is meant to propagate the choice of locale to shell commands
317// so that they will interpret UTF-8 correctly. If you have a problem with a
318// shell command and need to send a special locale, you can override the locale
319// with Command::environment().
320putenv( "LC_ALL=" . setlocale( LC_ALL, 'C.UTF-8', 'C' ) );
321
322// Set PHP runtime to the desired timezone
323date_default_timezone_set( $wgLocaltimezone );
324
325MWDebug::setup();
326
327// Enable the global service locator.
328// Trivial expansion of site configuration should go before this point.
329// Any non-trivial expansion that requires calling into MediaWikiServices or other parts of MW.
330MediaWikiServices::allowGlobalInstance();
331
332// Define a constant that indicates that the bootstrapping of the service locator
333// is complete.
334define( 'MW_SERVICE_BOOTSTRAP_COMPLETE', 1 );
335
336MWExceptionRenderer::setShowExceptionDetails( $wgShowExceptionDetails );
337if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
338 // Never install the handler in PHPUnit tests, otherwise PHPUnit's own handler will be unset and things
339 // like convertWarningsToExceptions won't work.
340 MWExceptionHandler::installHandler( $wgLogExceptionBacktrace, $wgPropagateErrors );
341}
343
344// Initialize the root span for distributed tracing if we're in a web request context (T340552).
345// Do this here since subsequent setup code, e.g. session initialization or post-setup hooks,
346// may themselves create spans, so the root span needs to have been initialized by then.
347call_user_func( static function (): void {
348 if ( wfIsCLI() ) {
349 return;
350 }
351
352 $tracer = MediaWikiServices::getInstance()->getTracer();
353 $request = RequestContext::getMain()->getRequest();
354 // Backdate the start of the root span to the timestamp where PHP actually started working on this operation.
355 $startTimeNanos = (int)( 1e9 * $_SERVER['REQUEST_TIME_FLOAT'] );
356 // Avoid high cardinality URL path as root span name, instead safely use the HTTP method.
357 // Per OTEL Semantic Conventions, https://opentelemetry.io/docs/specs/semconv/http/http-spans/
358 $spanName = "EntryPoint " . MW_ENTRY_POINT . ".php HTTP {$request->getMethod()}";
360 $rootSpan = $tracer->createRootSpanFromCarrier( $spanName, $wgAllowExternalReqID ? $request->getAllHeaders() : [] );
361 $rootSpan->setSpanKind( SpanInterface::SPAN_KIND_SERVER )
362 ->setAttributes( array_filter( [
363 'http.request.method' => $request->getMethod(),
364 'url.path' => $request->getRequestURL(),
365 'server.name' => $_SERVER['SERVER_NAME'] ?? null,
366 ] ) )
367 ->start( $startTimeNanos );
368 $rootSpan->activate();
369
370 TracerState::getInstance()->setRootSpan( $rootSpan );
371} );
372
373// Non-trivial validation of: $wgServer
374// The FatalError page only renders cleanly after MWExceptionHandler is installed.
375if ( $wgServer === false ) {
376 // T30798: $wgServer must be explicitly set
377 throw new FatalError(
378 '$wgServer must be set in LocalSettings.php. ' .
379 'See <a href="https://www.mediawiki.org/wiki/Manual:$wgServer">' .
380 'https://www.mediawiki.org/wiki/Manual:$wgServer</a>.'
381 );
382}
383
384// Non-trivial expansion of: $wgCanonicalServer, $wgServerName.
385// These require calling global functions.
386// Also here are other settings that further depend on these two.
387if ( $wgCanonicalServer === false ) {
388 $wgCanonicalServer = MediaWikiServices::getInstance()->getUrlUtils()->getCanonicalServer();
389}
391
392if ( $wgServerName !== false ) {
393 wfWarn( '$wgServerName should be derived from $wgCanonicalServer, '
394 . 'not customized. Overwriting $wgServerName.' );
395}
396$wgServerName = parse_url( $wgCanonicalServer, PHP_URL_HOST );
397
398// $wgEmergencyContact and $wgPasswordSender may be false or empty string (T104142)
399if ( !$wgEmergencyContact ) {
400 $wgEmergencyContact = 'wikiadmin@' . $wgServerName;
401}
402if ( !$wgPasswordSender ) {
403 $wgPasswordSender = 'apache@' . $wgServerName;
404}
405if ( !$wgNoReplyAddress ) {
407}
408
409// Non-trivial expansion of: $wgSecureLogin
410// (due to calling wfWarn).
411if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
412 $wgSecureLogin = false;
413 wfWarn( 'Secure login was enabled on a server that only supports '
414 . 'HTTP or HTTPS. Disabling secure login.' );
415}
416
417// Now that GlobalFunctions is loaded, set defaults that depend on it.
418if ( $wgTmpDirectory === false ) {
420}
421
423 // Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections)
424 MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(
425 array_fill_keys(
427 [
428 'dbname' => $wgSharedDB,
429 'schema' => $wgSharedSchema,
430 'prefix' => $wgSharedPrefix
431 ]
432 )
433 );
434}
435
436// Raise the memory limit if it's too low
437// NOTE: This use wfDebug, and must remain after the MWDebug::setup() call.
439
440// Explicit globals, so this works with bootstrap.php
442
443// Initialize the request object in $wgRequest
444$wgRequest = RequestContext::getMain()->getRequest(); // BackCompat
445
446// Make sure that object caching does not undermine the ChronologyProtector improvements
447if ( $wgRequest->getCookie( 'UseDC', '' ) === 'master' ) {
448 // The user is pinned to the primary DC, meaning that they made recent changes which should
449 // be reflected in their subsequent web requests. Avoid the use of interim cache keys because
450 // they use a blind TTL and could be stale if an object changes twice in a short time span.
451 MediaWikiServices::getInstance()->getMainWANObjectCache()->useInterimHoldOffCaching( false );
452}
453
454// Useful debug output
455( static function () {
456 global $wgRequest;
457
458 $logger = LoggerFactory::getInstance( 'wfDebug' );
459 if ( MW_ENTRY_POINT === 'cli' ) {
460 $self = $_SERVER['PHP_SELF'] ?? '';
461 $logger->debug( "\n\nStart command line script $self" );
462 } else {
463 $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n";
464 $debug .= "IP: " . $wgRequest->getIP() . "\n";
465 $debug .= "HTTP HEADERS:\n";
466 foreach ( $wgRequest->getAllHeaders() as $name => $value ) {
467 $debug .= "$name: $value\n";
468 }
469 $debug .= "(end headers)";
470 $logger->debug( $debug );
471 }
472} )();
473
474// Most of the config is out, some might want to run hooks here.
475( new HookRunner( MediaWikiServices::getInstance()->getHookContainer() ) )->onSetupAfterCache();
476
477// Now that variant lists may be available, parse any action paths and article paths
478// as query parameters.
479//
480// Skip title interpolation on API queries where it is useless and sometimes harmful (T18019).
481//
482// Optimization: Skip on load.php and all other entrypoints besides index.php to save time.
483//
484// TODO: Figure out if this can be safely done after everything else in Setup.php (e.g. any
485// hooks or other state that would miss this?). If so, move to wfIndexMain or MediaWiki::run.
486if ( MW_ENTRY_POINT === 'index' ) {
487 $wgRequest->interpolateTitle();
488}
489
494if ( !defined( 'MW_NO_SESSION' ) && MW_ENTRY_POINT !== 'cli' ) {
495 // If session.auto_start is there, we can't touch session name
496 if ( $wgPHPSessionHandling !== 'disable' && !wfIniGetBool( 'session.auto_start' ) ) {
497 HeaderCallback::warnIfHeadersSent();
498 session_name( $wgSessionName ?: $wgCookiePrefix . '_session' );
499 }
500
501 // Create the SessionManager singleton and set up our session handler,
502 // unless we're specifically asked not to.
503 if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
504 MediaWiki\Session\PHPSessionHandler::install(
505 MediaWiki\Session\SessionManager::singleton()
506 );
507 }
508
509 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
510
511 // Initialize the session
512 try {
513 $session = MediaWiki\Session\SessionManager::getGlobalSession();
514 } catch ( MediaWiki\Session\SessionOverflowException $ex ) {
515 // The exception is because the request had multiple possible
516 // sessions tied for top priority. Report this to the user.
517 $list = [];
518 foreach ( $ex->getSessionInfos() as $info ) {
519 $list[] = $info->getProvider()->describe( $contLang );
520 }
521 $list = $contLang->listToText( $list );
522 throw new HttpError( 400,
523 Message::newFromKey( 'sessionmanager-tie', $list )->inLanguage( $contLang )
524 );
525 }
526
527 unset( $contLang );
528
529 if ( $session->isPersistent() ) {
530 $wgInitialSessionId = $session->getSessionId();
531 }
532
533 $session->renew();
534 if ( MediaWiki\Session\PHPSessionHandler::isEnabled() &&
535 ( $session->isPersistent() || $session->shouldRememberUser() ) &&
536 session_id() !== $session->getId()
537 ) {
538 // Start the PHP-session for backwards compatibility
539 if ( session_id() !== '' ) {
540 wfDebugLog( 'session', 'PHP session {old_id} was already started, changing to {new_id}', 'all', [
541 'old_id' => session_id(),
542 'new_id' => $session->getId(),
543 ] );
544 session_write_close();
545 }
546 session_id( $session->getId() );
547 session_start();
548 }
549
550 unset( $session );
551} else {
552 // Even if we didn't set up a global Session, still install our session
553 // handler unless specifically requested not to.
554 if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
555 MediaWiki\Session\PHPSessionHandler::install(
556 MediaWiki\Session\SessionManager::singleton()
557 );
558 }
559}
560
561// Explicit globals, so this works with bootstrap.php
563
569$wgUser = new StubGlobalUser( RequestContext::getMain()->getUser() ); // BackCompat
570register_shutdown_function( static function () {
571 StubGlobalUser::$destructorDeprecationDisarmed = true;
572} );
573
578
582$wgOut = RequestContext::getMain()->getOutput(); // BackCompat
583
587$wgTitle = null;
588
589// Explicit globals, so this works with bootstrap.php
591
592// Extension setup functions
593// Entries should be added to this variable during the inclusion
594// of the extension file. This allows the extension to perform
595// any necessary initialisation in the fully initialised environment
596foreach ( $wgExtensionFunctions as $func ) {
597 $func();
598}
599unset( $func ); // no global pollution; destroy reference
600
601// If the session user has a 0 id but a valid name, that means we need to
602// autocreate it.
603if ( !defined( 'MW_NO_SESSION' ) && MW_ENTRY_POINT !== 'cli' ) {
604 $sessionUser = MediaWiki\Session\SessionManager::getGlobalSession()->getUser();
605 if ( $sessionUser->getId() === 0 &&
606 MediaWikiServices::getInstance()->getUserNameUtils()->isValid( $sessionUser->getName() )
607 ) {
608 MediaWikiServices::getInstance()->getAuthManager()->autoCreateUser(
609 $sessionUser,
610 MediaWiki\Auth\AuthManager::AUTOCREATE_SOURCE_SESSION,
611 true,
612 true,
613 $sessionUser
614 );
615 }
616 unset( $sessionUser );
617}
618
619// Optimization: Avoid overhead from DeferredUpdates and Pingback deps when turned off.
620if ( MW_ENTRY_POINT !== 'cli' && $wgPingback ) {
621 // NOTE: Do not refactor to inject Config or otherwise make unconditional service call.
622 //
623 // On a plain install of MediaWiki, Pingback is likely the *only* feature
624 // involving DeferredUpdates or DB_PRIMARY on a regular page view.
625 // To allow for error recovery and fault isolation, let admins turn this
626 // off completely. (T269516)
627 DeferredUpdates::addCallableUpdate( static function () {
628 MediaWikiServices::getInstance()->getPingback()->run();
629 } );
630}
631
633if ( $settingsWarnings ) {
634 $logger = LoggerFactory::getInstance( 'Settings' );
635 foreach ( $settingsWarnings as $msg ) {
636 $logger->warning( $msg );
637 }
638 unset( $logger );
639}
640
641unset( $settingsWarnings );
642
643// Explicit globals, so this works with bootstrap.php
646
647// T264370
648if ( !defined( 'MW_NO_SESSION' ) && MW_ENTRY_POINT !== 'cli' ) {
649 MediaWiki\Session\SessionManager::singleton()->logPotentialSessionLeakage();
650}
wfDetectLocalSettingsFile(?string $installationPath=null)
Decide and remember where to load LocalSettings from.
wfDetectInstallPath()
Decide and remember where mediawiki is installed.
wfIsCLI()
Check if we are running from the commandline.
const MW_VERSION
The running version of MediaWiki.
Definition Defines.php:37
wfTempDir()
Tries to get the system directory for temporary files.
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
wfMemoryLimit( $newLimit)
Raise PHP's memory limit (if needed).
wfIniGetBool( $setting)
Safety wrapper around ini_get() for boolean settings.
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
if(!defined( 'MEDIAWIKI')) if(ini_get('mbstring.func_overload')) if(!defined( 'MW_ENTRY_POINT')) global $IP
Environment checks.
Definition Setup.php:108
global $wgRequest
Definition Setup.php:441
if(defined( 'MW_SETUP_CALLBACK')) $dynamicDefaults
Customization point after most things are loaded (constants, functions, classes, LocalSettings.
Definition Setup.php:268
if(!defined('MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') if(MW_ENTRY_POINT !=='cli' && $wgPingback $settingsWarnings)
Definition Setup.php:632
$wgUser
Definition Setup.php:569
$wgAutoloadClasses
Definition Setup.php:157
global $wgInitialSessionId
Definition Setup.php:441
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgLang
Definition Setup.php:562
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgOut
Definition Setup.php:562
$wgConf
$wgConf hold the site configuration.
Definition Setup.php:155
if( $wgServerName !==false) $wgServerName
Definition Setup.php:396
if(!interface_exists(LoggerInterface::class)) $wgCommandLineMode
Pre-config setup: Before loading LocalSettings.php.
Definition Setup.php:148
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgTitle
Definition Setup.php:562
$wgScopeTest
Definition Setup.php:203
if($wgServer===false) if( $wgCanonicalServer===false) $wgVirtualRestConfig['global']['domain']
Definition Setup.php:390
global $wgFullyInitialised
Definition Setup.php:590
global $wgExtensionFunctions
Definition Setup.php:590
$wgSettings
Definition Setup.php:159
if(!defined('MW_SETUP_CALLBACK'))
Definition WebStart.php:81
const MW_ENTRY_POINT
Definition api.php:35
static registerHeadersSentCallback(callable $callback)
Configuration holder, particularly for multi-wiki sites.
Group all the pieces relevant to the context of a request into one instance.
Debug toolbar.
Definition MWDebug.php:49
Defer callable updates to run later in the PHP process.
Abort the web request with a custom HTML string that will represent the entire response.
Show an error that looks like an HTTP server error.
Definition HttpError.php:36
Handler class for MWExceptions.
Class to expose exceptions to the client (API bots, users, admins using CLI scripts)
This class provides an implementation of the core hook interfaces, forwarding hook calls to HookConta...
Base class for language-specific code.
Definition Language.php:81
Create PSR-3 logger objects.
A class containing constants representing the names of configuration variables.
This class contains schema declarations for all configuration variables known to MediaWiki core.
Service locator for MediaWiki core services.
The Message class deals with fetching and processing of interface message into a variety of formats.
Definition Message.php:157
Load JSON files, and uses a Processor to extract information.
Thrown when ExtensionRegistry cannot open the extension.json or skin.json file.
Utility for loading LocalSettings files.
Builder class for constructing a Config object from a set of sources during bootstrap.
Settings loaded from a PHP file path as an array structure.
Constructs a settings array based on a PHP class by inspecting class members to construct a schema.
Utility for loading site-specific settings in a multi-tenancy ("wiki farm" or "wiki family") environm...
Stub object for the global user ($wgUser) that makes it possible to change the relevant underlying ob...
Stub object for the user language.
Represents a title within MediaWiki.
Definition Title.php:78
User class for the MediaWiki software.
Definition User.php:121
static init(array $profilerConf)
Definition Profiler.php:68
Holds shared telemetry state, such as finished span data buffered for export.
$wgMemoryLimit
Config variable stub for the MemoryLimit setting, for use by phpdoc and IDEs.
$wgEmergencyContact
Config variable stub for the EmergencyContact setting, for use by phpdoc and IDEs.
$wgSharedTables
Config variable stub for the SharedTables setting, for use by phpdoc and IDEs.
$wgSessionName
Config variable stub for the SessionName setting, for use by phpdoc and IDEs.
$wgLogExceptionBacktrace
Config variable stub for the LogExceptionBacktrace setting, for use by phpdoc and IDEs.
$wgTmpDirectory
Config variable stub for the TmpDirectory setting, for use by phpdoc and IDEs.
$wgNoReplyAddress
Config variable stub for the NoReplyAddress setting, for use by phpdoc and IDEs.
$wgProfiler
Config variable stub for the Profiler setting, for use by phpdoc and IDEs.
$wgSecureLogin
Config variable stub for the SecureLogin setting, for use by phpdoc and IDEs.
$wgLocaltimezone
Config variable stub for the Localtimezone setting, for use by phpdoc and IDEs.
$wgShowExceptionDetails
Config variable stub for the ShowExceptionDetails setting, for use by phpdoc and IDEs.
$wgAllowExternalReqID
Config variable stub for the AllowExternalReqID setting, for use by phpdoc and IDEs.
$wgRequestTimeLimit
Config variable stub for the RequestTimeLimit setting, for use by phpdoc and IDEs.
$wgSharedDB
Config variable stub for the SharedDB setting, for use by phpdoc and IDEs.
$wgCanonicalServer
Config variable stub for the CanonicalServer setting, for use by phpdoc and IDEs.
$wgServer
Config variable stub for the Server setting, for use by phpdoc and IDEs.
$wgPropagateErrors
Config variable stub for the PropagateErrors setting, for use by phpdoc and IDEs.
$wgSharedSchema
Config variable stub for the SharedSchema setting, for use by phpdoc and IDEs.
$wgPasswordSender
Config variable stub for the PasswordSender setting, for use by phpdoc and IDEs.
$wgPingback
Config variable stub for the Pingback setting, for use by phpdoc and IDEs.
$wgCookiePrefix
Config variable stub for the CookiePrefix setting, for use by phpdoc and IDEs.
$wgSharedPrefix
Config variable stub for the SharedPrefix setting, for use by phpdoc and IDEs.
$wgPHPSessionHandling
Config variable stub for the PHPSessionHandling setting, for use by phpdoc and IDEs.
const MW_CONFIG_CALLBACK
Definition install.php:34
Represents an OpenTelemetry span, i.e.
A helper class for throttling authentication attempts.