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