// Load composer's autoloader if present
if ( is_readable( "$IP/vendor/autoload.php" ) ) {
require_once "$IP/vendor/autoload.php";
+} elseif ( file_exists( "$IP/vendor/autoload.php" ) ) {
+ die( "$IP/vendor/autoload.php exists but is not readable" );
}
// Assert that composer dependencies were successfully loaded
$wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo";
}
-if ( $wgEnableParserCache === false ) {
- $wgParserCacheType = CACHE_NONE;
-}
-
// Fix path to icon images after they were moved in 1.24
if ( $wgRightsIcon ) {
$wgRightsIcon = str_replace(
$wgPasswordPolicy['policies']['default']['MaximalPasswordLength'] = $wgMaximalPasswordLength;
}
-// Backwards compatibility warning
-if ( !$wgSessionsInObjectCache ) {
- wfDeprecated( '$wgSessionsInObjectCache = false', '1.27' );
- if ( $wgSessionHandler ) {
- wfDeprecated( '$wgSessionsHandler', '1.27' );
- }
- $cacheType = get_class( ObjectCache::getInstance( $wgSessionCacheType ) );
- wfDebugLog(
- 'caches',
- "Session data will be stored in \"$cacheType\" cache with " .
- "expiry $wgObjectCacheSessionExpiry seconds"
- );
-}
-$wgSessionsInObjectCache = true;
-
if ( $wgPHPSessionHandling !== 'enable' &&
$wgPHPSessionHandling !== 'warn' &&
$wgPHPSessionHandling !== 'disable'
$wgMainWANCache = 'mediawiki-main-default';
$wgWANObjectCaches[$wgMainWANCache] = [
'class' => WANObjectCache::class,
- 'cacheId' => $wgMainCacheType,
- 'channels' => [ 'purge' => 'wancache-main-default-purge' ]
+ 'cacheId' => $wgMainCacheType
];
}
// Now that variant lists may be available...
$wgRequest->interpolateTitle();
-if ( !is_object( $wgAuth ) ) {
- $wgAuth = new MediaWiki\Auth\AuthManagerAuthPlugin;
- Hooks::run( 'AuthPluginSetup', [ &$wgAuth ] );
-}
-if ( $wgAuth && !$wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin ) {
- MediaWiki\Auth\AuthManager::singleton()->forcePrimaryAuthenticationProviders( [
- new MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider( [
- 'authoritative' => false,
- ] ),
- new MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider( $wgAuth ),
- new MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider( [
- 'authoritative' => true,
- ] ),
- ], '$wgAuth is ' . get_class( $wgAuth ) );
-}
-
/**
* @var MediaWiki\Session\SessionId|null $wgInitialSessionId The persistent
* session ID (if any) loaded at startup
/**
* @var Parser $wgParser
- * @deprecated since 1.32, use MediaWikiServices::getParser() instead
+ * @deprecated since 1.32, use MediaWikiServices::getInstance()->getParser() instead
*/
$wgParser = new StubObject( 'wgParser', function () {
return MediaWikiServices::getInstance()->getParser();