X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FDefaultSettings.php;h=5c3ac06bf13524c34db48d5f66031d4499dc1da8;hp=2b2695cdf74a7f190af4169bc2d9f7703839042a;hb=95f9a9f9014242a8a7e18ebdef0afdf8d16b1e9f;hpb=043c9cfc046b9422538d2e3fd040d38957683046 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 2b2695cdf7..5c3ac06bf1 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1004,15 +1004,15 @@ $wgParserTestMediaHandlers = [ */ $wgContentHandlers = [ // the usual case - CONTENT_MODEL_WIKITEXT => 'WikitextContentHandler', + CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class, // dumb version, no syntax highlighting - CONTENT_MODEL_JAVASCRIPT => 'JavaScriptContentHandler', + CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class, // simple implementation, for use by extensions, etc. - CONTENT_MODEL_JSON => 'JsonContentHandler', + CONTENT_MODEL_JSON => JsonContentHandler::class, // dumb version, no syntax highlighting - CONTENT_MODEL_CSS => 'CssContentHandler', + CONTENT_MODEL_CSS => CssContentHandler::class, // plain text, for use by extensions, etc. - CONTENT_MODEL_TEXT => 'TextContentHandler', + CONTENT_MODEL_TEXT => TextContentHandler::class, ]; /** @@ -1817,7 +1817,7 @@ $wgDBtype = 'mysql'; * Whether to use SSL in DB connection. * * This setting is only used if $wgLBFactoryConf['class'] is set to - * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise + * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise * the DBO_SSL flag must be set in the 'flags' option of the database * connection to achieve the same functionality. */ @@ -1827,7 +1827,7 @@ $wgDBssl = false; * Whether to use compression in DB connection. * * This setting is only used $wgLBFactoryConf['class'] is set to - * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise + * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise * the DBO_COMPRESS flag must be set in the 'flags' option of the database * connection to achieve the same functionality. */ @@ -1998,7 +1998,7 @@ $wgDBservers = false; * The LBFactoryMulti class is provided for this purpose, please see * includes/db/LBFactoryMulti.php for configuration information. */ -$wgLBFactoryConf = [ 'class' => 'LBFactorySimple' ]; +$wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ]; /** * After a state-changing request is done by a client, this determines @@ -2142,7 +2142,7 @@ $wgExternalStores = []; * ]; * @endcode * - * Used by LBFactorySimple, may be ignored if $wgLBFactoryConf is set to + * Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to * another class. */ $wgExternalServers = []; @@ -2255,7 +2255,7 @@ $wgCacheDirectory = false; * - CACHE_NONE: Do not cache * - CACHE_DB: Store cache objects in the DB * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers - * - CACHE_ACCEL: APC, APCU, XCache or WinCache + * - CACHE_ACCEL: APC, APCU or WinCache * - (other): A string may be used which identifies a cache * configuration in $wgObjectCaches. * @@ -2310,34 +2310,33 @@ $wgLanguageConverterCacheType = CACHE_ANYTHING; * given, giving a callable function which will generate a suitable cache object. */ $wgObjectCaches = [ - CACHE_NONE => [ 'class' => 'EmptyBagOStuff', 'reportDupes' => false ], - CACHE_DB => [ 'class' => 'SqlBagOStuff', 'loggroup' => 'SQLBagOStuff' ], + CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ], + CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ], CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ], CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ], - CACHE_MEMCACHED => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ], + CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ], 'db-replicated' => [ - 'class' => 'ReplicatedBagOStuff', + 'class' => ReplicatedBagOStuff::class, 'readFactory' => [ - 'class' => 'SqlBagOStuff', + 'class' => SqlBagOStuff::class, 'args' => [ [ 'slaveOnly' => true ] ] ], 'writeFactory' => [ - 'class' => 'SqlBagOStuff', + 'class' => SqlBagOStuff::class, 'args' => [ [ 'slaveOnly' => false ] ] ], 'loggroup' => 'SQLBagOStuff', 'reportDupes' => false ], - 'apc' => [ 'class' => 'APCBagOStuff', 'reportDupes' => false ], - 'apcu' => [ 'class' => 'APCUBagOStuff', 'reportDupes' => false ], - 'xcache' => [ 'class' => 'XCacheBagOStuff', 'reportDupes' => false ], - 'wincache' => [ 'class' => 'WinCacheBagOStuff', 'reportDupes' => false ], - 'memcached-php' => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ], - 'memcached-pecl' => [ 'class' => 'MemcachedPeclBagOStuff', 'loggroup' => 'memcached' ], - 'hash' => [ 'class' => 'HashBagOStuff', 'reportDupes' => false ], + 'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ], + 'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ], + 'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ], + 'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ], + 'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ], + 'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ], ]; /** @@ -2374,13 +2373,13 @@ $wgMainWANCache = false; */ $wgWANObjectCaches = [ CACHE_NONE => [ - 'class' => 'WANObjectCache', + 'class' => WANObjectCache::class, 'cacheId' => CACHE_NONE, 'channels' => [] ] /* Example of a simple single data-center cache: 'memcached-php' => [ - 'class' => 'WANObjectCache', + 'class' => WANObjectCache::class, 'cacheId' => 'memcached-php', 'channels' => [ 'purge' => 'wancache-main-memcached-purge' ] ] @@ -2527,7 +2526,7 @@ $wgAdaptiveMessageCache = false; * Use maintenance/rebuildLocalisationCache.php instead. */ $wgLocalisationCacheConf = [ - 'class' => 'LocalisationCache', + 'class' => LocalisationCache::class, 'store' => 'detect', 'storeClass' => false, 'storeDirectory' => false, @@ -3783,10 +3782,11 @@ $wgResourceLoaderValidateStaticJS = false; */ $wgResourceLoaderLESSVars = [ /** - * Minimum available screen width at which a device can be considered a tablet/desktop + * Minimum available screen width at which a device can be considered a tablet * The number is currently based on the device width of a Samsung Galaxy S5 mini and is low * enough to cover iPad (768px). Number is prone to change with new information. * @since 1.27 + * @deprecated 1.31 Use mediawiki.ui/variables instead */ 'deviceWidthTablet' => '720px', ]; @@ -4166,8 +4166,8 @@ $wgInvalidRedirectTargets = [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect' ]; * an extension setup function. */ $wgParserConf = [ - 'class' => 'Parser', - # 'preprocessorClass' => 'Preprocessor_Hash', + 'class' => Parser::class, + # 'preprocessorClass' => Preprocessor_Hash::class, ]; /** @@ -4471,7 +4471,7 @@ $wgActiveUserDays = 30; * @since 1.27 */ $wgCentralIdLookupProviders = [ - 'local' => [ 'class' => 'LocalIdLookup' ], + 'local' => [ 'class' => LocalIdLookup::class ], ]; /** @@ -4759,7 +4759,7 @@ $wgPasswordDefault = 'pbkdf2'; * An advanced example: * @code * $wgPasswordConfig['bcrypt-peppered'] = [ - * 'class' => 'EncryptedPassword', + * 'class' => EncryptedPassword::class, * 'underlying' => 'bcrypt', * 'secrets' => [], * 'cipher' => MCRYPT_RIJNDAEL_256, @@ -4772,31 +4772,31 @@ $wgPasswordDefault = 'pbkdf2'; */ $wgPasswordConfig = [ 'A' => [ - 'class' => 'MWOldPassword', + 'class' => MWOldPassword::class, ], 'B' => [ - 'class' => 'MWSaltedPassword', + 'class' => MWSaltedPassword::class, ], 'pbkdf2-legacyA' => [ - 'class' => 'LayeredParameterizedPassword', + 'class' => LayeredParameterizedPassword::class, 'types' => [ 'A', 'pbkdf2', ], ], 'pbkdf2-legacyB' => [ - 'class' => 'LayeredParameterizedPassword', + 'class' => LayeredParameterizedPassword::class, 'types' => [ 'B', 'pbkdf2', ], ], 'bcrypt' => [ - 'class' => 'BcryptPassword', + 'class' => BcryptPassword::class, 'cost' => 9, ], 'pbkdf2' => [ - 'class' => 'Pbkdf2Password', + 'class' => Pbkdf2Password::class, 'algo' => 'sha512', 'cost' => '30000', 'length' => '64', @@ -6106,7 +6106,7 @@ $wgDebugComments = false; * Write SQL queries to the debug log. * * This setting is only used $wgLBFactoryConf['class'] is set to - * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise + * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise * the DBO_DEBUG flag must be set in the 'flags' option of the database * connection to achieve the same functionality. */ @@ -6211,7 +6211,7 @@ $wgDebugLogGroups = []; * * @par To completely disable logging: * @code - * $wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\NullSpi' ]; + * $wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ]; * @endcode * * @since 1.25 @@ -6219,7 +6219,7 @@ $wgDebugLogGroups = []; * @see MwLogger */ $wgMWLoggerDefaultSpi = [ - 'class' => '\\MediaWiki\\Logger\\LegacySpi', + 'class' => \MediaWiki\Logger\LegacySpi::class, ]; /** @@ -6275,6 +6275,12 @@ $wgShowDBErrorBacktrace = false; */ $wgLogExceptionBacktrace = true; +/** + * If true, the MediaWiki error handler passes errors/warnings to the default error handler + * after logging them. The setting is ignored when the track_errors php.ini flag is true. + */ +$wgPropagateErrors = true; + /** * Expose backend server host names through the API and various HTML comments */ @@ -6667,9 +6673,9 @@ $wgGitBin = '/usr/bin/git'; */ $wgGitRepositoryViewers = [ 'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)' => - 'https://phabricator.wikimedia.org/r/revision/%R;%H', + 'https://gerrit.wikimedia.org/g/%R/+/%H', 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' => - 'https://phabricator.wikimedia.org/r/revision/%R;%H', + 'https://gerrit.wikimedia.org/g/%R/+/%H', ]; /** @} */ # End of maintenance } @@ -6771,7 +6777,7 @@ $wgRCLinkDays = [ 1, 3, 7, 14, 30 ]; * 'omit_bots' => true, * ]; * @example $wgRCFeeds['example'] = [ - * 'class' => 'ExampleRCFeed', + * 'class' => ExampleRCFeed::class, * ]; * @since 1.22 */ @@ -6783,8 +6789,8 @@ $wgRCFeeds = []; * @since 1.22 */ $wgRCEngines = [ - 'redis' => 'RedisPubSubFeedEngine', - 'udp' => 'UDPRCFeedEngine', + 'redis' => RedisPubSubFeedEngine::class, + 'udp' => UDPRCFeedEngine::class, ]; /** @@ -6908,8 +6914,8 @@ $wgOverrideSiteFeed = []; * $wgOut->isSyndicated() is true. */ $wgFeedClasses = [ - 'rss' => 'RSSFeed', - 'atom' => 'AtomFeed', + 'rss' => RSSFeed::class, + 'atom' => AtomFeed::class, ]; /** @@ -7436,24 +7442,24 @@ $wgServiceWiringFiles = [ * or (since 1.30) a callback to use for creating the job object. */ $wgJobClasses = [ - 'refreshLinks' => 'RefreshLinksJob', - 'deleteLinks' => 'DeleteLinksJob', - 'htmlCacheUpdate' => 'HTMLCacheUpdateJob', - 'sendMail' => 'EmaillingJob', - 'enotifNotify' => 'EnotifNotifyJob', - 'fixDoubleRedirect' => 'DoubleRedirectJob', - 'AssembleUploadChunks' => 'AssembleUploadChunksJob', - 'PublishStashedFile' => 'PublishStashedFileJob', - 'ThumbnailRender' => 'ThumbnailRenderJob', - 'recentChangesUpdate' => 'RecentChangesUpdateJob', - 'refreshLinksPrioritized' => 'RefreshLinksJob', - 'refreshLinksDynamic' => 'RefreshLinksJob', - 'activityUpdateJob' => 'ActivityUpdateJob', - 'categoryMembershipChange' => 'CategoryMembershipChangeJob', - 'clearUserWatchlist' => 'ClearUserWatchlistJob', - 'cdnPurge' => 'CdnPurgeJob', - 'enqueue' => 'EnqueueJob', // local queue for multi-DC setups - 'null' => 'NullJob' + 'refreshLinks' => RefreshLinksJob::class, + 'deleteLinks' => DeleteLinksJob::class, + 'htmlCacheUpdate' => HTMLCacheUpdateJob::class, + 'sendMail' => EmaillingJob::class, + 'enotifNotify' => EnotifNotifyJob::class, + 'fixDoubleRedirect' => DoubleRedirectJob::class, + 'AssembleUploadChunks' => AssembleUploadChunksJob::class, + 'PublishStashedFile' => PublishStashedFileJob::class, + 'ThumbnailRender' => ThumbnailRenderJob::class, + 'recentChangesUpdate' => RecentChangesUpdateJob::class, + 'refreshLinksPrioritized' => RefreshLinksJob::class, + 'refreshLinksDynamic' => RefreshLinksJob::class, + 'activityUpdateJob' => ActivityUpdateJob::class, + 'categoryMembershipChange' => CategoryMembershipChangeJob::class, + 'clearUserWatchlist' => ClearUserWatchlistJob::class, + 'cdnPurge' => CdnPurgeJob::class, + 'enqueue' => EnqueueJob::class, // local queue for multi-DC setups + 'null' => NullJob::class, ]; /** @@ -7502,7 +7508,7 @@ $wgJobSerialCommitThreshold = false; * These settings should be global to all wikis. */ $wgJobTypeConf = [ - 'default' => [ 'class' => 'JobQueueDB', 'order' => 'random', 'claimTTL' => 3600 ], + 'default' => [ 'class' => JobQueueDB::class, 'order' => 'random', 'claimTTL' => 3600 ], ]; /** @@ -7510,7 +7516,7 @@ $wgJobTypeConf = [ * These settings should be global to all wikis. */ $wgJobQueueAggregator = [ - 'class' => 'JobQueueAggregatorNull' + 'class' => JobQueueAggregatorNull::class ]; /** @@ -7531,7 +7537,7 @@ $wgJobQueueIncludeInMaxLagFactor = false; * Expensive Querypages are already updated. */ $wgSpecialPageCacheUpdates = [ - 'Statistics' => [ 'SiteStatsUpdate', 'cacheUpdate' ] + 'Statistics' => [ SiteStatsUpdate::class, 'cacheUpdate' ] ]; /** @@ -7721,42 +7727,42 @@ $wgLogActions = []; * @see LogFormatter */ $wgLogActionsHandlers = [ - 'block/block' => 'BlockLogFormatter', - 'block/reblock' => 'BlockLogFormatter', - 'block/unblock' => 'BlockLogFormatter', - 'contentmodel/change' => 'ContentModelLogFormatter', - 'contentmodel/new' => 'ContentModelLogFormatter', - 'delete/delete' => 'DeleteLogFormatter', - 'delete/delete_redir' => 'DeleteLogFormatter', - 'delete/event' => 'DeleteLogFormatter', - 'delete/restore' => 'DeleteLogFormatter', - 'delete/revision' => 'DeleteLogFormatter', - 'import/interwiki' => 'ImportLogFormatter', - 'import/upload' => 'ImportLogFormatter', - 'managetags/activate' => 'LogFormatter', - 'managetags/create' => 'LogFormatter', - 'managetags/deactivate' => 'LogFormatter', - 'managetags/delete' => 'LogFormatter', - 'merge/merge' => 'MergeLogFormatter', - 'move/move' => 'MoveLogFormatter', - 'move/move_redir' => 'MoveLogFormatter', - 'patrol/patrol' => 'PatrolLogFormatter', - 'patrol/autopatrol' => 'PatrolLogFormatter', - 'protect/modify' => 'ProtectLogFormatter', - 'protect/move_prot' => 'ProtectLogFormatter', - 'protect/protect' => 'ProtectLogFormatter', - 'protect/unprotect' => 'ProtectLogFormatter', - 'rights/autopromote' => 'RightsLogFormatter', - 'rights/rights' => 'RightsLogFormatter', - 'suppress/block' => 'BlockLogFormatter', - 'suppress/delete' => 'DeleteLogFormatter', - 'suppress/event' => 'DeleteLogFormatter', - 'suppress/reblock' => 'BlockLogFormatter', - 'suppress/revision' => 'DeleteLogFormatter', - 'tag/update' => 'TagLogFormatter', - 'upload/overwrite' => 'UploadLogFormatter', - 'upload/revert' => 'UploadLogFormatter', - 'upload/upload' => 'UploadLogFormatter', + 'block/block' => BlockLogFormatter::class, + 'block/reblock' => BlockLogFormatter::class, + 'block/unblock' => BlockLogFormatter::class, + 'contentmodel/change' => ContentModelLogFormatter::class, + 'contentmodel/new' => ContentModelLogFormatter::class, + 'delete/delete' => DeleteLogFormatter::class, + 'delete/delete_redir' => DeleteLogFormatter::class, + 'delete/event' => DeleteLogFormatter::class, + 'delete/restore' => DeleteLogFormatter::class, + 'delete/revision' => DeleteLogFormatter::class, + 'import/interwiki' => ImportLogFormatter::class, + 'import/upload' => ImportLogFormatter::class, + 'managetags/activate' => LogFormatter::class, + 'managetags/create' => LogFormatter::class, + 'managetags/deactivate' => LogFormatter::class, + 'managetags/delete' => LogFormatter::class, + 'merge/merge' => MergeLogFormatter::class, + 'move/move' => MoveLogFormatter::class, + 'move/move_redir' => MoveLogFormatter::class, + 'patrol/patrol' => PatrolLogFormatter::class, + 'patrol/autopatrol' => PatrolLogFormatter::class, + 'protect/modify' => ProtectLogFormatter::class, + 'protect/move_prot' => ProtectLogFormatter::class, + 'protect/protect' => ProtectLogFormatter::class, + 'protect/unprotect' => ProtectLogFormatter::class, + 'rights/autopromote' => RightsLogFormatter::class, + 'rights/rights' => RightsLogFormatter::class, + 'suppress/block' => BlockLogFormatter::class, + 'suppress/delete' => DeleteLogFormatter::class, + 'suppress/event' => DeleteLogFormatter::class, + 'suppress/reblock' => BlockLogFormatter::class, + 'suppress/revision' => DeleteLogFormatter::class, + 'tag/update' => TagLogFormatter::class, + 'upload/overwrite' => UploadLogFormatter::class, + 'upload/revert' => UploadLogFormatter::class, + 'upload/upload' => UploadLogFormatter::class, ]; /** @@ -7887,7 +7893,7 @@ $wgActions = [ 'credits' => true, 'delete' => true, 'edit' => true, - 'editchangetags' => 'SpecialPageAction', + 'editchangetags' => SpecialPageAction::class, 'history' => true, 'info' => true, 'markpatrolled' => true, @@ -7896,7 +7902,7 @@ $wgActions = [ 'raw' => true, 'render' => true, 'revert' => true, - 'revisiondelete' => 'SpecialPageAction', + 'revisiondelete' => SpecialPageAction::class, 'rollback' => true, 'submit' => true, 'unprotect' => true, @@ -8045,12 +8051,12 @@ $wgDebugAPI = false; * @code * $wgAPIModules['foo'] = 'ApiFoo'; * $wgAPIModules['bar'] = [ - * 'class' => 'ApiBar', + * 'class' => ApiBar::class, * 'factory' => function( $main, $name ) { ... } * ]; * $wgAPIModules['xyzzy'] = [ - * 'class' => 'ApiXyzzy', - * 'factory' => [ 'XyzzyFactory', 'newApiModule' ] + * 'class' => ApiXyzzy::class, + * 'factory' => [ XyzzyFactory::class, 'newApiModule' ] * ]; * @endcode * @@ -8473,7 +8479,7 @@ $wgRedirectOnLogin = null; * @par Example using local redis instance: * @code * $wgPoolCounterConf = [ 'ArticleView' => [ - * 'class' => 'PoolCounterRedis', + * 'class' => PoolCounterRedis::class, * 'timeout' => 15, // wait timeout in seconds * 'workers' => 1, // maximum number of active threads in each pool * 'maxqueue' => 5, // maximum number of total threads in each pool @@ -8485,7 +8491,7 @@ $wgRedirectOnLogin = null; * @par Example using C daemon from https://www.mediawiki.org/wiki/Extension:PoolCounter: * @code * $wgPoolCounterConf = [ 'ArticleView' => [ - * 'class' => 'PoolCounter_Client', + * 'class' => PoolCounter_Client::class, * 'timeout' => 15, // wait timeout in seconds * 'workers' => 5, // maximum number of active threads in each pool * 'maxqueue' => 50, // maximum number of total threads in each pool @@ -8559,7 +8565,7 @@ $wgTextModelsToParse = [ * @since 1.20 */ $wgSiteTypes = [ - 'mediawiki' => 'MediaWikiSite', + 'mediawiki' => MediaWikiSite::class, ]; /** @@ -8633,7 +8639,7 @@ $wgPageLanguageUseDB = false; * Auto-mounting example for Parsoid: * * $wgVirtualRestConfig['paths']['/parsoid/'] = [ - * 'class' => 'ParsoidVirtualRESTService', + * 'class' => ParsoidVirtualRESTService::class, * 'options' => [ * 'url' => 'http://localhost:8000', * 'prefix' => 'enwiki', @@ -8730,7 +8736,7 @@ $wgMaxJobDBWriteDuration = false; */ $wgEventRelayerConfig = [ 'default' => [ - 'class' => 'EventRelayerNull', + 'class' => EventRelayerNull::class, ] ];