Merge "Deprecate $wgUseAjax in 1.31" into REL1_31
[lhc/web/wiklou.git] / RELEASE-NOTES-1.31
1 == MediaWiki 1.31 ==
2
3 THIS IS NOT A RELEASE YET
4
5 MediaWiki 1.31 is an alpha-quality branch and is not recommended for use in
6 production.
7
8 === Configuration changes in 1.31 ===
9 * $wgEnableAPI and $wgEnableWriteAPI are now deprecated and will be removed in
10 a future version. The API is now considered to be stable, secure and
11 essential.
12 * $wgUsejQueryThree was removed, as it is now the default. This was documented as a
13 temporary variable during the migration period, deprecated since 1.29.
14 * $wgLogoHD has been updated to support svg images and uses $wgLogo where
15 possible for fallback images such as png.
16 * (T44246) $wgFilterLogTypes will no longer ignore 'patrol' when user does
17 not have the right to mark things patrolled.
18 * Wikis that contain imported revisions or CentralAuth global blocks should run
19 maintenance/cleanupUsersWithNoId.php.
20 * $wgResourceLoaderMinifierStatementsOnOwnLine and $wgResourceLoaderMinifierMaxLineLength
21 were removed (deprecated since 1.27).
22 * (T180921) $wgReferrerPolicy now supports having fallbacks for browsers that are not
23 using the latest version of the Referrer Policy specification.
24 * $wgFragmentMode is now set to [ 'legacy', 'html5' ] by default. This is a first step of
25 migration to human-readable section IDs that will later result in 'html5' being the
26 default mode.
27 * CACHE_ACCEL now only supports APC(u) or WinCache. XCache support was removed
28 as upstream is inactive and has no plans to move to PHP 7.
29 * The old CategorizedRecentChanges feature, including its related configuration
30 option $wgAllowCategorizedRecentChanges, has been removed.
31 * (T188472) The 'comma' value for $wgArticleCountMethod is no longer supported for
32 performance reasons, and installations with this setting will now work as if it
33 was configured with 'any'.
34 * (T185753) MediaWiki now defaults to using RemexHtml to tidy up user input, rather than
35 being off by default. If you wish to disable HTML tidying entirely, set $wgTidyConfig
36 to null; if you wish to use the old, deprecated Tidy external binary, both
37 set $wgTidyConfig to null and also set $wgUseTidy to true.
38 * $wgLogAutopatrol now defaults to false instead of true.
39 * $wgValidateAllHtml was removed and will be ignored.
40 * $wgScriptExtension was removed (deprecated and ignored since 1.25).
41 See 1.25 release notes for more information.
42 * $wgUseAjax is now marked as deprecated, just like the deprecated AJAX
43 framework that it enables. Some extensions mistakenly used this to check
44 whether any AJAX functionality at all should be enabled, further making this
45 problematic to retain.
46
47 === New features in 1.31 ===
48 * (T76554) User sub-pages named ….json are now protected in the same way that ….js
49 and ….css pages are, so that configuration options can safely be placed there.
50 * Wikimedia\Rdbms\IDatabase->select() and similar methods now support
51 joins with parentheses for grouping.
52 * As a first pass in standardizing dialog boxes across the MediaWiki product,
53 Html class now provides helper methods for messageBox, successBox, errorBox and
54 warningBox generation.
55 * (T9240) Imports will now record unknown (and, optionally, known) usernames in
56 a format like "iw>Example".
57 * (T20209) Linker (used on history pages, log pages, and so on) will display
58 usernames formed like "iw>Example" as interwiki links, as if by wikitext like
59 [[iw:User:Example|iw>Example]].
60 * (T111605) The 'ImportHandleUnknownUser' hook allows extensions to auto-create
61 users during an import.
62 * Added a hook, ParserOutputPostCacheTransform, to allow extensions to affect
63 the ParserOutput::getText() post-cache transformations.
64 * Added a hook, UploadForm:getInitialPageText, to allow extensions to alter the
65 initial page text for file uploads.
66 * (T181651) The info page for File pages now displays the file's base-16 SHA1
67 hash value in the table of basic information.
68 * Style tags with a 'data-mw-deduplicate' attribute will be deduplicated as a
69 ParserOutput::getText() post-cache transformation. This may be disabled by
70 passing 'deduplicateStyles' => false to that method.
71 * The identity of the logged-in or IP "actor" for logged actions is being moved
72 into a new actor table, with the rows in tables such as revision and logging
73 referring to the actor ID instead of storing the user ID and name/IP in
74 every row.
75 * This is currently gated by $wgActorTableSchemaMigrationStage. Most wikis
76 can set this to MIGRATION_NEW and run maintenance/migrateActors.php as
77 soon as any necessary extensions are updated.
78 * Most code accessing rows for logged actions from the database should use
79 the relevant getQueryInfo() methods to get the information needed to build
80 the SQL query. The ActorMigration class may also be used to get feature-flagged
81 information needed to access actor-related fields during the migration
82 period.
83 * Added Wikimedia\Rdbms\IDatabase::cancelAtomic(), to roll back an atomic
84 section without having to roll back the whole transaction.
85 * Wikimedia\Rdbms\IDatabase::doAtomicSection(), non-native ::insertSelect(),
86 and non-MySQL ::replace() and ::upsert() no longer roll back the whole
87 transaction on failure.
88 * (T189785) Added a monthly heartbeat ping to the pingback feature.
89 * The CLI installer (maintenance/install.php) learned to detect and include
90 extensions. Pass --with-extensions to enable that feature.
91 * (T184791) rc_patrolled now has three states: "0" for unpatrolled,
92 "1" for manually patrolled and "2" for autopatrolled actions.
93 * Extensions can now set their type to "editor" if they provide an editor
94 or enhance the editing experience.
95 * Extensions can use a PSR-4 autoloader by setting an "AutoloadNamespaces" property
96 in extension.json. See
97 <https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#AutoloadNamespaces>
98 for more details and an example.
99
100 === External library changes in 1.31 ===
101
102 ==== Upgraded external libraries ====
103 * Updated jquery.chosen from v0.9.14 to v1.8.2.
104 * Updated composer/spdx-licenses from 1.1.4 to
105 1.3.0 (development dependency).
106 * Updated nikic/php-parser from 2.1.0 to 3.1.3
107 (development dependency).
108 * Updated wikimedia/ip-set from 1.1.0 to 1.2.0.
109 * Updated wikimedia/relpath from 2.0.0 to 2.1.1.
110 * Updated wikimedia/running-stat from 1.1.0 to 1.2.0.
111 * Updated wikimedia/wrappedstring from 2.2.0 to 2.3.0.
112 * Updated mediawiki/at-ease from 1.1.0 to 1.2.0.
113 * Updated wikimedia/php-session-serializer from 1.0.4 to 1.0.6.
114 * Updated wikimedia/remex-html from 1.0.2 to 1.0.3.
115 * …
116
117 ==== New external libraries ====
118 * Added wikimedia/object-factory 1.0.0
119 * …
120
121 ==== Removed and replaced external libraries ====
122 * (T17845) The deprecated 'jquery.badge' module was removed.
123 * The deprecated 'jquery.autoEllipsis' module was removed. Use the CSS
124 text-overflow property instead.
125 * The deprecated 'jquery.placeholder' module was removed.
126 * The deprecated 'jquery.appear' module was removed. Use the
127 'mediawiki.viewport' module instead.
128 * The deprecated 'mediawiki.widgets.CategorySelector' module alias was removed.
129 Use the 'mediawiki.widgets.CategoryMultiselectWidget' module directly instead.
130 * mediawiki/at-ease was replaced with wikimedia/at-ease.
131
132 === Bug fixes in 1.31 ===
133 * (T90902) Non-breaking space in header ID breaks anchor
134
135 === Action API changes in 1.31 ===
136 * (T185058) The 'name' value to tgprop for action=query&list=tags has been
137 removed. It has never made a difference in the output, the name was always
138 returned regardless.
139
140 === Action API internal changes in 1.31 ===
141 * ApiBase::getProfileDBTime was removed (deprecated since 1.25)
142 * ApiBase::getModuleProfileName was removed (deprecated since 1.25)
143 * ApiBase::getProfileTime was removed (deprecated since 1.25)
144
145 === Languages updated in 1.31 ===
146 MediaWiki supports over 350 languages. Many localisations are updated
147 regularly. Below only new and removed languages are listed, as well as
148 changes to languages because of Phabricator reports.
149
150 * (T180052) Mirandese (mwl) now supports gendered NS_USER/NS_USER_TALK namespaces.
151 * (T182305) New language support: Nyungar (nys).
152 * (T186359) New language support: Siberian Tatar [cебертатар] (sty).
153 * (T186635) New language support: Guianan Creole (gcr).
154 * (T186647) New language support: Kumyk [къумукъ] (kum).
155 * (T187750) New language support: Spanish formal address (es-formal).
156 * (T187824) New language support: Hungarian formal address (hu-formal).
157
158 === Breaking changes in 1.31 ===
159 * MessageBlobStore::insertMessageBlob() (deprecated in 1.27) was removed.
160 * The OutputPage class constructor now requires a context parameter,
161 (instantiating without context was deprecated in 1.18)
162 * The mw.page JavaScript singleton (deprecated in 1.30) was removed.
163 * Article::getLastPurgeTimestamp(), WikiPage::getLastPurgeTimestamp(), and the
164 related WikiPage::PURGE_* constants, deprecated in 1.29, were removed.
165 * The Article::selectFields(), Article::onArticleCreate(),
166 Article::onArticleDelete(), and Article::onArticleEdit() methods, deprecated
167 in 1.24, were removed.
168 * Installer::locateExecutable() and Installer::locateExecutableInDefaultPaths()
169 were removed, use ExecutableFinder::findInDefaultPaths() instead.
170 * The deprecated MW_DIFF_VERSION constant was removed.
171 DifferenceEngine::MW_DIFF_VERSION should be used instead.
172 * Due to significant refactoring, method ContribsPager::getUserCond() that had
173 no access restriction has been removed.
174 * The Block class will no longer accept usable-but-missing usernames for
175 'byText' or ->setBlocker(). Callers should either ensure the blocker exists
176 locally or use a new interwiki-format username like "iw>Example".
177 * The following methods and constants from the WatchedItem class, which were deprecated in
178 1.27, have been removed.
179 * WatchedItem::getTitle()
180 * WatchedItem::fromUserTitle()
181 * WatchedItem::addWatch()
182 * WatchedItem::removeWatch()
183 * WatchedItem::isWatched()
184 * WatchedItem::duplicateEntries()
185 * WatchedItem::IGNORE_USER_RIGHTS
186 * WatchedItem::CHECK_USER_RIGHTS
187 * WatchedItem::DEPRECATED_USAGE_TIMESTAMP
188 * The $statementsOnOwnLine parameter of JavaScriptMinifier::minify was removed.
189 The corresponding configuration variable ($wgResourceLoaderMinifierStatementsOnOwnLine)
190 has been deprecated since 1.27 and was removed as well.
191 * The $maxLineLength parameter of JavaScriptMinifier::minify was removed.
192 The corresponding configuration variable ($wgResourceLoaderMinifierMaxLineLength)
193 has been deprecated since 1.27 and was removed as well.
194 * The HtmlFormatter class was removed (deprecated in 1.27). The namespaced
195 HtmlFormatter\HtmlFormatter class should be used instead.
196 * The driver 'mysql' for MySQL, deprecated in MediaWiki 1.30, has been removed.
197 The driver has been deprecated since PHP 5.5 and was removed in PHP 7.0. The
198 default driver for MySQL has been 'mysqli' since MediaWiki 1.22.
199 * The following properties of PreparedEdit were deprecated in 1.21 and have been removed:
200 * PreparedEdit->newText
201 * PreparedEdit->oldText
202 * PreparedEdit->pst
203 * ParserOutput objects generated using a non-default value for
204 ParserOptions::setWrapOutputClass() can no longer be added to the parser cache.
205 * The following deprecated methods from the OutputPage class have been removed:
206 * OutputPage::addExtensionStyle(); deprecated in 1.27
207 * OutputPage::getExtStyle(); deprecated in 1.27
208 * OutputPage::setETag(); deprecated in 1.28 (obsolete no-op)
209 * OutputPage::setSquidMaxage(); deprecated in 1.27
210 * OutputPage::readOnlyPage(); deprecated in 1.25
211 * OutputPage::rateLimited(); deprecated in 1.25
212 * Additionally, the protected OutputPage::$mExtStyles array, only accessed through
213 the above and with no known uses, was removed.
214 * The no-op method Skin::showIPinHeader(), deprecated in 1.27, was removed.
215 * The following variables and methods in EditPage, deprecated in MediaWiki 1.30, were removed:
216 * $isCssJsSubpage — use ::isUserConfigPage()
217 * $isCssSubpage — use ::isUserCssConfigPage()
218 * $isJsSubpage — use ::isUserJsConfigPage()
219 * $isWrongCaseCssJsPage – use ::isWrongCaseUserConfigPage()
220 * ::getSummaryInput() – use ::getSummaryInputWidget()
221 * ::getSummaryInputOOUI() – use ::getSummaryInputWidget()
222 * ::getCheckboxes() – use ::getCheckboxesWidget() or ::getCheckboxesDefinition()
223 * ::getCheckboxesOOUI() – use ::getCheckboxesWidget() or ::getCheckboxesDefinition()
224 * The method ResourceLoaderModule::getPosition(), deprecated in 1.29, has been removed.
225 * In User, the cookie-related methods which were wrappers for the functions on the response
226 object, and were deprecated in 1.27, have been removed:
227 * ::setCookie()
228 * ::clearCookie()
229 * ::setExtendedLoginCookie()
230 Note that User::setCookies() remains, and is not deprecated.
231 * Also in User, some auth-related methods which were deprecated in 1.27, have been removed:
232 * ::getEditTokenTimestamp() – use MediaWiki\Session\Token::getTimestamp()
233 * ::getPasswordFactory() – create a PasswordFactory directly
234 * ::passwordChangeInputAttribs()
235 * The global functions wfProfileIn and wfProfileOut, deprecated in 1.25, have been removed.
236 * SpecialPageFactory::getList(), deprecated in 1.24, has been removed. You can
237 use ::getNames() instead.
238 * OpenSearch::getOpenSearchTemplate(), deprecated in 1.25, has been removed. You
239 can use ApiOpenSearch::getOpenSearchTemplate() instead.
240 * The global function wfBaseConvert, deprecated in 1.27, has been removed. Use
241 Wikimedia\base_convert() directly.
242 * Calling Database::begin() explicitly during an implicit transaction or when DBO_TRX
243 is set results in an exception. Calling Database::commit() explicitly for an implicit
244 transaction also results in an exception. Previously these were logged as errors.
245 The startAtomic() and endAtomic() methods, or AtomicSectionUpdate should be used
246 instead.
247 * The global function wfOutputHandler() was removed, use the its replacement
248 MediaWiki\OutputHandler::handle() instead. The global function was only sometimes defined.
249 Its replacement is always available via the autoloader.
250 * ChangeTags::listExtensionActivatedTags and ::listExtensionDefinedTags, deprecated
251 in 1.28, have been removed. Use ::listSoftwareActivatedTags() and
252 ::listSoftwareDefinedTags() instead.
253 * Title::getTitleInvalidRegex(), deprecated in 1.25, has been removed. You
254 can use MediaWikiTitleCodec::getTitleInvalidRegex() instead.
255 * HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25, have been removed.
256 * The ProfileSection class, deprecated in 1.25 and unused, has been removed.
257 * The ResourceLoaderGetLessVars hook, deprecated in 1.30, has been removed.
258 Use ResourceLoaderModule::getLessVars() to expose local variables instead
259 of global ones.
260 * As part of work to modernise user-generated content clean-up, a config option and some
261 methods related to HTML validity were removed without deprecation. The public methods
262 MWTidy::checkErrors() and its callee TidyDriverBase::validate() are removed, as are
263 MediaWikiTestCase::assertValidHtmlSnippet() and ::assertValidHtmlDocument(). The
264 $wgValidateAllHtml configuration option is removed and will be ignored.
265 * Execution of external programs using MediaWiki\Shell\Command now applies RESTRICT_DEFAULT
266 Firejail restriction by default.
267 * The ResourceLoaderModule::getHashMtime() and ::getDefinitionMtime() methods,
268 deprecated in 1.26, were removed.
269
270 === Deprecations in 1.31 ===
271 * The Revision class was deprecated in favor of RevisionStore, BlobStore, and
272 RevisionRecord and its subclasses.
273 * The global function wfBCP47 is deprecated in favour of LanguageCode::bcp47.
274 * The global function wfCountDown is now deprecated in favor of Maintenance::countDown.
275 * Several methods for returning lists of fields to select from the database
276 have been deprecated in favor of similar methods that also return the tables
277 to select from and the join conditions for those tables.
278 * Block::selectFields() → Block::getQueryInfo()
279 * RecentChange::selectFields() → RecentChange::getQueryInfo()
280 * ArchivedFile::selectFields() → ArchivedFile::getQueryInfo()
281 * LocalFile::selectFields() → LocalFile::getQueryInfo()
282 * LocalFile::getCacheFields() with a prefix no longer works
283 * LocalFile::getLazyCacheFields() with a prefix no longer works
284 * OldLocalFile::selectFields() → OldLocalFile::getQueryInfo()
285 * RecentChange::selectFields() → RecentChange::getQueryInfo()
286 * Revision::userJoinCond() → Revision::getQueryInfo( [ 'user' ] )
287 * Revision::selectUserFields() → Revision::getQueryInfo( [ 'user' ] )
288 * Revision::pageJoinCond() → Revision::getQueryInfo( [ 'page' ] )
289 * Revision::selectPageFields() → Revision::getQueryInfo( [ 'page' ] )
290 * Revision::selectTextFields() → Revision::getQueryInfo( [ 'text' ] )
291 * Revision::selectFields() → Revision::getQueryInfo()
292 * Revision::selectArchiveFields() → Revision::getArchiveQueryInfo()
293 * User::selectFields() → User::getQueryInfo()
294 * WikiPage::selectFields() → WikiPage::getQueryInfo()
295 * Revision::setUserIdAndName() was deprecated.
296 * Access to TitleValue class properties was deprecated, the relevant getters
297 should be used instead.
298 * DifferenceEngine::getDiffBodyCacheKey() is deprecated. Subclasses should
299 override DifferenceEngine::getDiffBodyCacheKeyParams() instead.
300 * Use of Maintenance::error( $err, $die ) to exit script was deprecated. Use
301 Maintenance::fatalError() instead.
302 * Passing a ParserOptions object to OutputPage::parserOptions() is deprecated.
303 * The RevisionInsertComplete hook is now deprecated, use RevisionRecordInserted instead.
304 RevisionInsertComplete is still called, but the second and third parameter will always be null.
305 Hard deprecation is scheduled for 1.32.
306 * The following methods that get and set ParserOutput state are deprecated.
307 Callers should use the new stateless $options parameter to
308 ParserOutput::getText() instead.
309 * ParserOptions::getEditSection()
310 * ParserOptions::setEditSection()
311 * ParserOutput::getEditSectionTokens()
312 * ParserOutput::setEditSectionTokens()
313 * ParserOutput::getTOCEnabled()
314 * ParserOutput::setTOCEnabled()
315 * OutputPage::enableSectionEditLinks()
316 * OutputPage::sectionEditLinksEnabled()
317 * The public ParserOutput state fields $mTOCEnabled and $mEditSectionTokens are also deprecated.
318 * License::getLicenses has been deprecated; use License::getLines instead.
319 * QuickTemplate::setRef() was deprecated in favour of QuickTemplate::set().
320 Setting template variables by reference allowed violating the principle of data being
321 immutable once added to the skin template. In practice, this method was not being
322 used for that. Rather, setRef() existed as memory optimisation for PHP 4.
323 * QuickTemplate::setTranslator() was deprecated in favour of Skin::msg() parameters.
324 * MediaWikiI18N::set() was deprecated in favour of Skin::msg() parameters.
325 * MediaWikiI18N::translate() was deprecated in favour of Skin::msg() or wfMessage().
326 * Passing false to ParserOptions::setWrapOutputClass() is deprecated. Use the
327 'unwrap' transform to ParserOutput::getText() instead.
328 * \ObjectFactory (no namespace) is deprecated, the namespaced \Wikimedia\ObjectFactory
329 from the wikimedia/object-factory library should be used instead.
330 * CommentStore::newKey is deprecated. Get an instance from MediaWikiServices instead.
331 * The following CommentStore methods have had their signatures changed to introduce a $key parameter,
332 usage of the methods on instances retrieved from CommentStore::newKey will remain unchanged but deprecated:
333 * CommentStore::getFields
334 * CommentStore::getJoin
335 * CommentStore::getComment
336 * CommentStore::getCommentLegacy
337 * CommentStore::insert
338 * CommentStore::insertWithTemplate
339 * The following methods in Title have been renamed, and the old ones are deprecated:
340 * Title::getSkinFromCssJsSubpage – use ::getSkinFromConfigSubpage
341 * Title::isCssOrJsPage – use ::isSiteConfigPage
342 * Title::isCssJsSubpage – use ::isUserConfigPage
343 * Title::isCssSubpage – use ::isUserCssConfigPage
344 * Title::isJsSubpage – use ::isUserJsConfigPage
345 * The following methods related to caching of half-parsed HTML were deprecated:
346 * Parser::serializeHalfParsedText()
347 * Parser::unserializeHalfParsedText()
348 * Parser::isValidHalfParsedText()
349 * StripState::getSubState()
350 * StripState::merge()
351 * The DeferredStringifier class is deprecated, use Message::listParam() instead.
352 * The type string for the parameter $lang of DateFormatter::getInstance is
353 deprecated.
354 * Wikimedia\Rdbms\SavepointPostgres is deprecated.
355 * The DO_MAINTENANCE constant is deprecated. RUN_MAINTENANCE_IF_MAIN should be
356 used instead.
357 * The function wfShellWikiCmd() has been deprecated, use
358 MediaWiki\Shell::makeScriptCommand().
359
360 === Other changes in 1.31 ===
361 * Browser support for Internet Explorer 10 was lowered from Grade A to Grade C.
362 * Browser support for Opera 12 and older was removed. Opera 15+ continues at Grade A.
363 * Introducing multi-content-revision capability into the storage layer. For details,
364 see <https://www.mediawiki.org/wiki/Requests_for_comment/Multi-Content_Revisions>.
365 * The "free" CSS class is now only applied to unbracketed URLs in wikitext. Links
366 written using square brackets will get the class "text" not "free".
367 * RFC 157418: Whitespace is trimmed from wikitext headings, wikitext list items,
368 wikitext table captions, wikitext table headings, wikitext table cells. HTML
369 headings, HTML list items, HTML table captions, HTML table headings, HTML table cells
370 will not have this trimming behavior.
371
372 == Compatibility ==
373 MediaWiki 1.31 requires PHP 7.0.0 or later. Although HHVM 3.18.5 or later is supported,
374 it is generally advised to use PHP 7.0.0 or later for long term support.
375
376 MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used,
377 but support for them is somewhat less mature. There is experimental support for
378 Oracle and Microsoft SQL Server.
379
380 The supported versions are:
381
382 * MySQL 5.5.8 or later
383 * PostgreSQL 9.2 or later
384 * SQLite 3.3.7 or later
385 * Oracle 9.0.1 or later
386 * Microsoft SQL Server 2005 (9.00.1399)
387
388 == Upgrading ==
389 1.31 has several database changes since 1.30, and will not work without schema
390 updates. Note that due to changes to some very large tables like the revision
391 table, the schema update may take quite long (minutes on a medium sized site,
392 many hours on a large site).
393
394 Don't forget to always back up your database before upgrading!
395
396 See the file UPGRADE for more detailed upgrade instructions, including
397 important information when upgrading from versions prior to 1.11.
398
399 For notes on 1.30.x and older releases, see HISTORY.
400
401 == Online documentation ==
402 Documentation for both end-users and site administrators is available on
403 MediaWiki.org, and is covered under the GNU Free Documentation License (except
404 for pages that explicitly state that their contents are in the public domain):
405
406 https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
407
408 == Mailing list ==
409 A mailing list is available for MediaWiki user support and discussion:
410
411 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
412
413 A low-traffic announcements-only list is also available:
414
415 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
416
417 It's highly recommended that you sign up for one of these lists if you're
418 going to run a public MediaWiki, so you can be notified of security fixes.
419
420 == IRC help ==
421 There's usually someone online in #mediawiki on irc.freenode.net.