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