X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=bcdc1d57a200784d8f3a48c9d2eb86de5ab248d1;hb=58ee03b13d32b96d86aaf905fdfa8ac14241a5cc;hp=23342e934e27e1e2b3da25bde893e0a36f2e7691;hpb=9e0463eb9efc00b028b162edb3256e2b260e3145;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 23342e934e..bcdc1d57a2 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -67,6 +67,8 @@ require_once "$IP/includes/GlobalFunctions.php"; // 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 @@ -490,7 +492,7 @@ $wgCanonicalNamespaceNames = [ /// @todo UGLY UGLY if ( is_array( $wgExtraNamespaces ) ) { - $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces; + $wgCanonicalNamespaceNames += $wgExtraNamespaces; } // Hard-deprecate setting $wgDummyLanguageCodes in LocalSettings.php @@ -578,21 +580,6 @@ if ( $wgMaximalPasswordLength !== false ) { $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' @@ -703,8 +690,7 @@ if ( $wgMainWANCache === false ) { $wgMainWANCache = 'mediawiki-main-default'; $wgWANObjectCaches[$wgMainWANCache] = [ 'class' => WANObjectCache::class, - 'cacheId' => $wgMainCacheType, - 'channels' => [ 'purge' => 'wancache-main-default-purge' ] + 'cacheId' => $wgMainCacheType ]; } @@ -806,22 +792,6 @@ $wgContLang = MediaWikiServices::getInstance()->getContentLanguage(); // 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 @@ -911,7 +881,7 @@ $wgOut = RequestContext::getMain()->getOutput(); // BackCompat /** * @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();