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