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