= MediaWiki 1.41 = == MediaWiki 1.41.0-PRERELEASE == THIS IS NOT A RELEASE YET MediaWiki 1.41 is an alpha-quality development branch, and is not recommended for use in production. == Upgrading notes for 1.41 == Don't forget to always back up your database before upgrading! See the file UPGRADE for more detailed per-version upgrade instructions from the oldest supported upgrading version, MediaWiki 1.35. Some specific notes for MediaWiki 1.41 upgrades are below: * (T178356) MediaWiki now requires browsers to support ES6 for them to receive JavaScript, up from ES5. In practice, this primarily means that users of Internet Explorer 11 (EOL in 2022) will no longer get JavaScript tools. * … For notes on 1.40.x and older releases, see HISTORY. === Configuration changes for system administrators in 1.41 === * … ==== New configuration ==== * … ==== Changed configuration ==== * $wgAuthManagerAutoConfig – When using this setting to modify the authentication system in MediaWiki, the classes TemporaryPasswordPrimaryAuthenticationProvider, LocalPasswordPrimaryAuthenticationProvider and EmailNotificationSecondaryAuthenticationProvider now require DBLoadBalancerFactory, not DBLoadBalancer, as a service. * … ==== Removed configuration ==== * $wgCommentTempTableSchemaMigrationStage – This temporary flag did let you control the migration stage for the temporary comment database table, from revision. * … === New user-facing features in 1.41 === * Special:RandomPage can now take multiple namespaces in its URL, split by ','. * The aria-level HTML attribute is now allowed in wikitext by the Sanitizer. * … === New features for sysadmins in 1.41 === * $wgDBssl can now enabled in the installer when the database type is Postgres or MariaDB/MySQL (T335828). * … === New developer features in 1.41 === * Added ForeignResourcesDir extension.json / skin.json attribute, which should point to the directory holding your foreign-resources.yaml file. See https://www.mediawiki.org/wiki/Foreign_resources for background. * Added a .gitmessage commit template. To use it, run: `git config commit.template .gitmessage` * A new hook, TextSlotDiffRendererTablePrefixHook, has been added to allow extensions to add content within #mw-content-text but after the DifferenceEngineViewHeader or DifferenceEngineShowDiffPage hooks have been run. The new hook is used to add elements within a horizontal display area, where their order can be explicitly set. Examples of uses for this include adding the VisualEditor diff-type switch, and the legend for inline diffs that is displayed if Wikidiff2 is installed. * validation callbacks for HTMLForm fields can now return Status objects. HTMLForm::validate will convert good Status instances to true and Status instances to a string containing a list with the errors. * … === External library changes in 1.41 === ==== New external libraries ==== * Added pinia at v2.0.16. * Added symfony/polyfill-php81 at v1.27.0. ===== New development-only external libraries ===== * … ==== Changed external libraries ==== * Updated codex, codex-search, codex-design-tokens and codex-icons from v0.6.2 to v0.15.0. * Updated Mustache from 3.0.1 to 4.2.0. * Updated OOjs from 6.0.0 to 7.0.1. * Updated wikimedia/composer-merge-plugin from 2.0.1 to 2.1.0. * Updated wikimedia/common-passwords from 0.4.0 to 0.5.0. * Updated wikimedia/minify from 2.3.0 to 2.4.0. * Updated wikimedia/less.php from 4.0.0 to 4.1.0. * Updated OOUI from v0.46.3 to v0.47.5. * … ===== Changed development-only external libraries ===== * … ==== Removed external libraries ==== * The `jquery.hoverIntent` module was removed. * … === Bug fixes in 1.41 === * … === Action API changes in 1.41 === * (T322944) `Authorization` was added to the default list of headers allowed for cross-origin API requests ($wgAllowedCorsHeaders). * … === Action API internal changes in 1.41 === * … === Languages updated in 1.41 === MediaWiki supports over 350 languages. Many localisations are updated regularly. Below only new and removed languages are listed, as well as changes to languages because of Phabricator reports. * (T332113) Added language support for Northern Hindko (hno). * (T333425) Added language support for Iraqi (Mesopotamian) Arabic (acm). * (T336919) Added language support for Crimean Tatar (Romania) (crh-ro). * (T338416) Added language support for Betawi (bew). * (T341545) Added language support for West Coast Bajau (a.k.a. Sama; bdr). * (T332118) Namespace translations for Angika (anp) were added * (T341942) The autonym of the Buginese language is changed to the Latin-script name "Basa Ugi", and the localization in the language code "bug" is now only in the Latin script. It's possible to add localization in the Lontara script in translatewiki under the code "bug-bugi". * (T341943) Main Page name translation was changed from "Leppa Indoë" to "Watangpola". If you manage a wiki in this language, make sure that links to the main page are correctly updated. See https://translatewiki.net/w/i.php?title=Support&oldid=11723654#Change_MediaWiki:Mainpage/bug === Breaking changes in 1.41 === * Article::doDelete(), deprecated since 1.37, has been removed. * CommentStore::getStore(), deprecated since 1.31, has been removed. * Article::getRedirectHeaderHtml() no longer accepts an array as $target. Passing an array was deprecated in 1.39. * IDatabase::wasErrorReissuable(), deprecated since 1.40, has been removed. * MWHttpRequest::factory(), deprecated since 1.34, has been removed. * The Http class, deprecated since 1.34, with the functions ::request(), ::get(), ::post(), ::userAgent(), ::isValidURI(), ::getProxy(), ::createMultiClient() have been removed. * WikiPage::factory(), ::newFromID() and ::newFromRow, deprecated in 1.36, have been removed. * The following unused IDatabase methods were removed without deprecation: - ::wasLockTimeout() - ::wasConnectionLoss() * The GenericArrayObject class, deprecated in 1.40, has been removed. * The $replace parameter has been removed from HookContainer::scopedRegister. This parameter was unused outside core, and the functionality was intended for testing. * PrevNextNavigationRenderer class, deprecated in 1.39, has been removed. * class alias MediaWiki\User\WatchlistNotificationManager, deprecated in 1.36, has been removed. * MediaWikiServices::getWatchlistNotificationManager(), deprecated in 1.36, has been removed. * The following methods in the Title class, deprecated since 1.37, have been removed: - ::areCascadeProtectionSourcesLoaded() - ::areRestrictionsCascading() - ::areRestrictionsLoaded() - ::getAllRestrictions() - ::getCascadeProtectionSources() - ::getFilteredRestrictionTypes() - ::getRestrictionExpiry() - ::getRestrictionTypes() - ::getRestrictions() - ::isCascadeProtected() - ::isProtected() - ::isSemiProtected() - ::loadRestrictionsFromRows() * Global function wfShowingResults, deprecated in 1.40, has been removed. * LinkBatch::__construct() now requires that all parameters be passed. The fallback to MediaWikiServices emitted deprecation notices since 1.35. * The methods IndexPager::getPagingLinks(), IndexPager::getLimitLinks() and IndexPager::buildPrevNextNavigation(), deprecated in 1.39, have been removed. * Overriding the method IndexPager::makeLink(), deprecated in 1.39, is no longer possible. * MagicWordFactory::getCacheTime() is deprecated and returns -1. * IDatabase::lastQuery and IReadableDatabase::lastQuery, deprecated in 1.40, is now removed. * Protected method Database::executeQuery now only takes Query object as argument instead of raw SQL string. * Protected method Database::getTempTableWrites() is now private. * Config parameter keywordTableMap in DatabasePostgres, deprecated since 1.37, has been removed. * Various mediawiki.less mediawiki.ui variables, deprecated in 1.35, have been removed. See also below that the remaining mediawiki.ui variables are now also deprecated. * Calling getId() on an AbstractBlock from the wrong wiki, deprecated since 1.38, now throws an exception. * SQLite no longer supports raw MySQL queries. * The following functions from the mediawiki.mixins Less import, deprecated since 1.37, have been removed: .transition(), .transition-transform(), .transform() and .transform-origin(). * Database::queryMulti() has been removed without deprecation as it's not used anywhere. Likewise, protected Database::doMultiStatementQuery is dropped and executeQuery signature has changed. * Support was dropped for skins with paths relative to core which has been sending deprecation notices since 1.37. The skin `templateDirectory` key should now always be relative to the skin. * The Skin public thisquery property was removed without deprecation. Only one skin was known to use it and that has been patched accordingly. * The jquery.tipsy module, deprecated since 1.28, has now been removed. * NamespaceInfo::getRestrictionLevels(), deprecated in 1.34, has been removed. Use PermissionManager::getNamespaceRestrictionLevels() instead. * Proto-relative external links are now stored and indexed only as HTTPS instead of two rows, one for HTTP and one for HTTPS. * MediaWikiIntegrationTestCase::getTestUser(), ::getTestSysop(), and ::getMutableTestUser() have been made protected and non-static. * The following methods in the DatabasePostgres class, unused, have been removed: - ::currentSequenceValue() - ::triggerExists() - ::ruleExists() * Database::unionConditionPermutations(), unused everywhere, have been removed without deprecation. * Saving preferences for a temporary user now throws an error (e.g. via UserOptionsManager::saveOptions) * ApiQuery::getNamedDB() and ApiQueryBase::selectNamedDB(), deprecated in 1.39, have been removed. * ChangeTags::addTagsAccompanyingChangeWithChecks() and ChangeTags::undefineTag() unused everywhere, have been removed without deprecation. * SelectQueryBuilder::lockForUpdate(), deprecated in 1.40 and unused, has been removed without hard deprecation. * SkinTemplateNavigation and SkinTemplateNavigation::SpecialPage hooks, deprecated in 1.39, have been removed. * Support of the third parameter of LogEventsListGetExtraInputs hook, deprecated since 1.32, has been removed. * JobSpecification::getTitle(), deprecated in 1.37, has been removed. * The module mw.ui.anchor has been removed. Projects that need it should maintain a local copy or use the Codex link mixin. More information at T235961. * ParsoidCachePrewarmJob::newSpec() now requires a PageRecord as the second parameter instead of a page ID. * Public access to the DifferenceEngine properties mOldid, mNewid, mOldRev, mNewRev, mOldPage, mNewPage, mOldContent, mNewContent, mRevisionsLoaded, mTextLoaded and mCacheHit, deprecated in 1.32, was removed. * SearchDatabase::db, deprecated since 1.38, has been removed. * SearchDatabase::lb has been removed without deprecation, use ::dbProvider instead. * Title::newFromTitleValue(), deprecated since 1.34, has been removed. * SpecialPageAction has been removed without deprecation. There were no known uses outside of core. * ParserOutput::hideNewSection(), deprecated since 1.38, has been removed. * Many LocalisationCache constants, properties and methods that have no known usage outside of the class have been made private without deprecation. * ILoadBalancer::closeConnection() has been made removed and LoadBalancer::closeConnection() has been made private as they are not used anywhere. * ILoadBalancer::waitFor has been removed without deprecation as it's not used anywhere. * ILBFactory::resolveDomainID() has been removed without deprecation as it's not used anywhere. * The following methods have been moved from ILoadBalancer to ILoadBalancerForOwner: - ::redefineLocalDomain() - ::hasPrimaryConnection() - ::setIndexAliases() * LBFactory::makeCookieValueFromCPIndex() and ::getCPInfoFromCookieValue() has been moved to ChronologyProtector class without backward compatability as they are not supposed to be used outside of core. * … === Deprecations in 1.41 === * The MessageCache::get hook is deprecated for performance reasons. Use MessageCacheFetchOverrides instead. * The interface for hook ParserModifyImageHTML have been renamed from ParserModifyImageHTML to ParserModifyImageHTMLHook, the old name is deprecated. * (T178356) The es6-polyfills module is deprecated and is now a no-op. * The following classes are now namespaced under MediaWiki\Specials; the old class names are now deprecated aliases: - SpecialActiveUsers - SpecialAllMessages - SpecialAllMyUploads (under MediaWiki\Specials\Redirects) - SpecialAncientPages - SpecialApiHelp - SpecialApiSandbox - SpecialAutoblockList - SpecialBlankpage - SpecialBlock - SpecialBlockList - SpecialBookSources - SpecialBotPasswords - SpecialBrokenRedirects - SpecialCategories - SpecialChangeContentModel - SpecialChangeCredentials - SpecialChangeEmail - SpecialChangePassword - SpecialComparePages - SpecialConfirmEmail - SpecialContribute - SpecialContributions - SpecialCreateAccount - SpecialDeadendPages - SpecialDeletePage - SpecialDeletedContributions - SpecialDiff - SpecialDoubleRedirects - SpecialEditPage - SpecialEditTags - SpecialEditWatchlist - SpecialEmailInvalidate - SpecialEmailUser - SpecialExpandTemplates - SpecialExport - SpecialFewestRevisions - SpecialFileDuplicateSearch - SpecialFilepath - SpecialGoToInterwiki - SpecialImport - SpecialJavaScriptTest - SpecialLinkAccounts - SpecialLinkSearch - SpecialListAdmins (under MediaWiki\Specials\Redirects) - SpecialListBots (under MediaWiki\Specials\Redirects) - SpecialListDuplicatedFiles - SpecialListFiles - SpecialListGrants - SpecialListGroupRights - SpecialListRedirects - SpecialListUsers - SpecialLockdb - SpecialLog - SpecialLonelyPages - SpecialLongPages - SpecialMIMESearch - SpecialMediaStatistics - SpecialMergeHistory - SpecialMostCategories - SpecialMostInterwikis - SpecialMostLinked - SpecialMostLinkedCategories - SpecialMostLinkedTemplates - SpecialMostRevisions - SpecialMute - SpecialMyLanguage - SpecialMycontributions (under MediaWiki\Specials\Redirects) - SpecialMylog (under MediaWiki\Specials\Redirects) - SpecialMypage (under MediaWiki\Specials\Redirects) - SpecialMytalk (under MediaWiki\Specials\Redirects) - SpecialMyuploads (under MediaWiki\Specials\Redirects) * Various mediawiki.ui variables have been deprecated in favor of 'mediawiki.skin.variables.less' Codex design tokens featuring replacements. * Hook handlers must now be specified either as a PHP callable, or as a PHP object that has a method matching the hook name. Other ways to specify the handler are deprecated and will soon be removed. Deprecated ways to specify a hook handler include callables wrapped in an array. Handlers defined using a "HookHandlers" entry in extension.json are not affected. * The MediaWikiIntegrationTestCase::$users has been deprecated. Use Authority if possible, or call ::getTestUser() or ::getTestSysop() directly. * The tests/phpunit/phpunit.php entrypoint has been deprecated. PHPUnit tests should be run with composer, for example with the `composer phpunit:entrypoint` command. * The jquery.cookie ResourceLoader module has been merged into the existing mediawiki.cookie module; jquery.cookie remains but is deprecated. * The Pingback class has been moved into the MediaWiki\Installer namespace. * Passing a database to DatabaseBlockStore::insertBlock() is deprecated. DatabaseBlockStoreFactory should be used to fetch a correct DatabaseBlockStore instead. * The global function wfGetLangObj is deprecated and emits deprecation warnings. Use MediaWiki\Languages\LanguageFactory::getLanguage instead. * virtualrest::SwiftVirtualRESTService is deprecated in 1.41 and now emits deprecation warnings. * Passing an actor id to the UserIdentityValue constructor is now emits deprecation warnings, it is deprecated since 1.36. * UserGroupMembership::getGroupName(), deprecated in 1.38, and UserGroupMembership::getGroupMemberName(), deprecated in 1.40, now emit deprecation warnings. * UserGroupMembership::getLink() has been deprecated in favour of ::getLinkHTML() and ::getLinkWiki(). * SearchResultThumbnail::getSize() has been deprecated to be dropped in the future as it is resource intensive and degrades performance. * The EmailUserPermissionsErrors and UserCanSendEmail hooks have been deprecated in favour of the EmailUserAuthorizeSend hook. * The EmailUser hook has been deprecated in favour of the EmailUserSendEmail hook. * The InterwikiLoadPrefix hook now emits deprecation warnings. Resetting the $wgInterwikiCache setting instead. * SiteConfiguration::extractVar() and ::extractGlobal() have been deprecated and also emit deprecation warnings. * Hooks::isRegistered(), ::getHandlers(), ::run() and ::runWithoutAbort(), deprecated in 1.35, now emit deprecation warnings. * Language::getMessage and Language::getAllMessages are deprecated. Use LocalisationCache or MessageCache as appropriate. * VirtualRESTService class is deprecated in 1.41 and as a replacement we can use MultiHttpClient. * JobSpecification::toSerializableArray() now emits deprecation warnings. * The following skin methods were deprecated: - Skin::makeSpecialUrl (use Title or Special class instead) - Skin::makeSpecialUrlSubpage (use Title or Special class instead) * mw.jqueryMsg.parser, deprecated in 1.31, now emits deprecation warnings. * ResourceLoader (T127268): The targets system is deprecated. Modules that have been marked as desktop or mobile only are no longer supported and will send deprecation warnings. * TextSlotDiffRenderer::setLanguage() is deprecated, and calling it will have no effect. Use ContentHandler::getSlotDiffRenderer(), or in subclasses, ContentHandler::createTextSlotDiffRenderer(), to correctly inject dependencies into TextSlotDiffRenderer. * The static methods encodeJsVar() and encodeJsCall() have been moved from the Xml class to the more appropriate MediaWiki\Html\Html one, and the old ones are now deprecated. * The XmlJsCode wrapper class has been renamed to MediaWiki\Html\HtmlJsCode, and the old name is now deprecated. * … === Other changes in 1.41 === * ExternalLinksLookup::getExternalLinksForPage() now exists to centralize logic of looking up externallinks rows. * The update script no longer accepts the --skip-compat-checks option. * Type hints were added to: - The return value of WebRequest:: and DerivativeRequest::getSession() - The return value of WebRequest:: and DerivativeRequest::getIP() - The return value of User::getTitleKey() - The return value of User::getRequest() - The `$key` parameter to Skin::normalizeKey() None of the methods whose return value was updated belongs to a class stable to extend, and adding type hints to parameters is backwards compatible. Therefore, this is not considered a breaking change. * The mergeMessageFileList script now only works for extensions and skins supporting extension registration (using extension.json or skin.json). It will no longer attempt to load PHP entry points. * … == Compatibility == MediaWiki 1.41 requires PHP 7.4.3 or later and the following PHP extensions: * ctype * dom * fileinfo * iconv * intl * json * mbstring * xml MariaDB is the recommended database software. MySQL, PostgreSQL, or SQLite can be used instead, but support for them is somewhat less mature. The supported versions are: * MariaDB 10.3 or higher * MySQL 5.7.0 or higher * PostgreSQL 10 or later * SQLite 3.8.0 or later == Online documentation == Documentation for both end-users and site administrators is available on MediaWiki.org, and is covered under the GNU Free Documentation License (except for pages that explicitly state that their contents are in the public domain): https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation == Mailing list == A mailing list is available for MediaWiki user support and discussion: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l A low-traffic announcements-only list is also available: https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce It's highly recommended that you sign up for one of these lists if you're going to run a public MediaWiki, so you can be notified of security fixes. == IRC help == There's usually someone online in #mediawiki on irc.libera.chat.