Rearrange code in User::getBlockedStatus to avoid isAllowed calls
[lhc/web/wiklou.git] / RELEASE-NOTES-1.31
1 == MediaWiki 1.31.2 ==
2
3 THIS IS NOT A RELEASE YET
4
5 === Changes since MediaWiki 1.31.1 ===
6 * (T204729) WatchedItemStore::countVisitingWatchersMultiple() shouldn't query all
7 titles when asked for none
8 * (T205967) Fix syntax error typo in postgres database upgrade file.
9 * (T200254) Add pear/Net_SMTP 1.7.3 to composer dependencies.
10 * (T206765) Load installer i18n when running update.php.
11 * (T109121) Remove deprecated pear/mail_mime-decode from composer suggested libraries.
12 [Also in the bundled composer /vendor directory.]
13 * Various PHP 7.2 and 7.3 compatibility fixes:
14 * (T200595, T206974) Fix PHP 7.3 warnings of using "continue" in some scenarios instead
15 of "break".
16 * (T206976, T206977) Also in the bundled LocalisationUpdate and ParserFunctions extensions.
17 * (T206979) Fix PHP 7.3 warnings of using "compact()" when some variables may
18 not be set.
19 * (T215632) FormatMetadata and UploadStash regexes fixed to be PHP 7.3-compatible.
20 * Avoid PHP 7.2 warnings in DBConRefTest about count() on non-Countable
21 * Suppress "Headers already sent" in PHP 7.2 too
22 * (T206476) Output only to stderr in unit tests
23 * (T207112) Add session_write_close() calls to SessionManager tests
24 * oyejorge/less.php replaced with our fork wikimedia/less.php
25 * (T209756) Updated wikimedia/ip-set from 1.2.0 to 1.3.0.
26 * (T213489) Avoid session double-start in Setup.php.
27 * (T207540) Include IP address in "Login for $1 succeeded" log entry.
28 * (T201781) Database: Allow selectFieldValues() to accept SQL fragments
29 * (T205765) installer: Don't link to the obsolete "Extension Matrix" page
30 * (T206013) Update ImportableUploadRevisionImporter for interwiki usernames
31 * (T207541) Pass an email address, not a MailAddress, to mail().
32 * (T207603) User JS may no longer be loaded with mime type text/javascript if
33 there is no account associated with the username.
34 * (T112937, T113042) Do not allow loading pages raw with a text/javascript MIME
35 type if non-admins can edit the page.
36 * (T17491) <ins>/<del> elements can be phrasing or flow
37 * (T200827) RemexCompatMunger: Don't call endTag() in case B/b
38 * (T207088) Upgrade wikimedia/remex-html to 2.0.1
39 [Also in the bundled composer /vendor directory.]
40 * (T194052) Updated wikimedia/base-convert from 1.0.1 to 2.0.0.
41 [Also in the bundled composer /vendor directory.]
42 * (T199494) Fix notices in maintenance/removeUnusuedAccounts.php
43 * Require ext-fileinfo in composer.json, per PHPVersionCheck
44 * (T176390) Bundled LocalisationUpdate extension: Handle exceptions from GitHubFetcher
45 * (T208255) Completion search should not change the search query
46 * (T209870) Fix SQL syntax error in MS-SQL initialisation file for new wikis
47 * (T185049) LogFormatter: Fail softer when trying to link an invalid titles
48 * (T210998) Properly set $wgLanguageCode in the generated LocalSettings.php
49 if --lang is used with the command-line installer (install.php).
50 * Fix addition of ug_expiry column to user_groups table on MSSQL.
51 * (T204767) Add join conditions to ActiveUsersPager
52 * (T210621) User: Bypass repeatable-read when creating an actor_id.
53 * (T204531) rdbms: reduce LoadBalancer replication log spam.
54 * (T195525) Fix db error outage page.
55 * (T208871) The hard-coded Google search form on the database error page was
56 removed.
57 * (T209885) Prevent populateSearchIndex.php from breaking once actor migration
58 has been started.
59 * (T216968) Return pageid as int in both list=iwbacklinks and list=langbacklinks.
60 * (T215169) Fix for Database::update() with IGNORE option fails on PostgreSQL.
61 * (T204423) Backport support for hyphenated DB names in JobQueueGroup.
62 * (T199474) Fix typo in rebuildrecentchanges.php resulting in rogue flags.
63 * (T218608) Fix an issue that prevents Extension:OAuth working when
64 $wgBlockDisablesLogin is true.
65
66 == MediaWiki 1.31.1 ==
67
68 This is a security and maintenance release of the MediaWiki 1.31 branch.
69
70 === Changes since MediaWiki 1.31.0 ===
71 * (T169545, CVE-2018-0503) SECURITY: $wgRateLimits entry for 'user' overrides
72 'newbie'.
73 * (T194605, CVE-2018-0505) SECURITY: BotPasswords can bypass CentralAuth's
74 account lock.
75 * (T199029, CVE-2018-13258) SECURITY: Tarball was missing .htaccess files.
76 * (T197229) Bundle Nuke extension, it was accidentally omitted.
77 * (T193995) Fix undefined patchPath() method call in parser tests.
78 * (T198687) Fix various selectFields methods to use the string 'NULL', not null.
79 * Special:BotPasswords now requires reauthentication.
80 * (T191608, T187638) Add 'logid' parameter to Special:Log.
81 * (T193829) Indicate when a Bot Password needs reset.
82 * (T198037) GitInfo: Don't try shelling out if it's disabled.
83 * (T151415) Log email changes.
84 * (T197206) Fix performance regression when multiple DB used without caching.
85 * (T197030) PHPSessionHandler: Suppress headers warnings in initialize().
86 * (T182377, T196793) Exif: Guard against uncountable tag values.
87 * (T200861) Fix total breakage of SQLite web upgrade.
88 * (T200864) Fix pingback over-reporting on non-MySQL databases
89 * (T202550) Unbreak SpecialListusersHeaderForm and SpecialListusersHeader
90 hooks.
91
92 === Changes since MediaWiki 1.31.0-rc.2 ===
93 * (T195783) Initialize PSR-4 namespaces at same stage as normal autoloader.
94 * (T196092) Hide MySQL binary/utf-8 charset option in the installer.
95 * (T196185) Don't allow setting $wgDBmysql5 in the installer.
96 * (T196125) php-memcached 3.0 (provided with PHP 7.0) is now supported.
97 * (T182366) UploadBase::checkXMLEncodingMissmatch() now works on PHP 7.1+
98 * (T118683) Fix exception from &$user deref on HHVM in the TitleMoveComplete hook.
99 * (T196672) The mtime of extension.json files is now able to be zero
100 * (T180403) Validate $length in padleft/padright parser functions.
101 * (T143790) Make $wgEmailConfirmToEdit only affect edit actions.
102
103 === Changes since MediaWiki 1.31.0-rc.0 ===
104 * (T33223) Drop archive.ar_text and ar_flags.
105 * Add default edit rate limit of 90 edits/minute for all users.
106 * (T187645) Use codepoint as tiebreaker when getting first-letters in
107 IcuCollation.
108 * (T191947) Don't shell during the installer if shelling out is disabled.
109 * (T194319) Improve duplicate config setting exception as part of extension
110 registration.
111 * (T195211) Don't require trailing slash in PSR-4 autoloader directory.
112 * (T186565) Fix PHP Notice from `ob_end_flush()` in `FileRepo::streamFile()`.
113 * Do not incorrectly hide namespace input field in the installer.
114 * (T186456) Refactor checks looking for PEAR maik libraries to be clearer.
115
116 === Important pre-upgrade notes for 1.31 ===
117 * If you're using MySQL, SQLite, or MSSQL, are not using update.php to apply
118 schema changes, and cannot have downtime to run migrateArchiveText.php and
119 apply patch-drop-ar_text.sql manually, you'll have to apply a default value
120 to the ar_text and ar_flags columns of the archive table or make those
121 columns nullable before upgrading to MediaWiki 1.31.
122 maintenance/archives/patch-nullable-ar_text.sql shows how to do this for MySQL.
123 * The CologneBlue and Modern skins are no longer bundled with the tarball. You
124 will need to remove the wfLoadSkin() calls from your LocalSettings.php or
125 download them separately
126 (<https://www.mediawiki.org/wiki/Special:SkinDistributor>).
127
128 === Configuration changes in 1.31 ===
129 * $wgEnableAPI and $wgEnableWriteAPI are now deprecated and will be removed in
130 a future version. The API is now considered to be stable, secure and
131 essential.
132 * $wgUsejQueryThree was removed, as it is now the default. This was documented
133 as a temporary variable during the migration period, deprecated since 1.29.
134 * $wgLogoHD has been updated to support svg images and uses $wgLogo where
135 possible for fallback images such as png.
136 * (T44246) $wgFilterLogTypes will no longer ignore 'patrol' when user does not
137 have the right to mark things patrolled.
138 * Wikis that contain imported revisions or CentralAuth global blocks should run
139 maintenance/cleanupUsersWithNoId.php.
140 * The configuration settings $wgResourceLoaderMinifierStatementsOnOwnLine and
141 $wgResourceLoaderMinifierMaxLineLength, deprecated since 1.27, were removed.
142 * (T180921) $wgReferrerPolicy now supports having fallbacks for browsers that
143 are not using the latest version of the Referrer Policy specification.
144 * $wgFragmentMode is now set to [ 'legacy', 'html5' ] by default. This is a
145 first step of migration to human-readable section IDs that will later result
146 in 'html5' being the default mode.
147 * CACHE_ACCEL now only supports APC(u) or WinCache. XCache support was removed
148 as upstream is inactive and has no plans to move to PHP 7.
149 * The old CategorizedRecentChanges feature, including its related configuration
150 option $wgAllowCategorizedRecentChanges, has been removed.
151 * (T188472) The 'comma' value for $wgArticleCountMethod is no longer supported
152 for performance reasons, and installations with this setting will now work as
153 if it was configured with 'any'.
154 * (T185753) MediaWiki now defaults to using RemexHtml to tidy up user input,
155 rather than being off by default. If you wish to disable HTML tidying
156 entirely, set $wgTidyConfig to null; if you wish to use the old, deprecated
157 Tidy external binary, both set $wgTidyConfig to null and $wgUseTidy to true.
158 * $wgLogAutopatrol now defaults to false instead of true.
159 * $wgValidateAllHtml was removed and will be ignored.
160 * $wgScriptExtension, deprecated and ignored since 1.25, was removed. See the
161 1.25 release notes for more information.
162 * $wgUseAjax is now marked as deprecated, just like the deprecated AJAX
163 framework that it enables. Some extensions mistakenly used this to check
164 whether any AJAX functionality at all should be enabled, further making this
165 problematic to retain.
166 * $wgDBmysql5 is now deprecated, and will be removed in a future version. It
167 has been marked as experimental ever since it was introduced.
168 * Fix $magicWords for the Sanskrit language
169
170 === New features in 1.31 ===
171 * (T76554) User sub-pages named ….json are now protected in the same way that
172 ….js and ….css pages are, so that configuration options can safely be placed
173 there.
174 * Wikimedia\Rdbms\IDatabase->select() and similar methods now support joins
175 with parentheses for grouping.
176 * As a first pass in standardizing dialog boxes across the MediaWiki product,
177 Html class now provides helper methods for messageBox, successBox, errorBox
178 and warningBox generation.
179 * (T9240) Imports will now record unknown (and, optionally, known) usernames in
180 a format like "iw>Example".
181 * (T20209) Linker (used on history pages, log pages, and so on) will display
182 usernames formed like "iw>Example" as interwiki links, as if by wikitext like
183 [[iw:User:Example|iw>Example]].
184 * (T111605) The 'ImportHandleUnknownUser' hook allows extensions to auto-create
185 users during an import.
186 * Added a hook, ParserOutputPostCacheTransform, to allow extensions to affect
187 the ParserOutput::getText() post-cache transformations.
188 * Added a hook, UploadForm:getInitialPageText, to allow extensions to alter the
189 initial page text for file uploads.
190 * (T181651) The info page for File pages now displays the file's base-16 SHA1
191 hash value in the table of basic information.
192 * Style tags with a 'data-mw-deduplicate' attribute will be deduplicated as a
193 ParserOutput::getText() post-cache transformation. This may be disabled by
194 passing 'deduplicateStyles' => false to that method.
195 * The identity of the logged-in or IP "actor" for logged actions is being moved
196 into a new actor table, with the rows in tables such as revision and logging
197 referring to the actor ID instead of storing the user ID and name/IP in
198 every row.
199 * This is currently gated by $wgActorTableSchemaMigrationStage. Most wikis
200 can set this to MIGRATION_NEW and run maintenance/migrateActors.php as
201 soon as any necessary extensions are updated.
202 * Most code accessing rows for logged actions from the database should use
203 the relevant getQueryInfo() methods to get the information needed to build
204 the SQL query. The ActorMigration class may also be used to get feature
205 -flagged information needed to access actor-related fields during the
206 migration period.
207 * Added Wikimedia\Rdbms\IDatabase::cancelAtomic(), to roll back an atomic
208 section without having to roll back the whole transaction.
209 * Wikimedia\Rdbms\IDatabase::doAtomicSection(), non-native ::insertSelect(),
210 and non-MySQL ::replace() and ::upsert() no longer roll back the whole
211 transaction on failure.
212 * (T189785) Added a monthly heartbeat ping to the pingback feature.
213 * The CLI installer (maintenance/install.php) learned to detect and include
214 extensions. Pass --with-extensions to enable that feature.
215 * (T184791) rc_patrolled now has three states: "0" for unpatrolled,
216 "1" for manually patrolled and "2" for autopatrolled actions.
217 * Extensions can now set their type to "editor" if they provide an editor or
218 enhance the editing experience.
219 * Extensions can use a PSR-4 autoloader by setting an "AutoloadNamespaces"
220 property in extension.json. See the documentation at
221 <https://mediawiki.org/wiki/Manual:Extension.json/Schema#AutoloadNamespaces>
222 for more details and an example.
223 * (T19099) Tabs which link to pages that don't exist (like those to uncreated
224 discussion pages) now have a tooltip to indicate state, not just colour.
225
226 === External library changes in 1.31 ===
227 * pear/mail, pear/mail_mime and pear/mail_mime-decode have been moved from
228 suggested to required. These packages now must be installed via composer
229 and not via PEAR itself.
230
231 ==== Upgraded external libraries ====
232 * Updated jquery.chosen from v0.9.14 to v1.8.2.
233 * Updated composer/spdx-licenses from 1.1.4 to 1.3.0 (development dependency).
234 * Updated nikic/php-parser from 2.1.0 to 3.1.3 (development dependency).
235 * Updated wikimedia/ip-set from 1.1.0 to 1.2.0.
236 * Updated wikimedia/relpath from 2.0.0 to 2.1.1.
237 * Updated wikimedia/running-stat from 1.1.0 to 1.2.0.
238 * Updated wikimedia/wrappedstring from 2.2.0 to 2.3.0.
239 * Updated mediawiki/at-ease from 1.1.0 to 1.2.0.
240 * Updated wikimedia/php-session-serializer from 1.0.4 to 1.0.6.
241 * Updated wikimedia/remex-html from 1.0.2 to 1.0.3.
242 * Updated wikimedia/html-formatter from 1.0.1 to 1.0.2.
243
244 ==== New external libraries ====
245 * Added wikimedia/object-factory 1.0.0
246
247 ==== Removed and replaced external libraries ====
248 * (T17845) The deprecated 'jquery.badge' module was removed.
249 * The deprecated 'jquery.autoEllipsis' module was removed. Use the CSS
250 text-overflow property instead.
251 * The deprecated 'jquery.placeholder' module was removed.
252 * The deprecated 'jquery.appear' module was removed. Use the
253 'mediawiki.viewport' module instead.
254 * mediawiki/at-ease was replaced with wikimedia/at-ease.
255
256 === Bug fixes in 1.31 ===
257 * (T90902) Non-breaking space in header ID breaks anchor.
258 * (T189375) CSSMin now allows quoted urls in `url()` syntax to start with a
259 space.
260 * (T2087, T10897, T87753, T174639) Whitespace created by category and language
261 links is now stripped rather than leaving blank lines in odd places.
262 * (T3780) Uploads with UTF-8 names now work on PHP7.1+ on Windows servers.
263 * (T182366) UploadBase::checkXMLEncodingMissmatch() now works on PHP 7.1+
264
265 === Action API changes in 1.31 ===
266 * (T185058) The 'name' value to tgprop for action=query&list=tags has been
267 removed. It has never made a difference in the output, the name was always
268 returned regardless.
269 * The 'watch' and 'unwatch' parameters for action=move have been removed. They
270 were deprecated and also accidentally nonfunctional since 1.17 in 2010. Use
271 'watchlist' instead.
272
273 === Action API internal changes in 1.31 ===
274 * ApiBase::getProfileDBTime, deprecated since 1.25, was removed.
275 * ApiBase::getModuleProfileName, deprecated since 1.25, was removed.
276 * ApiBase::getProfileTime, deprecated since 1.25, was removed.
277
278 === Languages updated in 1.31 ===
279 MediaWiki supports over 350 languages. Many localisations are updated
280 regularly. Below only new and removed languages are listed, as well as
281 changes to languages because of Phabricator reports.
282
283 * (T180052) Mirandese (mwl) now supports gendered NS_USER/NS_USER_TALK.
284 * (T182305) New language support: Nyungar (nys).
285 * (T186359) New language support: Siberian Tatar [cебертатар] (sty).
286 * (T186635) New language support: Guianan Creole (gcr).
287 * (T186647) New language support: Kumyk [къумукъ] (kum).
288 * (T187750) New language support: Spanish formal address (es-formal).
289 * (T187824) New language support: Hungarian formal address (hu-formal).
290 * (T189127) New language support: Gorontalo (gor).
291
292 === Breaking changes in 1.31 ===
293 * MessageBlobStore::insertMessageBlob(), deprecated in 1.27, was removed.
294 * The OutputPage class constructor now requires a context parameter.
295 Instantiating without context was deprecated in 1.18.
296 * The mw.page JavaScript singleton, deprecated in 1.30, was removed.
297 * Article::getLastPurgeTimestamp(), WikiPage::getLastPurgeTimestamp(), and the
298 related WikiPage::PURGE_* constants, deprecated in 1.29, were removed.
299 * The Article::selectFields(), ::onArticleCreate(), ::onArticleDelete(), and
300 ::onArticleEdit() methods, deprecated in 1.24, were removed.
301 * Installer::locateExecutable() and ::locateExecutableInDefaultPaths() were
302 removed. Use ExecutableFinder::findInDefaultPaths() instead.
303 * The deprecated MW_DIFF_VERSION constant was removed.
304 DifferenceEngine::MW_DIFF_VERSION should be used instead.
305 * Due to significant refactoring, method ContribsPager::getUserCond() that had
306 no access restriction has been removed.
307 * The Block class will no longer accept usable-but-missing usernames for
308 'byText' or ->setBlocker(). Callers should either ensure the blocker exists
309 locally or use a new interwiki-format username like "iw>Example".
310 * The following methods and constants from the WatchedItem class, which were
311 deprecated in 1.27, have been removed:
312 * WatchedItem::getTitle()
313 * WatchedItem::fromUserTitle()
314 * WatchedItem::addWatch()
315 * WatchedItem::removeWatch()
316 * WatchedItem::isWatched()
317 * WatchedItem::duplicateEntries()
318 * WatchedItem::IGNORE_USER_RIGHTS
319 * WatchedItem::CHECK_USER_RIGHTS
320 * WatchedItem::DEPRECATED_USAGE_TIMESTAMP
321 * The $statementsOnOwnLine parameter of JavaScriptMinifier::minify was removed.
322 $wgResourceLoaderMinifierStatementsOnOwnLine, the corresponding configuration
323 variable, has been deprecated since 1.27 and was removed as well.
324 * The $maxLineLength parameter of JavaScriptMinifier::minify was removed.
325 $wgResourceLoaderMinifierMaxLineLength, the corresponding configuration
326 variable, has been deprecated since 1.27 and was removed as well.
327 * The HtmlFormatter class, deprecated in 1.27, was removed. The namespaced
328 HtmlFormatter\HtmlFormatter class should be used instead.
329 * The driver 'mysql' for MySQL, deprecated in MediaWiki 1.30, has been removed.
330 The driver has been deprecated since PHP 5.5 and was removed in PHP 7.0. The
331 default driver for MySQL has been 'mysqli' since MediaWiki 1.22.
332 * The following properties of PreparedEdit were deprecated in 1.21 and have
333 been removed:
334 * PreparedEdit->newText
335 * PreparedEdit->oldText
336 * PreparedEdit->pst
337 * ParserOutput objects which are generated using a non-default value for
338 ParserOptions::setWrapOutputClass() can no longer be added to the parser
339 cache.
340 * The following deprecated methods from the OutputPage class have been removed:
341 * OutputPage::addExtensionStyle(); deprecated in 1.27
342 * OutputPage::getExtStyle(); deprecated in 1.27
343 * OutputPage::setETag(); deprecated in 1.28 (obsolete no-op)
344 * OutputPage::setSquidMaxage(); deprecated in 1.27
345 * OutputPage::readOnlyPage(); deprecated in 1.25
346 * OutputPage::rateLimited(); deprecated in 1.25
347 * Additionally, the protected OutputPage::$mExtStyles array, only accessed
348 through the above and with no known uses, was removed.
349 * The no-op method Skin::showIPinHeader(), deprecated in 1.27, was removed.
350 * The following variables and methods in EditPage, deprecated in MediaWiki 1.30,
351 were removed:
352 * $isCssJsSubpage — use ::isUserConfigPage()
353 * $isCssSubpage — use ::isUserCssConfigPage()
354 * $isJsSubpage — use ::isUserJsConfigPage()
355 * $isWrongCaseCssJsPage – use ::isWrongCaseUserConfigPage()
356 * ::getSummaryInput() – use ::getSummaryInputWidget()
357 * ::getSummaryInputOOUI() – use ::getSummaryInputWidget()
358 * ::getCheckboxes() – use ::getCheckboxesWidget() or
359 ::getCheckboxesDefinition()
360 * ::getCheckboxesOOUI() – use ::getCheckboxesWidget() or
361 ::getCheckboxesDefinition()
362 * ResourceLoaderModule::getPosition(), deprecated in 1.29, has been removed.
363 * In User, the cookie-related methods which were wrappers for the functions on
364 the response object, and were deprecated in 1.27, have been removed:
365 * ::setCookie()
366 * ::clearCookie()
367 * ::setExtendedLoginCookie()
368 Note that User::setCookies() remains, and is not deprecated.
369 * Also in User, some auth-related methods which were deprecated in 1.27 have
370 been removed:
371 * ::getEditTokenTimestamp() – use MediaWiki\Session\Token::getTimestamp()
372 * ::getPasswordFactory() – create a PasswordFactory directly
373 * ::passwordChangeInputAttribs()
374 * The global functions wfProfileIn and wfProfileOut, deprecated in 1.25, have
375 been removed.
376 * SpecialPageFactory::getList(), deprecated in 1.24, has been removed. You can
377 use ::getNames() instead.
378 * OpenSearch::getOpenSearchTemplate(), deprecated in 1.25, has been removed. You
379 can use ApiOpenSearch::getOpenSearchTemplate() instead.
380 * The global function wfBaseConvert, deprecated in 1.27, has been removed. Use
381 Wikimedia\base_convert() directly.
382 * Calling Database::begin() explicitly during an implicit transaction or when
383 DBO_TRX is set results in an exception. Calling Database::commit() explicitly
384 for an implicit transaction also results in an exception. Previously these
385 were logged as errors. The startAtomic() and endAtomic() methods, or
386 AtomicSectionUpdate should be used instead.
387 * The global function wfOutputHandler() was removed, use the its replacement
388 MediaWiki\OutputHandler::handle() instead. The global function was only
389 sometimes defined. Its replacement is always available via the autoloader.
390 * ChangeTags::listExtensionActivatedTags and ::listExtensionDefinedTags,
391 deprecated in 1.28, have been removed. Use ::listSoftwareActivatedTags() and
392 ::listSoftwareDefinedTags() instead.
393 * Title::getTitleInvalidRegex(), deprecated in 1.25, has been removed. You can
394 use MediaWikiTitleCodec::getTitleInvalidRegex() instead.
395 * HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25, have been removed.
396 * The ProfileSection class, deprecated in 1.25 and unused, has been removed.
397 * The ResourceLoaderGetLessVars hook, deprecated in 1.30, has been removed. Use
398 ResourceLoaderModule::getLessVars() to expose local variables instead of
399 global ones.
400 * As part of work to modernise user-generated content clean-up, a config option
401 and some methods related to HTML validity were removed without deprecation.
402 The public methods MWTidy::checkErrors() and the path through which it was
403 called, TidyDriverBase::validate(), are removed, as are the testing methods
404 MediaWikiTestCase::assertValidHtmlSnippet() and ::assertValidHtmlDocument().
405 The $wgValidateAllHtml configuration option is removed and will be ignored.
406 * Execution of external programs using MediaWiki\Shell\Command now applies
407 the RESTRICT_DEFAULT Firejail restriction by default.
408 * The ResourceLoaderModule::getHashMtime() and ::getDefinitionMtime() methods,
409 deprecated in 1.26, were removed.
410 * The deprecated 'mediawiki.widgets.CategorySelector' module alias was removed.
411 Use the 'mediawiki.widgets.CategoryMultiselectWidget' module directly.
412
413 === Deprecations in 1.31 ===
414 * The Revision class was deprecated in favor of RevisionStore, BlobStore, and
415 RevisionRecord and its subclasses.
416 * The global function wfBCP47 is deprecated in favour of LanguageCode::bcp47.
417 * The global function wfCountDown is now deprecated in favor of
418 Maintenance::countDown.
419 * Several methods for returning lists of fields to select from the database
420 have been deprecated in favor of similar methods that also return the tables
421 to select from and the join conditions for those tables.
422 * Block::selectFields() → Block::getQueryInfo()
423 * RecentChange::selectFields() → RecentChange::getQueryInfo()
424 * ArchivedFile::selectFields() → ArchivedFile::getQueryInfo()
425 * LocalFile::selectFields() → LocalFile::getQueryInfo()
426 * LocalFile::getCacheFields() with a prefix no longer works
427 * LocalFile::getLazyCacheFields() with a prefix no longer works
428 * OldLocalFile::selectFields() → OldLocalFile::getQueryInfo()
429 * RecentChange::selectFields() → RecentChange::getQueryInfo()
430 * Revision::userJoinCond() → Revision::getQueryInfo( [ 'user' ] )
431 * Revision::selectUserFields() → Revision::getQueryInfo( [ 'user' ] )
432 * Revision::pageJoinCond() → Revision::getQueryInfo( [ 'page' ] )
433 * Revision::selectPageFields() → Revision::getQueryInfo( [ 'page' ] )
434 * Revision::selectTextFields() → Revision::getQueryInfo( [ 'text' ] )
435 * Revision::selectFields() → Revision::getQueryInfo()
436 * Revision::selectArchiveFields() → Revision::getArchiveQueryInfo()
437 * User::selectFields() → User::getQueryInfo()
438 * WikiPage::selectFields() → WikiPage::getQueryInfo()
439 * Revision::setUserIdAndName() was deprecated.
440 * Access to TitleValue class properties was deprecated, the relevant getters
441 should be used instead.
442 * DifferenceEngine::getDiffBodyCacheKey() is deprecated. Subclasses should
443 override DifferenceEngine::getDiffBodyCacheKeyParams() instead.
444 * Use of Maintenance::error( $err, $die ) to exit script was deprecated. Use
445 Maintenance::fatalError() instead.
446 * Passing a ParserOptions object to OutputPage::parserOptions() is deprecated.
447 * The RevisionInsertComplete hook is now deprecated; use instead the hook
448 RevisionRecordInserted. RevisionInsertComplete is still called, but the second
449 and third parameter will always be null. Hard deprecation is scheduled for 1.32.
450 * The following methods that get and set ParserOutput state are deprecated.
451 Callers should use the new stateless $options parameter to
452 ParserOutput::getText() instead.
453 * ParserOptions::getEditSection()
454 * ParserOptions::setEditSection()
455 * ParserOutput::getEditSectionTokens()
456 * ParserOutput::setEditSectionTokens()
457 * ParserOutput::getTOCEnabled()
458 * ParserOutput::setTOCEnabled()
459 * OutputPage::enableSectionEditLinks()
460 * OutputPage::sectionEditLinksEnabled()
461 * The public ParserOutput state fields $mTOCEnabled and $mEditSectionTokens
462 are also deprecated.
463 * License::getLicenses has been deprecated; use License::getLines instead.
464 * QuickTemplate::setRef() was deprecated in favour of QuickTemplate::set().
465 Setting template variables by reference allowed violating the principle of
466 data being immutable once added to the skin template. In practice, this method
467 was not being used for that. Rather, setRef() existed as memory optimisation
468 for PHP 4.
469 * QuickTemplate::setTranslator() and MediaWikiI18N::set() were deprecated in
470 favour of Skin::msg() parameters.
471 * MediaWikiI18N::translate() was deprecated in favour of Skin::msg() or
472 wfMessage().
473 * Passing false to ParserOptions::setWrapOutputClass() is deprecated. Use the
474 'unwrap' transform to ParserOutput::getText() instead.
475 * \ObjectFactory (no namespace) is deprecated, the namespaced class
476 \Wikimedia\ObjectFactory from the wikimedia/object-factory library should be
477 used instead.
478 * CommentStore::newKey is deprecated. Instead, get an instance from
479 MediaWikiServices.
480 * The following CommentStore methods have had their signatures changed to
481 introduce a $key parameter, usage of the methods on instances retrieved from
482 CommentStore::newKey will remain unchanged but deprecated:
483 * CommentStore::getFields
484 * CommentStore::getJoin
485 * CommentStore::getComment
486 * CommentStore::getCommentLegacy
487 * CommentStore::insert
488 * CommentStore::insertWithTemplate
489 * The following methods in Title have been renamed, and the old ones are
490 deprecated:
491 * Title::getSkinFromCssJsSubpage – use ::getSkinFromConfigSubpage
492 * Title::isCssOrJsPage – use ::isSiteConfigPage
493 * Title::isCssJsSubpage – use ::isUserConfigPage
494 * Title::isCssSubpage – use ::isUserCssConfigPage
495 * Title::isJsSubpage – use ::isUserJsConfigPage
496 * The following methods related to caching of half-parsed HTML were deprecated:
497 * Parser::serializeHalfParsedText()
498 * Parser::unserializeHalfParsedText()
499 * Parser::isValidHalfParsedText()
500 * StripState::getSubState()
501 * StripState::merge()
502 * The DeferredStringifier class is deprecated, use Message::listParam() instead.
503 * The type string for the parameter $lang of DateFormatter::getInstance is
504 deprecated.
505 * Wikimedia\Rdbms\SavepointPostgres is deprecated.
506 * The DO_MAINTENANCE constant is deprecated. RUN_MAINTENANCE_IF_MAIN should be
507 used instead.
508 * The function wfShellWikiCmd() has been deprecated, use
509 MediaWiki\Shell::makeScriptCommand().
510 * In the future, the hooks 'PreferencesFormPreSave' and 'PreferencesGetLegend'
511 will be allowed to provide any HTMLForm object rather than PreferencesForm.
512
513 === Other changes in 1.31 ===
514 * Browser support for Internet Explorer 10 was lowered from Grade A to Grade C.
515 * Browser support for Opera 12 and older was dropped entirely. Opera 15+
516 continues at Grade A.
517 * Multi-content-revision capability was introduced into the storage layer. See
518 <https://mediawiki.org/wiki/Requests_for_comment/Multi-Content_Revisions>.
519 * The "free" CSS class is now only applied to unbracketed URLs in wikitext.
520 Links written using square brackets will get the class "text" not "free".
521 * RFC 157418: Whitespace is trimmed from wikitext headings, wikitext list items,
522 wikitext table captions, wikitext table headings, wikitext table cells. HTML
523 headings, HTML list items, HTML table captions, HTML table headings, HTML
524 table cells will not have this trimming behavior.
525
526 == Compatibility ==
527 MediaWiki 1.31 requires PHP 7.0.13 or later. Although HHVM 3.18.5 or later is
528 supported, it is generally advised to use PHP 7.0.13 or later for long term
529 support. MediaWiki requires that the mbstring, xml, ctype, json, iconv and
530 fileinfo PHP extensions are loaded to work.
531
532 MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used,
533 but support for them is somewhat less mature. There is experimental support for
534 Oracle and Microsoft SQL Server.
535
536 The supported versions are:
537
538 * MySQL 5.5.8 or later
539 * PostgreSQL 9.2 or later
540 * SQLite 3.3.7 or later
541 * Oracle 9.0.1 or later
542 * Microsoft SQL Server 2005 (9.00.1399)
543
544 == Upgrading ==
545 1.31 has several database changes since 1.30, and will not work without schema
546 updates. Note that due to changes to some very large tables like the revision
547 table, the schema update may take quite long (minutes on a medium sized site,
548 many hours on a large site).
549
550 Don't forget to always back up your database before upgrading!
551
552 See the file UPGRADE for more detailed upgrade instructions, including
553 important information when upgrading from versions prior to 1.11.
554
555 For notes on 1.30.x and older releases, see HISTORY.
556
557 == Online documentation ==
558 Documentation for both end-users and site administrators is available on
559 MediaWiki.org, and is covered under the GNU Free Documentation License (except
560 for pages that explicitly state that their contents are in the public domain):
561
562 https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
563
564 == Mailing list ==
565 A mailing list is available for MediaWiki user support and discussion:
566
567 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
568
569 A low-traffic announcements-only list is also available:
570
571 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
572
573 It's highly recommended that you sign up for one of these lists if you're
574 going to run a public MediaWiki, so you can be notified of security fixes.
575
576 == IRC help ==
577 There's usually someone online in #mediawiki on irc.freenode.net.