3 == MediaWiki 1.37.0-rc.0 ==
5 THIS IS NOT A RELEASE YET
7 MediaWiki 1.37 is a pre-release testing branch, and is not recommended
10 == Upgrading notes for 1.37 ==
11 Don't forget to always back up your database before upgrading!
13 See the file UPGRADE for more detailed per-version upgrade instructions from the
14 oldest supported upgrading version, MediaWiki 1.27.
16 Some specific notes for MediaWiki 1.37 upgrades are below:
17 * (T280806) Deprecated methods of fetching API tokens have been removed. This
18 may cause older bots and scripts to fail. Most queries are trivially
19 updateable to using new methods. See the Action API changes section below
22 For notes on 1.36.x and older releases, see HISTORY.
24 === Configuration changes for system administrators in 1.37 ===
25 * (T242768) The PasswordCannotMatchUsername password policy has been removed,
26 please use PasswordCannotBeSubstringInUsername instead. If you have not
27 customised your password policies, there will be nothing to do here.
29 ==== New configuration ====
30 * $wgBrowserFormatDetection - This setting allows the enabling or disabling
31 of automatic detection of possible phone numbers in a webpage in iOS Safari.
32 * $wgParserEnableLegacyMediaDOM - This setting defaults to true, and enables
33 the legacy media HTML structure in the output from the Parser. The
34 alternative modern HTML structure for media is described at
35 https://www.mediawiki.org/wiki/Parsing/Media_structure
36 In a future release of MediaWiki this option will default to false,
37 so it's a good idea to test this setting on your wiki early and report
40 ==== Changed configuration ====
41 * $wgContentHandlerTextFallback - This migration setting, which defines how to
42 react if a plain text version of a non-text Content object is requested using
43 ContentHandler::getContentText(), is deprecated.
44 * $wgActions – This setting lets sysadmins over-ride which actions can be used.
45 It has been re-worked to support injecting dependencies into Action sub-
46 classes as part of wider work on dependency injection. Previously, $wgActions
47 was an array where the keys were the names of actions, and the values had the
48 following impacts (for a given key 'Foo'):
49 - `true`: use the class 'FooAction' unless for a specific page
50 WikiPage::getActionOverrides() wants to override that action
51 - a string: use the class with that name, and do not allow over-riding on a
53 - `false`: the action is disabled
54 - a callable: use the Action instance returned by invoking that callback, and
55 do not allow overriding on a per-page basis
56 - an object: use that specific Action instance, and do not allow overr-iding
58 As part of T253078, values can now be arrays that are not callables, which are
59 treated as ObjectFactory specs, allowing for services to be injected.
60 Additionally, the distinction between values that allow per-page overrides and
61 those that do not was removed - all actions can now be overridden on a per-
62 page basis using WikiPage::getActionOverrides().
63 * $wgShellboxUrl – This setting, new in 1.36 to configure the novel Shellbox
64 encapsulation system, is now deprecated; use $wgShellboxUrls as a mapping of
65 service => URL instead.
66 * $wgIncludejQueryMigrate – This setting, introduced in 1.29 to on whether to
67 provide a migration layer for jQuery, has now switched its default value from
68 true to false. This may break gadgets that depended on methods that were
69 removed in jQuery 3 in 2017. See T280944 for more information.
70 * A number of settings have been renamed. The former configuration variable
71 names are deprecated, but will be used as the fall back if they are still set,
72 and remain temporarily available for extensions which might try to read them:
73 - $wgFileBlacklist is now $wgProhibitedFileExtensions
74 - $wgMimeTypeBlacklist is now $wgMimeTypeExclusions
75 - $wgEnableUserEmailBlacklist is now $wgEnableUserEmailMuteList
76 - $wgShortPagesNamespaceBlacklist is now $wgShortPagesNamespaceExclusions
77 * $wgMimeTypeExclusions - As well as being renamed, this configuration array now
78 also prohibits the RFC 4329 form of JavaScript, 'application/javascript', as
79 well as previous MIME types.
80 * $wgFragmentMode - This setting, which determines the encoding of section IDs,
81 has now switched its default value from legacy-first to html5-first: both the
82 HTML5 anchor and the legacy percent-encoding-style anchor will still be
83 generated for section titles, but references to them will use the HTML5
84 version, resulting in human-readable fragments.
86 ==== Removed configuration ====
87 * $wgLegacyJavaScriptGlobals, deprecated in 1.36.
88 * (T274695) $wgAjaxEditStash, deprecated in 1.36.
89 * $wgShowDBErrorBacktrace, deprecated and non-functional since 1.32.
90 * $wgShowSQLErrors, deprecated and non-functional since 1.32.
91 * $wgLangObjCacheSize, without deprecation; the LanguageFactory service now
92 always retains at most 10 objects in its LRU-cache.
93 * $wgDjvuToXML, without deprecation; the tool it enables is obsolete and
94 abandoned upstream. Use $wgDjvuDump to use that tool instead.
96 === New user-facing features in 1.37 ===
97 * (T161934) MediaWiki now supports JPEG2000 files, to a limited extent.
99 === External library changes in 1.37 ===
101 ==== New external libraries ====
102 * Added symfony/polyfill-php80 1.23.1.
103 * Added whatwg-fetch 3.6.2.
104 * Added wikimedia/normalized-exception 1.0.1.
106 ==== Changed external libraries ====
107 * Updated OOjs from v5.0.0 to v6.0.0
108 * Updated OOjs-Router from v0.2.0 to v0.3.0
109 * Updated OOUI from v0.41.3 to v0.42.0
110 * Updated WVUI from v0.1.0 to v0.3.0
111 * Updated cssjanus/cssjanus from v1.3.0 to v2.1.0.
112 * Updated psr/container from v1.0.0 to v1.1.1.
113 * Updated wikimedia/minify from v2.2.2 to v2.2.4.
114 * Updated wikimedia/object-factory from v3.0.0 to v3.0.2.
115 * Updated wikimedia/parsoid from v0.13.1 to v0.14.0-a19.
116 * Updated wikimedia/relpath from v2.1.1 to v3.0.0.
117 * Updated wikimedia/remex-html from v2.3.1 to v2.3.2.
118 * Updated wikimedia/shellbox from v1.0.4 to v2.0.0.
119 * Updated wikimedia/wait-condition-loop from v2.0.1 to v2.0.2.
120 * Updated zordius/lightncandy from v1.2.5 to v1.2.6.
122 ===== Changed development-only external libraries =====
123 * Updated qunit from 2.10.0 to 2.16.0.
125 ==== Removed external libraries ====
126 * The pimple/pimple development-only library has been removed.
128 === Action API changes in 1.37 ===
129 * (T280806) The API methods for fetching tokens which were deprecated in
130 MediaWiki 1.24 have been removed. action=query&meta=tokens&type= should be
131 used instead. Please note some token types no longer exist, and you should
132 just use type=csrf for those instead.
133 - action=query&prop=info&intoken ->
134 action=query&meta=tokens&type=csrf
135 - action=tokens&type= ->
136 action=query&meta=tokens&type=
137 - action=query&list=recentchanges&rctoken ->
138 action=query&meta=tokens&type=csrf
139 - action=query&prop=revisions&rvtoken=rollback ->
140 action=query&meta=tokens&type=rollback
141 - action=query&meta=userinfo&uiprop=preferencestoken ->
142 action=query&meta=tokens&type=csrf
143 - action=query&list=users&ustoken=userrights ->
144 action=query&meta=tokens&type=userrights
146 === Languages updated in 1.37 ===
147 MediaWiki supports over 350 languages. Many localisations are updated regularly.
148 Below only new and removed languages are listed, as well as changes to languages
149 because of Phabricator reports.
151 * (T280435) LRM and RLM characters were removed from names of languages with
152 parentheses in Names.php
153 * (T283422) Add namespace name translations and change the autonym of
154 the Kinyarwanda language to "Ikinyarwanda".
155 * (T283423) Change the autonym of the Lombard language from "lumbaart"
157 * (T279619) Added language support for Dagbani (dag).
158 * (T282085) Added language support for Malay in Arabic (Jawi) script (ms-arab).
159 * (T283053) Added language support for Ojibwe (ojb).
160 * (T283480) Added language support for Wallisian (wls, Fakaʻuvea).
161 * (T284002) Added language support for Paiwan (pwn).
162 * (T284044) Added language support for Carpathian Romani (rmc).
163 * (T286460) Added language support for Gun (guw, Gungbe).
164 * (T287345) Added language support for Baoulé (bci).
165 * (T290126) Added language support for Kildin Sami (sjd).
166 * (T290408) Added language support for Pite Sami (sje).
167 * (T25216) Started the renaming of the language code for Norman from nrm to
170 === Breaking changes in 1.37 ===
171 * The Revision class, emitting deprecation warnings since 1.35, was removed
172 entirely. As part of this, the following hooks that included a Revision object
174 - ArticleRevisionUndeleted - use RevisionUndeleted
175 - ArticleRollbackComplete - use RollbackComplete
176 - DiffRevisionTools - use DiffTools
177 - DiffViewHeader - use DifferenceEngineViewHeader
178 - HistoryRevisionTools - use HistoryTools
179 - NewRevisionFromEditComplete - use RevisionFromEditComplete
180 - PageContentInsertComplete - use PageSaveComplete
181 - PageContentSaveComplete - use PageSaveComplete
182 - ParserFetchTemplate - use BeforeParserFetchTemplateRevisionRecord
183 - RevisionInsertComplete - use RevisionRecordInserted
184 - TitleMoveComplete - use PageMoveComplete
185 - TitleMoveCompleting - use PageMoveCompleting
186 - UndeleteShowRevision - no replacement
187 - UserRetrieveNewTalks - no replacement
188 … the following methods and variables have been removed:
189 - Article::$mRevision
190 - Article::getRevisionFetched()
191 - ContribsPager::tryToCreateValidRevision()
192 - EditPage::$mBaseRevision
193 - EditPage::getBaseRevision()
194 - LinksUpdate::getRevision()
195 - LinksUpdate::setRevision()
196 - PageArchive::getArchivedRevision()
197 - PageArchive::getPreviousRevision()
198 - PageArchive::getRevision()
199 - Parser::$mRevisionObject
200 - Parser::fetchCurrentRevisionOfTitle()
201 - Parser::getRevisionObject()
202 - Parser::statelessFetchRevision()
203 - ParserOptions::getCurrentRevisionCallback()
204 - ParserOptions::setCurrentRevisionCallback()
205 - Title::countAuthorsBetween()
206 - Title::getFirstRevision()
207 - User::getNewMessageLinks()
208 - User::getNewMessageRevisionId()
210 - WikiPage::getOldestRevision()
211 - WikiPage::getRevision()
212 - WikiPage::getUndoContent()
213 - WikiPage::updateIfNewerOn()
214 … and the following methods no longer accept Revision objects as parameters:
215 - CategoryMembershipChange::__construct()
216 - ContentHandler::getUndoContent()
217 - DerivedPageDataUpdater::prepareUpdate()
218 - DifferenceEngine::getRevisionHeader()
219 - Linker::buildRollbackLink()
220 - Linker::generateRollback()
221 - Linker::getRevDeleteLink()
222 - Linker::getRollbackEditCount()
223 - Linker::revComment()
224 - Linker::revUserLink()
225 - Linker::revUserTools()
226 - WikiPage::doDeleteUpdates()
227 - WikiPage::doEditUpdates()
228 - WikiPage::hasDifferencesOutsideMainSlot()
229 - WikiPage::onArticleEdit()
230 - WikiPage::prepareContentForEdit()
231 - WikiPage::updateRevisionOn()
232 The following methods return arrays that formerly included a 'revision'
233 key that would emit deprecation warnings when accessed and return a
234 Revision object. The Revision object has been removed from the arrays,
235 and the 'revision-record' key should be used to get the relevant
236 RevisionRecord instead:
237 - PageUpdater::doCreate()
238 - PageUpdater::doModify()
239 - Parser::statelessFetchTemplate()
240 - WikiPage::doEditContent()
241 Finally, the ParserOptions `templateCallback` option is a callback that is
242 called in Parser::fetchTemplateAndTitle() and should return an array - the
243 'revision' key to that array used to be a Revision object and was used if
244 no 'revision-record' was returned - is now ignored.
245 * Previously, the classes RevisionTestModifyableContent and
246 RevisionTestModifyableContentHandler were loaded for use in tests, but were
247 only used within the tests for the since-removed Revision class. This content
248 and content handler class were removed without deprecation.
249 * WANObjectCache::HOLDOFF_NONE, deprecated since 1.35, was removed. Use
250 WANObjectCache::HOLDOFF_TTL_NONE instead.
251 * Calling ResourceLoader::makeVersionQuery() without $modules parameter,
252 deprecated since MediaWiki 1.34, is no longer supported.
253 * LocalFile::recordUpload2(), deprecated since 1.35, was removed.
254 * The following methods and fields in the Language class, deprecated since 1.35,
259 - ::findVariantLink()
261 - ::updateConversionTable()
262 * The following methods in the Parser class have been removed after having been
266 * (T273354) When an edit is prevented by an 'EditFilterMergedContent' hook
267 handler without changing the status, the edit form will now be displayed.
268 * User::clearNotification() which had been deprecated in 1.35 has been removed.
269 Use WatchlistManager::clearTitleUserNotification() instead.
270 * User::getNewtalk() which had been deprecated in 1.35 has been removed. Use
271 TalkPageNotificationManager::userHasNewMessages() instead.
272 * The Autopromote class, deprecated since 1.35, was removed. Use
273 UserGroupManager instead.
274 * The CachedAction, SpecialCachedPage, CacheHelper, and ICacheHelper classes,
275 all emitting deprecation warnings since 1.36, have been removed.
276 * The hooks BeforeHttpsRedirect, CanIPUseHTTPS and UserRequiresHTTPS, deprecated
277 in 1.35, were removed.
278 * The TitleArrayFromResult hook, deprecated in 1.36, was removed.
279 * The deprecated "es6-promise" alias ResourceLoader module has been removed. Use
280 the "es6-polyfills" module directly intead.
281 * The deprecated "mediawiki.legacy.protect" ResourceLoader module, deprecated
282 since 1.36, has been removed. Use "mediawiki.action.protect" instead.
283 * The JavaScript alias $j for references to jQuery, deprecated since 1.23, has
284 been removed. Use $ instead.
285 * The AuthenticationProvider interface and the SessionProvider class no longer
286 extend the PSR LoggerAwareInterface concept, so they can't be typehinted as
287 LoggerAwareInterface.
288 * User::getGrantName(), emitting deprecation warnings since 1.36, has been
289 removed. Use MWGrants::grantName() instead.
290 * The following ApiBase methods, deprecated since 1.35, have been removed:
291 - ApiBase::explodeMultiValue
292 - ApiBase::parseMultiValue
293 - ApiBase::validateLimit
294 - ApiBase::validateTimestamp
295 * The User::idCacheByName() public static field was removed without deprecation.
296 Instead of using it, get a UserIdentity by name from the UserIdentityLookup
298 * IDatabase::upsert() and IDatabase::replace() now only accept a single unique
299 key. Previously, a warning was issued if there were multiple unique keys
301 * The MediaWiki:Autoblock_whitelist block exemption control was moved in 1.36 to
302 MediaWiki:Block-autoblock-exemptionlist. The backward-compatibility of reading
303 the old MediaWiki:Autoblock_whitelist page has now been dropped.
304 * The following overridable methods in File hierarchy have changed signatures:
305 - File::deleteFile() - now accepts UserIdentity instead of User
306 - File::getDescription() - now accepts Authority instead of User
307 - File::userCan() - now accepts Authority instead of User
308 - LocalFile::deleteOldFile() - now accepts UserIdentity instead of User
309 * The following global methods, each deprecated since 1.36, have been removed:
310 - wfAppendToArrayIfNotDefault()
312 - wfConfiguredReadOnlyReason()
314 - wfGetPrecompiledData()
316 * The following deprecated methods of the Title class have been removed:
317 - ::nameOf(), deprecated in 1.36
318 - ::getPreviousRevisionID(), deprecated in 1.34
319 - ::getNextRevisionID(), deprecated in 1.34
320 - ::getEarliestRevTime(), deprecated in 1.35
321 * UploadBase::stashFile(), deprecated since 1.28, was removed.
322 * wfGetRusage(), deprecated since 1.35, has been removed.
323 * The following CLI options were removed from tests/phpunit.php:
327 The following options (inherited from Maintenance) were also removed:
336 The following options were changed to environment variables:
337 - wiki => PHPUNIT_WIKI
338 - use-normal-tables => PHPUNIT_USE_NORMAL_TABLES
339 - use-filebackend => PHPUNIT_USE_FILEBACKEND
340 - use-bagostuff => PHPUNIT_USE_BAGOSTUFF
341 - use-jobqueue => PHPUNIT_USE_JOBQUEUE
342 This is so that we can use the default PHPUnit entry point (T90875).
343 * The PHPUNIT_REUSE_DB / --reuse-db option was removed from the phpunit.php
344 runner. It had been broken for at least three years already. The original use
345 case was speeding up tests on Oracle, but Oracle support was dropped several
347 * The MediaWikiPHPUnitTest__endTestHook and MediaWikiPHPUnitTest__startTestHook
348 PHPUnit hooks were removed. MediaWikiHooksPHPUnitExtension was also removed.
349 * EntryPoint::getTextFormatters() was made private without a deprecation period;
350 it had no known external callers.
351 * DatabaseBlock::chooseBlock(), deprecated since 1.35, was removed.
352 * SpecialPageFactory::getRestrictedPages(), deprecated since 1.36, was removed.
353 * SpecialBlock::validateTarget(), deprecated since 1.36, was removed.
354 * The PatchFileLocation trait was removed without deprecation.
355 * ActorMigrationBase::getExistingActorId() and ::getNewActorId(), emitting
356 deprecation warnings since 1.36, were removed.
357 * Hook handlers implementing the MediaWikiServicesHook hook are now prohibited
358 from having services injected. This is because by definition, this hook runs
359 before the service container is fully initialized.
360 * The protected property LocalFile::$metadata was removed without deprecation.
361 * WatchedItem::getUser(), emitting deprecation warnings since 1.36, has been
363 * AuthManager::singleton(), emitting deprecation warnings since 1.36, has been
365 * The AugmentPageProps class was removed without deprecation. It had no known
367 * Html::infobox(), deprecated since 1.36, was removed.
368 * ParserOptions::__construct() now requires that the first parameter is a
369 UserIdentity object - passing `null` used to fallback to the global
370 $wgUser but was deprecated since 1.36.
371 * ParserOptions::newCanonical() no longer supports the first parameter being
372 null (or omitted entirely), which would fallback to the global $wgUser but
373 was deprecated since 1.35.
374 * The SkinTemplatePreventOtherActiveTabs hook, deprecated in 1.35, was removed
376 * The SkinTemplateTabAction hook, deprecated in 1.35, was removed entirely.
377 * The SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook, deprecated in 1.35,
378 was removed entirely.
379 * The SkinTemplateToolboxEndHook, deprecated in 1.35, was removed entirely.
380 * The following methods of RevisionStore class, formerly emitting deprecation
381 warnings, were removed:
382 - ::newMutableRevisionFromArray()
383 - ::loadRevisionFromPageId()
384 - ::loadRevisionFromTitle()
385 - ::loadRevisionFromTimestamp()
386 - ::listRevisionSizes()
387 * LogEntry::getPerformer(), deprecated since 1.36, was removed along with
388 methods in sub-classes: DatabaseLogEntry, ManualLogEntry, RCDatabaseLogEntry.
389 * Skin::getRelevantUser() now returns an instance of UserIdentity, and not
390 necessarily a User object. There is no known usages in MediaWiki ecosystem
391 that were not satisfied with UserIdentity.
392 * Direct construction of MergeHistory class, deprecated since 1.35, is no longer
393 supported. Use MergeHistoryFactory instead. MergeHistory::checkPermissions,
394 deprecated since 1.36, was removed.
395 * Skin::generateDebugHTML(), deprecated since 1.35, was removed. Call
396 MWDebug::getHTMLDebugLog() directly.
397 * The ApiTestCase class no longer interacts with the global $wgUser.
398 Previously, the global variable was set at the start of each test, and in
399 ApiTestCase::doApiRequest() if a performer was specified $wgUser was
400 updated to match, and if no performer was specified $wgUser was used
401 instead. Now, $wgUser is not updated, and if no performer is specified
402 the reusable TestUser object for the sysop is relied on. Extensions
403 or skins that rely on the global $wgUser variable (which has been
404 deprecated since 1.35) should instead retrieve the acting user from the
405 relevant context source.
406 * SkinTemplate::makeArticleUrlDetails(), deprecated since 1.35, was removed.
407 * Skin::makeNSUrl(), deprecated since 1.35, was removed.
408 * Skin::getRevisionId(), deprecated since 1.34, was removed. Use
409 OutputPage::getRevisionId() instead.
410 * Skin::isRevisionCurrent(), deprecated since 1.34, was removed. Use
411 OutputPage::isRevisionCurrent() instead.
412 * AbstractBlock::parseTarget(), deprecated since 1.36, was removed.
413 * The ArticleEditUpdates hook, deprecated since 1.35, was removed.
414 * The `@stable to extend` class CentralIdLookup has following changes:
415 - The protected ::checkAudience() method now returns an Authority instead of a
417 - A number of its `@stable to override` methods now accept an Authority
418 instead of a User instance as the $audience parameter.
419 - A number of methods now accept a UserIdentity instead of their User
421 - The ::localUserFromCentralId() method now returns UserIdentity and not
422 necessarily a User object.
423 All extensions that extend this class or use this method were updated to be
424 ready to the new behavior.
425 * WatchedItemStoreInterface::enqueueWatchlistExpiryJob(), deprecated since 1.36,
427 * ResultWrapper is now abstract. It cannot be directly constructed (T286694).
428 * The SecondaryDataUpdates hook, deprecated in 1.32, was removed entirely.
429 * Content::getDeletionUpdates(), was removed. Use
430 ContentHandler::getDeletionUpdates() instead.
431 * Content::getSecondaryDataUpdates(), was removed. Use
432 ContentHandler::getSecondaryDataUpdates() instead.
433 * wfDiff(), deprecated since 1.25, has been removed.
434 * Language::$mLangObjCache, deprecated since 1.35, was removed.
435 * Language::$transformData, deprecated since 1.35, was removed.
436 * Language::transformUsingPairFile() was marked @internal. Its deprecated
437 parameters are no longer supported.
438 * SpecialMute::getTarget(), unused outside of the SpecialMute class, was
440 * The Skin::setupSkinUserCss() method, deprecated in 1.32, was removed. Please
441 use skin registration instead.
442 * The ResourceLoaderSkinModule `legacy`, `content` and `content-thumbnails`
443 features were deprecated. Skins should instead select from the features
444 listed on [[mw:Manual:ResourceLoaderSkinModule]].
445 * ParserCache::getKey() and ::getEtag(), deprecated since 1.36, were removed.
446 * The BaseTemplateToolbox hook, deprecated since 1.35, was removed.
447 * Previously a capitalize-all-nouns class was added to the body element of
448 languages where nouns must be capitalized. This class is no longer added to
449 the body tag and must be provided by skins.
450 * The SkinTemplateOutputPageBeforeExec hook, deprecated since 1.35, was removed.
451 * Calling Message::toString() without a parameter, which triggered deprecation
452 warnings since 1.36, is no longer supported. You can instead use the explicit
453 formatting methods directly, such as Message::text() and Message::escaped().
454 * Article::getContentObject(), deprecated since 1.32, was removed.
455 * Article::delete(), Article::confirmDelete() and ImagePage::delete() were
456 removed. The logic responsible for building the form is being
457 moved to DeleteAction, while the actual deletion logic will be moved to a
459 * WikiImporter::debugRevisionHandler(), unused and for debug only, was removed.
460 * Content::preloadTransform() now emits deprecation warnings. Instead, please
461 use ContentTransformer::preloadTransform(). Extensions defining a content
462 model should override ContentHandler::preloadTransform().
463 * Content::preSaveTransform() now emits deprecation warnings. Instead, please
464 use ContentTransformer::preSaveTransform() instead. Extensions defining
465 a content model should override ContentHandler::preSaveTransform().
466 * Constructing WikiPage objects from Title instances that cannot exist, emitting
467 deprecation warnings since 1.36, now throws an exception. Additionally,
468 WikiPage now implements ProperPageIdentity, rather than just PageIdentity.
469 * The Skin::bottomScripts() method is deprecated. Please instead use
470 OutputPage::getBottomScripts().
471 * LinksUpdate::getTriggeringUser() now returns ?UserIdentity instead of ?User.
472 * The LESS mixin `.box-shadow()` (from mediawiki.mixins.less), deprecated since
473 1.36, was removed. Use CSS property `box-shadow` unprefixed for all basic
474 supported browsers instead.
475 * The LESS mixin `.flex()` now no longer tries to support the 2009 version of
476 the Flexbox specification; support for the 2012 and modern standard versions
478 * The StorageAwareness::ATTR_SYNCWRITES, StorageAwareness::QOS_SYNCWRITES_*,
479 StorageAwareness::ATTR_LOCALITY, and StorageAwareness::QOS_LOCALITY_*
480 constants were removed.
482 === Deprecations in 1.37 ===
483 * JobQueue::getWiki(), deprecated in 1.33, now emits deprecation warnings.
484 * AbstractBlock::getTargetAndType() and ::getTarget() now emit deprecation
485 warnings. Use ::getTargetName() and ::getTargetUserIdentity() together with
487 * Passing a UserIdentity to WatchlistManager::clearAllUserNotifications() and
488 WatchlistManager::clearTitleUserNotifications() is now deprecated. Pass an
490 * Passing LinkTarget to WatchlistManager::clearTitleUserNotifications() and
491 WatchlistManager::getTitleNotificationTimestamp(). Pass PageIdentity instead.
492 * The User class methods ::isWatched(), ::isTempWatched(), ::removeWatch(), and
493 ::addWatch() have been deprecated. Use corresponding methods in
494 WatchlistManager instead.
495 * Multiple WatchAction methods have been deprecated in lieu of WatchlistManager:
496 - ::doWatchOrUnwatch() use WatchlistManager::setWatch()
497 - ::doWatch() -> WatchlistManager::addWatch()
498 - ::doUnwatch() -> WatchlistManager::removeWatch()
499 * WatchAction::getWatchToken() now emits deprecation warnings. Instead use
500 CsrfTokenSet::getToken().
501 * Action::getHookContainer() has been marked as internal. Actions that require
502 access to a hook container should have one injected instead.
503 * The ::getTitle() and ::setTitle() methods in Parser have been deprecated.
504 Use ::getPage() and ::setPage() instead.
505 * Title::isWatchable() has been deprecated. Use WatchlistManager::isWatchable()
507 * Methods and classes related to the primary database, previously referred to as
508 'master', have been deprecated, with the new ones replacing them as follows:
509 - The DBMasterPos and MySQLMasterPos classes have been respectively renamed to
510 DBPrimaryPos and MySQLPrimaryPos.
511 - LocalRepo::getMasterDB() -> ::getPrimaryDB()
512 - ForeignDBRepo::getMasterDB() -> ::getPrimaryDB()
513 - JobQueueDB::getMasterDB() -> ::getPrimaryDB()
514 - ForeignDBViaLBRepo::getMasterDB() -> ::getPrimaryDB()
515 - DBFileJournal::getMasterDB() -> ::getPrimaryDB()
516 - ILoadBalancer::getMasterPos() -> ::getPrimaryPos()
517 - IDatabase::getMasterPos() -> ::getPrimaryPos()
518 - ILoadBalancer::finalizeMasterChanges() -> ::finalizePrimaryChanges()
519 - ILoadBalancer::approveMasterChanges() -> ::approvePrimaryChanges()
520 - ILoadBalancer::beginMasterChanges() -> ::beginPrimaryChanges()
521 - ILBFactory::beginMasterChanges() -> ::beginPrimaryChanges()
522 - ILoadBalancer::commitMasterChanges() -> ::commitPrimaryChanges()
523 - ILBFactory::commitMasterChanges() -> ::commitPrimaryChanges()
524 - IDatabase::getTopologyRootMaster() -> ::getTopologyRootPrimary()
525 - IDatabase::masterPosWait() -> ::primaryPosWait()
526 - ILoadBalancer::runMasterTransactionIdleCallbacks() ->
527 ::runPrimaryTransactionIdleCallbacks()
528 - ILoadBalancer::runMasterTransactionListenerCallbacks() ->
529 ::runPrimaryTransactionListenerCallbacks()
530 - ILoadBalancer::rollbackMasterChanges() -> ::rollbackPrimaryChanges()
531 - ILBFactory::rollbackMasterChanges() -> ::rollbackPrimaryChanges()
532 - ILoadBalancer::flushMasterSnapshots() -> ::flushPrimarySnapshots()
533 - ILoadBalancer::hasMasterConnection() -> ::hasPrimaryConnection()
534 - ILoadBalancer::hasMasterChanges() -> ::hasPrimaryChanges()
535 - ILBFactory::hasMasterChanges() -> ::hasPrimaryChanges()
536 - ILoadBalancer::lastMasterChangeTimestamp() -> ::lastPrimaryChangeTimestamp()
537 - ILoadBalancer::hasOrMadeRecentMasterChanges() ->
538 ::hasOrMadeRecentPrimaryChanges()
539 - ILBFactory::hasOrMadeRecentMasterChanges() ->
540 ::hasOrMadeRecentPrimaryChanges()
541 - ILoadBalancer::pendingMasterChangeCallers() ->
542 ::pendingPrimaryChangeCallers()
543 - ILoadBalancer::forEachOpenMasterConnection() ->
544 ::forEachOpenPrimaryConnection()
545 - ILoadBalancer::waitForMasterPos() -> ::waitForPrimaryPos()
546 - Database::assertIsWritableMaster() -> ::assertIsWritablePrimary()
547 - RevDelList::reloadFromMaster() -> ::reloadFromPrimary()
548 - ExternalStoreDB::getMaster() -> ::getPrimary()
549 - DatabaseMysqlBase::getMasterServerInfo() -> ::getPrimaryServerInfo()
550 - MWExceptionHandler::rollbackMasterChangesAndLog() ->
551 ::rollbackPrimaryChangesAndLog()
552 * wfGetLB(), deprecated since 1.27, now emits deprecation warnings.
553 * wfLocalFile(), deprecated since 1.34, now emits deprecation warnings.
554 * wfFindFile(), deprecated since 1.34, now emits deprecation warnings.
555 * wfIncrStats(), deprecated in 1.36, now emits deprecation warnings.
556 * wfCanIPUseHTTPS() is now deprecated, and always returns true.
557 * The UserLoadFromDatabase hook has been deprecated. It had no known uses.
558 * The following methods in ApiPageSet have been deprecated:
559 - ::getTitles(), use ::getTargets() instead.
560 - ::getGoodTitles(), use ::getGoodPages() instead.
561 - ::getMissingTitles(), use ::getMissingPages() instead.
562 - ::getGoodAndMissingTitles(), use ::getGoodAndMissingPages() instead.
563 - ::getRedirectTitles(), use ::getRedirectTargets() instead.
564 - ::getSpecialTitles(), use ::getSpecialPages() instead.
565 * The following methods from the User class, deprecated in 1.35, now each emit
566 deprecation warnings:
570 - ::isCreatableName()
571 - ::getCanonicalName()
572 - ::addAutopromoteOnceGroups()
573 - ::getEffectiveGroups()
574 - ::getAutomaticGroups()
575 - ::getFormerGroups()
578 * The following methods in User were deprecated:
579 - ::idFromName() - use UserIdentityLookup::getUserIdentityByName() instead.
580 - ::resetIdByNameCache() - in tests, reset service container. No replacement
581 needed in production code.
582 * Use of ActorMigration for any table except revision, deprecated in 1.34, now
583 emits deprecation warnings. Instead of getInsertValues(), use
584 ActorNormalization::acquireActorId(). Instead of getWhere() and getJoin(),
585 do your own join on the actor table.
586 * DatabasePostgres::remappedTableName() and its dependent constructor parameter
587 'keywordTableMap' are deprecated. Reserved identifiers that are used as table
588 names should be quoted where necessary.
589 * LinkCache::singleton(), deprecated since 1.28, now emits deprecation warnings.
590 * MessageCache::singleton(), deprecated since 1.34, now emits deprecation
592 * LockManagerGroup::singleton() and ::destroySingletons(), deprecated since
593 1.34, now emit deprecation warnings.
594 * HtmlFileCacheUpdate::newFromTitles() is now deprecated and emitting warnings.
595 Use newFromPages() instead.
596 * SessionProvider ::setLogger(), ::setManager(), ::setConfig(), and
597 ::setHookContainer() were deprecated. Use ::init() to inject dependencies, or
598 override ::postInitSetup() to do any custom post-initialization configuration.
599 * AbstractAuthenticationProvider ::setLogger(), ::setManager(), ::setConfig(),
600 and ::setHookContainer() now emit deprecation warnings. Use ::init() to inject
601 dependencies, or override ::postInitSetup() to do any custom post-
602 initialization configuration.
603 * User::isLoggedIn(), deprecated since 1.36, now emits deprecation warnings. Use
604 the method it wraps, User::isRegistered(), instead.
605 * FileBackendGroup::singleton() and ::destroySingletons(), deprecated since
606 1.35, now emit deprecation warnings.
607 * The first parameter of User::getBlock() should now be an integer using the
608 Authority::FOR_XXX constants. Providing a boolean is deprecated.
609 * ApiBase::addBlockInfoToStatus() is deprecated for use by extensions. It is now
610 marked as @internal and may be deleted in the future.
611 It should not be necessary to call this method, Authority should be providing
612 all relevant information via a PermissionStatus object.
613 * JobQueueGroup::singleton() was deprecated - use
614 MediaWikiServices::getJobQueueGroup() instead.
615 * JobQueueGroup::destroySingletons() was deprecated. JobQueueGroups are now
616 automatically destroyed after tests.
617 * LinkCache::addGoodLinkObj() has been deprecated, since it is prone to
618 corrupting the cache with invalid information. Use addGoodLinkObjFromRow()
619 instead. PHPUnit tests must use LinkCacheTestTrait::addGoodLinkObject().
620 * ContentHandler::getContentText() is now deprecated. Use Content::getText()
622 * LinkCache::addLinkObj() has been deprecated, use PageStore::getPageForLink()
624 * MediaWiki\User\UserNamePrefixSearch::search() previously accepted as its first
625 parameter either the string 'public' or a UserIdentity object, to filter
626 results for. It now expects an Authority object instead of UserIdentity, and
627 providing just a UserIdentity will now trigger a deprecation warning.
628 * User::getRights(), deprecated since 1.34, now emits deprecation warnings.
629 * User::changeableGroups() and ::changeableByGroup() now emit deprecation
630 warnings, use corresponding methods in UserGroupManager instead.
631 * User::incEditCount() was deprecated in favor of the new method
632 UserEditTracker::incrementUserEditCount().
633 * RepoGroup::singleton(), ::destroySingleton() and ::setSingleton(), deprecated
634 since 1.34, now emit deprecation warnings.
635 * RecentChange::getPerformer(), deprecated since 1.36, now emits deprecation
636 warnings. Use ::getPerformerIdentity() instead.
637 * ContentHandler::cleanupHandlersCache(), deprecated since 1.35, now emits
638 deprecation warnings.
639 * Category::getTitle() was deprecated in favor of Category::getPage()
640 * File::getUser() method now emits deprecation warnings, along with its over-
641 rides in LocalFile and ForeignApiFile in favor of ::getUploader().
642 * SpecialBlock::checkUnblockSelf(), deprecated in 1.36, now emits deprecation
644 * (T284179) The mediawiki.viewport ResourceLoader module is deprecated. You can
645 now just use MutationObserver or InterSectionObserver directly, which are
646 widely available in all supported JavaScript browsers.
647 * The following constructor options of DatabaseBlock class will now trigger
648 deprecation warnings:
649 - the 'byText' property with blocker's name,
650 - the 'by' property with blocker's ID,
651 For both of these, use the 'by' property with UserIdentity value instead.
652 * The BeforeResetNotificationTimestamp hook was deprecated.
653 * ArchivedFile::getUser() ::getRawUser() ::getRawUserText() were deprecated in
654 favor of ::getUploader.() ::getRawDescription() was deprecated in favor of
655 ::getDescription() with RAW audience parameter.
656 * When calling LocalFile::newFromRow() or LocalFile::loadFromRow(), passing
657 extra fields not requested by ::getQueryInfo() will now trigger deprecation
658 warnings. This is to warn callers that deprefixing and automatic assignment of
659 such fields will not be done in a future version.
660 * JobSpecification::getTitle() was deprecated without providing a replacement.
661 It wasn't used and job given the purpose of JobSpecification class it is not
663 * The protected method File::getImageSize() is now deprecated.
664 * BacklinkCache::get() was deprecated, use
665 BacklinkCacheFactory::getBacklinkCache() instead.
666 * Title::getBacklinkCache() now emits deprecation warnings. Instead, use the
667 ::getBacklinkCache() method in the BacklinkCacheFactory service.
668 * MediaHandler::getImageSize(), ::getMetadata(), and ::isMetadataValid() were
669 deprecated and should no longer be overridden. Instead, sub-classes should
670 override getSizeAndMetadata().
671 * Deprecated File::getMetadata(). Instead use ::getMetadataArray(),
672 ::getMetadataItem() and ::getMetadataItems().
673 * Message::title() has been deprecated; use Message::page() instead.
674 * BaseTemplate::getAfterPortlet(), BaseTemplate::renderAfterPortlet(), and the
675 BaseTemplateAfterPortlet hook, which were deprecated in 1.35,
676 now emit deprecation warnings.
677 * The LocalFile::getHistory() hook is deprecated.
678 * Calling WikiPage::prepareContentForEdit() without a UserIdentity is now
680 * User::getEditTokenObject(), ::getEditToken(), and ::matchEditToken() were each
681 deprecated. Use CsrfTokenRepository, which is available via IContextSource,
682 instead. ::matchEditTokenNoSuffix() was deprecated without replacement.
683 It was introduced to be able to provide custom error message if the token
684 was submitted, but ending slashes were stripped by some ASCII mangling proxy.
685 Use ::matchToken() instead, such proxies are much less common now and there's
686 not much benefit in customising the error message.
687 * ContentHandler::getForTitle(), deprecated since 1.35, now emits deprecation
689 * User::listOptionKinds(), deprecated since 1.35, now emits deprecation
691 * WikiPage::doEditContent(), deprecated since 1.32, now emits deprecation
693 * CentralIdLookup::factory() and ::factoryNonLocal() now emit deprecation
694 warnings; obtain an instance from MediaWikiServices instead.
695 * The class RandomPage was renamed to SpecialRandomPage. The class RandomPage
697 * BotPassword::invalidateAllPasswordsForCentralId() was deprecated.
698 * BotPassword::removeAllPasswordsForCentralId() was deprecated.
699 * The Title class members: $mTextform, $mUrlform, $mDbkeyform, $mNamespace,
700 $mInterwiki, and $mFragment have been deprecated to not be used directly.
701 Instead, their corresponding accessor methods should be used.
702 * IDatabase::fetchObject(), ::fetchRow(), ::numRows(), ::numFields(),
703 ::fieldName(), ::freeResult() and ::dataSeek() are deprecated. Use the
704 corresponding methods in IResultWrapper instead.
705 * ResultWrapper::unwrap(), DatabaseMysqlBase::fieldType() and
706 DatabasePostgres::fieldType() each now emit deprecation warnings.
707 * Sub-classes implementing Database::doQuery() should return either boolean or
708 an IResultWrapper. To do otherwise will now trigger a deprecation warning.
709 * User::getOptionKinds() and ::resetOptions(), both deprecated since 1.35,
710 now emit deprecation warnings.
711 * The following methods in MWNamespace, all deprecated since 1.34, now emit
712 deprecation warnings:
720 - ::hasTalkNamespace()
723 - ::getSubjectNamespaces()
724 - ::getTalkNamespaces()
726 - ::hasGenderDistinction()
727 - ::isNonincludable()
728 - ::getNamespaceContentModel()
729 - ::getRestrictionLevels()
730 - ::getCategoryLinkType()
731 * LogFormatter::styleRestricedElement() has been deprecated in favor of
732 LogFormatter::styleRestrictedElement()
733 * The following hooks related to user preferences were deprecated:
734 - UserLoadOptions: use LoadUserOptions instead.
735 - UserSaveOptions: use SaveUserOptions instead.
736 - UserResetAllOptions: no replacement was provided, the hook is not used.
737 * Title::isNamespaceProtected(), deprecated in 1.34, now emits deprecation
739 * UserSelectQueryBuilder::userIds(), ::userNames(), and ::userNamePrefix() has
740 been deprecated in favor of ::whereUserIds(), ::whereUserNames(), and
741 ::whereUserNamePrefix().
742 * Manually constructing a MovePage object, deprecated in 1.34, now emits
743 deprecation warnings. Use MovePageFactory instead.
744 * The following deletion-related methods were deprecated:
745 - WikiPage::doDeleteArticleReal() (soft) - use DeletePage
746 - WikiPage::doDeleteArticleBatched() (soft) - no replacement
747 - WikiPage::isBatchedDelete() (soft) - use DeletePage
748 - WikiPage::doDeleteUpdates() (hard) - no replacement
749 - WikiPage::getDeletionUpdates() (hard) - no replacement
750 - Title::isBigDeletion (soft) - no replacement
751 * Relying on PermissionManager or Authority to check for big deletions
752 was deprecated. This is now automatically checked if you use
753 DeletePage::deleteIfAllowed(). (T288759)
754 * The userCan hook now emits deprecation warnings. Use the
755 getUserPermissionsErrors or getUserPermissionsErrorsExpensive hooks instead.
756 * Parser::$mUser public access, and the methods ParserOptions::getUser() and
757 Parser::getUser() each now emit deprecation warnings.
758 * The following methods in the Title class have been deprecated in favor of the
759 corresponding methods in the new RestrictionStore service (with different
760 names where indicated):
761 - ::areCascadeProtectionSourcesLoaded()
762 - ::areRestrictionsCascading()
763 - ::areRestrictionsLoaded()
764 - ::getAllRestrictions()
765 - ::getCascadeProtectionSources()
766 - ::getFilteredRestrictionTypes()
767 -> ::listAllRestrictionTypes()
768 - ::getRestrictionExpiry()
769 - ::getRestrictionTypes()
770 -> ::listApplicableRestrictionTypes()
771 - ::getRestrictions()
772 - ::isCascadeProtected()
774 - ::isSemiProtected()
775 - ::loadRestrictionsFromRows()
776 * The following Title methods have been deprecated with no direct public
778 - ::deleteTitleProtection()
779 - ::getTitleProtection()
780 - ::flushRestrictions()
781 - ::loadRestrictions()
782 * User::isAllowUsertalk() now emits deprecation warnings. Use User::getBlock()
783 and AbstractBlock::isUsertalkEditAllowed() instead.
784 * Classes used by Preprocessor_DOM have been merged with classes used by
785 Preprocessor_Hash, as Preprocessor_DOM was removed in 1.35.
786 - PPDPart has been merged into PPDPart_Hash
787 - PPDStack has been merged into PPDStack_Hash
788 - PPDStackElement has been merged into PPDStackElement_Hash
789 * By default, the global variable $wgUser is now an instance of the new class
790 StubGlobalUser rather than User, and the first time it is used it will emit
791 deprecation warnings (the $wgUser variable was deprecated in 1.35). For
792 extensions that read from this variable, please use a relevant ContextSource
793 instead, falling back to RequestContext::getMain() if none is available.
794 * Collation::singleton() and ::factory() were deprecated; obtain an instance of
795 the CollationFactory from MediaWikiServices instead.
796 * Title::getDefaultNamespace() has been deprecated to be removed because there
797 are no known callers/consumers.
798 * With removal of the stub threshold feature, the following methods now emit
799 deprecation warnings:
800 - LinkRenderer::setStubThreshold() and ::getStubThreshold() - no replacement.
801 - LinkRendererFactory::createForUser() - calling ::create() is now sufficient
802 - ParserOptions::setStubThreshold() and ::getStubThreshold() - no replacement.
803 - User::getStubThreshold() - no replacement.
804 * The ArticleDelete and ArticleDeleteComplete hooks were deprecated. Use
805 PageDelete and PageDeleteComplete instead.
806 * The ArticleUndeleteLogEntry hook was deprecated without replacement.
807 * The following LESS mediawiki.mixins have been deprecated:
810 - .transform-origin()
812 - .transition-transform()
813 * The `UndeleteForm::undelete` hook was deprecated. A new hook was
814 introduced, `PageUndelete`, that provides handlers with more information and
815 is also called for non-UI requests. The capability of replacing the
816 PageArchive object has been removed, as that violates the laws of nature.
818 === Other changes in 1.37 ===
819 * WatchlistManager::addWatch() and WatchlistManager::addWatchIgnoringRights(),
820 which replace User::addWatch(), now call the WatchArticle and
821 WatchArticleComplete hooks.
822 * WatchlistManager::removeWatch() and
823 WatchlistManager::removeWatchIgnoringRights(), which replace
824 User::removeWatch(), now call the UnwatchArticle and UnwatchArticleComplete
826 * The overridable postInitSetup() method was added to the
827 AbstractAuthenticationProvider class. A provider can override postInitSetup()
828 to do any custom post-initialization configuration.
829 * The overridable postInitSetup() method was added to the SessionProvider
830 class. A provider can override postInitSetup() to do any custom
831 post-initialization configuration.
832 * The protected getConfig() method was added to the SessionProvider class.
833 Use SessionProvider::getConfig() to get a config.
834 * The DBAccessBase class is deprecated. Classes that used to extend it
835 should get a load balancer (factory) injected in the constructor instead.
836 * ActorNormalization::acquireActorId() now requires IDatabase parameter.
837 Not providing one emitted deprecation warnings since 1.36.
838 * Anti-lock constants ALF_PRELOAD_LINK, ALF_NO_BLOCK_LOCK, ALF_NO_LINK_LOCK
839 and ALF_PRELOAD_EXISTENCE have been removed. They're unused since 1.25.
840 * (T278036) CSS class 'mw-htmlform-field-autoinfuse' used by some forms has been
841 renamed to 'mw-htmlform-autoinfuse'.
842 * User::newFromRow() does not accept pre-loaded user preferences under
843 $data['user_properties'] anymore. This optimization was not used.
844 * The following files change the letter case of the file names:
845 - SpecialRandompage.php -> SpecialRandomPage.php
846 - SpecialRandomredirect.php -> SpecialRandomRedirect.php
847 - SpecialRandomrootpage.php -> SpecialRandomRootPage.php
848 * Media files which are uploaded server side using the importImages.php
849 maintenance script will now have the "mw-server-side-upload" change tag.
850 * (T284917) The stub threshold feature has been removed.
851 * Skin::getPoweredBy() and Skin::getCopyrightIcon() have been deprecated as they
852 are only designed for use by skins extended BaseTemplate. You can move calls
853 to instead use BaseTemplate::getPoweredByHTML() and ::getCopyrightIconHTML()
855 * The SkinGetPoweredBy hook is deprecated. No replacement is provided.
856 * HTMLTitleTextField didn't support interwiki titles well previously.
857 Starting with 1.37, HTMLTitleTextField has a new parameter, 'interwiki',
858 which can be used to control acceptance of interwiki titles. To provide
859 a transitional period, the default value ('interwiki' => null) ensures
860 MW will have the same behavior as before (logging a deprecation warning).
861 In 1.38, the default behavior will change to "interwiki links aren't allowed".
865 MediaWiki 1.37 requires PHP 7.3.19 or later and the following PHP extensions:
876 MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used,
877 but support for them is somewhat less mature.
879 The supported versions are:
881 * MySQL 5.5.8 or later
882 * PostgreSQL 9.4 or later
883 * SQLite 3.8.0 or later
885 == Online documentation ==
886 Documentation for both end-users and site administrators is available on
887 MediaWiki.org, and is covered under the GNU Free Documentation License (except
888 for pages that explicitly state that their contents are in the public domain):
890 https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
893 A mailing list is available for MediaWiki user support and discussion:
895 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
897 A low-traffic announcements-only list is also available:
899 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
901 It's highly recommended that you sign up for one of these lists if you're
902 going to run a public MediaWiki, so you can be notified of security fixes.
905 There's usually someone online in #mediawiki on irc.libera.chat.