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