Merge "Resolve deprecation warnings in iw search widget"
[lhc/web/wiklou.git] / RELEASE-NOTES-1.32
1 == MediaWiki 1.32 ==
2
3 THIS IS NOT A RELEASE YET
4
5 MediaWiki 1.32 is an alpha-quality branch and is not recommended for use in
6 production.
7
8 === Configuration changes in 1.32 ===
9 * (T115414) The $wgEnableAPI and $wgEnableWriteAPI settings, deprecated in 1.31,
10 have been removed.
11 * The $wgUseAjax setting, deprecated in 1.31, is now ignored.
12 * The $wgSiteSupportPage setting, unused since 1.5, was removed.
13 * The $wgBrowserBlacklist setting, deprecated in 1.30, was removed.
14 * The default quality of JPEG thumbnails generated by GD was reduced from 95 to
15 80. The quality of JPEG thumbnails is now configurable through the new setting
16 $wgJpegQuality (default 80). This aligns the quality to what ImageMagick uses.
17 * $wgExperimentalHtmlIds, deprecated since 1.30, has been removed. The
18 'html5-legacy' value for $wgFragmentMode is no longer accepted.
19 * The experimental Html5Internal and Html5Depurate tidy drivers were removed.
20 RemexHtml, which is the default, should be used instead.
21 * (T135963) You can now define a Content Security Policy for your wiki. This
22 adds a defense-in-depth feature to stop an attacker who has found a bug in
23 the parser allowing them to insert malicious attributes. Disabled by default,
24 you can configure this via $wgCSPHeader and $wgCSPReportOnlyHeader.
25 * New configuration variable has been added: $wgCookieSetOnIpBlock.
26 This determines whether to set a cookie when an IP user is blocked. Doing so
27 means that a blocked user, even after moving to a new IP address, will still
28 be blocked.
29 * The archive table's ar_rev_id field is now unique.
30 * Special:BotPasswords now requires reauthentication.
31 * (T194414) The default watchlist view time has been increased from 3 to 7 days.
32 * The right to edit sitewide Javascript (e.g. MediaWiki:Common.js), CSS or JSON
33 was separated from 'editinterface' and is available under
34 'editsitejs'/'editsitecss'/'editsitejson'. Having 'editinterface' is still
35 necessary to edit such pages.
36 * A new user group, 'interface-admin', is added for controlling access to
37 sitewide CSS/JS (and editing other users' CSS/JS). No other group has
38 'editsitecss', 'editusercss', 'editsitejs' or 'edituserjs' by default.
39 * A new grant group, 'editsiteconfig', is added for granting the above rights.
40 * The $wgPasswordSenderName setting, ignored since 1.23 by MediaWiki and almost
41 all extensions, is no longer set at all. Instead, you can modify the system
42 message `emailsender`.
43
44 === New features in 1.32 ===
45 * (T112474) Generalized the ResourceLoader mechanism for overriding modules
46 using a particular page during edit previews.
47 * (T12331) You can now log page creation events by setting $wgPageCreationLog
48 to true.
49 * Added 'ApiParseMakeOutputPage' hook.
50 * (T174313) Added checkbox on Special:ListUsers to display only users in
51 temporary user groups.
52 * (T152462) A cookie can now be set when an IP user is blocked to track that
53 user if they move to a new IP address. This is disabled by default.
54 * (T194950) Added 'ApiMaxLagInfo' hook.
55 * SpecialPage::checkLoginSecurityLevel() will now preserve POST data when
56 reauthenticating.
57 * FormSpecialPage::execute() will now call checkLoginSecurityLevel() if
58 getLoginSecurityLevel() returns non-false.
59 * The 'ImageBeforeProduceHTML' hook is now passed three new parameters, $parser,
60 &$query and &$widthOption, allowing extensions even finer control over the
61 resulting HTML code.
62 * Added new 'ArticleShowPatrolFooter' hook, which allows extensions to determine
63 if the [mark as patrolled] link should be shown at the footer of patrollable
64 pages.
65 * The array of hidden options ($opts) passed to the 'SpecialSearchPowerBox' hook
66 is now passed by reference, allowing extensions to modify or even unset it.
67 * Added new 'OutputPageAfterGetHeadLinksArray' hook, allowing extensions to
68 modify the return value of OutputPage#getHeadLinksArray in order to add,
69 remove or otherwise alter the elements to be output in the page <head>.
70 * (T28934) The 'HistoryPageToolLinks' hook allows extensions to append
71 additional links to the subtitle of a history page.
72 * The 'GetLinkColours' hook now receives an additional $title parameter,
73 the Title object of the page being parsed, on which the links will be shown.
74
75 === External library changes in 1.32 ===
76 * …
77
78 ==== Upgraded external libraries ====
79 * Updated QUnit from 2.4.0 to 2.6.0.
80 * Updated wikimedia/scoped-callback from 1.0.0 to 2.0.0.
81 ** ScopedCallback objects can no longer be serialized.
82 * Updated wikimedia/wrappedstring from 2.3.0 to 3.0.1.
83 * Updated mediawiki/mediawiki-codesniffer from v20.0.0 to v21.0.0.
84 * Updated composer/spdx-licenses from 1.3.0 to 1.4.0.
85 * Updated jquery.i18n from 1.0.4 to 1.0.5.
86 * Updated wikimedia/timestamp from 1.0.0 to 2.0.0.
87 * Updated wikimedia/remex-html from 1.0.3 to 2.0.0.
88
89 ==== New external libraries ====
90 * Added wikimedia/xmp-reader 0.6.0
91 * …
92
93 ==== Removed and replaced external libraries ====
94 * …
95
96 === Bug fixes in 1.32 ===
97 * SpecialPage::execute() will now only call checkLoginSecurityLevel() if
98 getLoginSecurityLevel() returns non-false.
99
100 === Action API changes in 1.32 ===
101 * Added templated parameters.
102 * A module can define a templated parameter like "{fruit}-quantity", where
103 the actual parameters recognized correspond to the values of a multi-valued
104 parameter. Then clients can make requests like
105 "fruits=apples|bananas&apples-quantity=1&bananas-quantity=5".
106 * action=paraminfo will return templated parameter definitions separately
107 from normal parameters. All parameter definitions now include an "index"
108 key to allow clients to maintain parameter ordering when merging normal and
109 templated parameters.
110 * It is now an error to submit too many values for a multi-valued parameter.
111 This has generated a warning since MediaWiki 1.14.
112 * Assertion failures from the 'assert' and 'assertuser' parameters will no
113 longer use the action module's custom response format, for the few modules
114 that use custom formatters that handle errors.
115 * (T198935) User list preferences such as `email-blacklist` and similar
116 extension preferences are no longer represented as arrays when returned by
117 action=query&meta=userinfo&uiprop=options.
118 * 'missingparam' errors will now use the prefixed parameter name in the code
119 and error text, e.g. "noxxfoo" and "The 'xxfoo' parameter must be set" rather
120 than "nofoo" and "The 'foo' parameter must be set".
121 * action=query&prop=revisions now takes a 'rvslots' parameter to indicate the
122 multi-content revision slots for which content should be returned. It also
123 has a new rvprop, 'roles', to indicate which roles have slots. A deprecation
124 warning will be issued if rvprop=content or rvprop=contentmodel are used
125 without rvslots.
126 * The rvcontentformat parameter to action=query&prop=revisions has been
127 deprecated. Clients should be prepared to deal with the default format for
128 relevant models.
129 * Use of the deprecated parameters rvexpandtemplates, rvgeneratexml, rvparse,
130 rvdiffto, rvdifftotext, rvdifftotextpst, rvcontentformat, or the deprecated
131 rvprop=parsetree is forbidden with the new 'rvslots' parameter.
132 * action=query&prop=deletedrevisions, action=query&list=allrevisions, and
133 action=query&list=alldeletedrevisions are changed similarly to
134 &prop=revisions (see the three previous items).
135
136 === Action API internal changes in 1.32 ===
137 * Added 'ApiParseMakeOutputPage' hook.
138 * Parameter names may no longer contain '{' or '}', as these are now used for
139 templated parameters.
140 * (T194950) Added 'ApiMaxLagInfo' hook.
141 * Added 'ApiParseMakeOutputPage' hook.
142 * The following methods now take a RevisionRecord rather than a Revision. No
143 external callers are known.
144 * ApiFeedContributions::feedItemAuthor()
145 * ApiFeedContributions::feedItemDesc()
146 * ApiQueryRevisionsBase::extractRevisionInfo()
147
148 === Languages updated in 1.32 ===
149 MediaWiki supports over 350 languages. Many localisations are updated regularly.
150 Below only new and removed languages are listed, as well as changes to languages
151 because of Phabricator reports.
152
153 * (T193566) Added language support for Ambonese Malay (abs).
154 * (T194047) Added language support for Shawiya, Latin script (shy-latn).
155 * (T195940) Added language support for Batak Mandailing (btm).
156 * (T137491) Added language support for Standard Moroccan Amazigh (zgh).
157 * (T198132) Added language support for Manipuri (mni).
158 * (T201276) Added language support for Western Armenian (hyw).
159 * (T201583) Added language support for Mon (mnw).
160
161 === Breaking changes in 1.32 ===
162 * $wgRequestTime, deprecated in 1.25, was removed. Use
163 $_SERVER['REQUEST_TIME_FLOAT'] or WebRequest::getElapsedTime() instead.
164 * The MediaWikiI18N class, deprecated in 1.31, was removed.
165 * QuickTemplate::setTranslator(), deprecated in 1.31, was removed. Use
166 Skin::msg() instead.
167 * wfInitShellLocale(), deprecated in 1.30, was removed.
168 * wfShellExecDisabled(), deprecated in 1.30, was removed.
169 * The type string for the parameter $lang of DateFormatter::getInstance,
170 deprecated in 1.31, was removed.
171 * The EDIT_TOKEN_SUFFIX constant deprecated in 1.27, was removed. Use
172 MediaWiki\Session\Token::SUFFIX instead.
173 * EditPage::isOouiEnabled() deprecated in 1.30, was removed.
174 * mw.util.wikiGetlink(), deprecated in 1.23, was removed. Use mw.util.getUrl()
175 instead.
176 * (T61113) The following methods and constants from the Revision class, which
177 were deprecated in 1.25, have now been removed:
178 * Revision::getRawUser()
179 * Revision::getRawUserText()
180 * Revision::getRawComment()
181 * window.gM() from mediawiki.jqueryMsg, deprecated in 1.23, was removed. Use
182 mw.msg() or mw.message() instead.
183 * mw.util.escapeId(), deprecated in 1.30, was removed. Use
184 mw.util.escapeIdForAttribute or mw.util.escapeIdForLink instead.
185 * mw.util.updateTooltipAccessKeys(), deprecated in 1.24, was removed. Use
186 jquery.accessKeyLabel instead.
187 * The SqlDataUpdate class, deprecated in 1.28, has been removed.
188 * The Html5Internal and Html5Depurate tidy driver classes were removed, along
189 with the Balancer tidy implementation. Both implementations were experimental,
190 and were replaced by RemexHtml.
191 * (T179624) Job::insert() and ::batchInsert(), deprecated in 1.21, were both
192 removed. Use JobQueueGroup::singleton()->push() instead.
193 * The jquery.footHovzer module, for mediawiki.debug, was removed.
194 * The es5-shim module, empty and deprecated since 1.29, was removed.
195 * the dom-level2-shim module, empty and deprecated since 1.29, was removed.
196 * the json module, empty and deprecated since 1.29, was removed.
197 * The mediawiki.widgets.visibleByteLimit module alias, deprecated in 1.32, was
198 removed. Use mediawiki.widgets.visibleLengthLimit instead.
199 * The jquery.farbtastic module, unused since 1.18, was removed.
200 * The 'jquery.expandableField' module, unused since 1.22, was removed.
201 * (T181318) The $wgStyleVersion setting and its appendage to various script and
202 style URLs in OutputPage, deprecated in 1.31, was removed.
203 * The hooks 'PreferencesFormPreSave' and 'PreferencesGetLegend' may provide
204 any HTMLForm object rather than PreferencesForm.
205 * The non namespaced TimestampException class, deprecated in 1.29, was removed.
206 Use Wikimedia\Timestamp\TimestampException instead.
207 * The global functions codepointToUtf8, hexSequenceToUtf8, utf8ToHexSequence,
208 utf8ToCodepoint, and escapeSingleString (deprecated in 1.25) were removed.
209 The UtfNormal\Utils class from the utfnormal library should be used instead.
210 * The deprecated UTF8_ and UNICODE_ constants were removed. The class constants
211 from the UtfNormal\Constants class from the utfnormal library should be used
212 * (T140807) The wgResourceLoaderLESSImportPaths configuration option was removed
213 from ResourceLoader. Instead, use `@import` statements in LESS to import
214 files directly from nearby directories within the same project.
215 * (T140804) The wgResourceLoaderLESSVars configuration option, deprecated
216 since 1.30, was removed. Instead, to expose variables from PHP to LESS, use
217 the ResourceLoaderModule::getLessVars() method.
218 * The protected methods PHPSessionHandler::returnSuccess() and returnFailure(),
219 only needed for PHP5 compatibility, have been removed. It now uses the boolean
220 values `true` and `false` respectively.
221 * The $parserMemc global and wfGetParserCacheStorage(), deprecated since 1.30,
222 were removed. Use the ParserCache class instead.
223 * ScopedCallback (deprecated in 1.28) was removed. Use Wikimedia\ScopedCallback
224 instead.
225 * Support for ResourceLoaderModule::getModifiedTime() and getModifiedHash(),
226 deprecated since 1.26, was removed. Use getDefinitionSummary() instead.
227 * (T195256) Skins are recommended not to rely on JavaScript for the "mw-jump"
228 and "jump-to-nav" accessibility links. To this end, the "jquery.mw-jump"
229 is no longer loaded by default. The Vector and MonoBook skins have made a
230 minor change to implement the toggle feature with CSS instead. To restore
231 prior functionality, either explicitly load "jquery.mw-jump" in your skin
232 or refer to T195256 for details on how to make the same change.
233 * Hook 'EditPageBeforeEditChecks' was removed;
234 use 'EditPageGetCheckboxesDefinition' instead.
235 * Linker::getLinkColour() and DummyLinker::getLinkColour(), deprecated since
236 1.28, were removed. LinkRenderer::getLinkClasses() should be used instead.
237 * Wikimedia\Rdbms\LoadBalancer::getLaggedSlaveMode(), deprecated in 1.28, has
238 been removed. Use Wikimedia\Rdbms\LoadBalancer::getLaggedReplicaMode()
239 instead.
240 * mw.widgets.CategoryMultiselectWidget now uses TagMultiselectWidget instead of
241 CapsuleMultiselectWidget. The following methods may no longer be used:
242 * setItemsFromData: Use setValue instead
243 * getItemsData: Use getItems instead and get the data property
244 * Two OutputPage methods, addMetadataLink() and getMetadataAttribute(), were
245 removed. Use addLink() instead.
246 * Another two OutputPage methods, setPageTitleActionText() and
247 getPageTitleActionText(), were removed. They did nothing since 1.15 (almost
248 ten years). Use setHTMLTitle() directly.
249 * All MagicWord static member variables have been removed. Use appropriate
250 hooks or MagicWordFactory methods instead.
251 * MagicWord::clearCache() has been removed. Instead, create a new
252 MagicWordFactory, such as by calling
253 resetServiceForTesting( 'MagicWordFactory' ) on a MediaWikiServices.
254 * mw.util.init() has been removed. This function is not needed anymore and was
255 a no-op function since 1.30.
256 * SpecialPageFactory::resetList() is a no-op. Call overrideMwServices()
257 instead.
258
259 === Deprecations in 1.32 ===
260 * Use of a StartProfiler.php file is deprecated in favour of placing
261 configuration in LocalSettings.php.
262 * HTMLForm::setSubmitProgressive() is deprecated. No need to call it. Submit
263 button is already marked as progressive.
264 * Skin::setupSkinUserCss() is deprecated. Adding of modules to load
265 has been centralised to Skin::getDefaultModules(), which is now capable
266 of queueing style modules as well.
267 * OutputPage::addModuleScripts() and ParserOutput::addModuleScripts are
268 deprecated. Use addModules() instead.
269 * Overriding SearchEngine::{searchText,searchTitle,searchArchiveTitle}
270 in extending classes is deprecated. Extend related doSearch* methods
271 instead.
272 * CollationFa has been removed completely as it's not needed anymore
273 * The following 'mediawiki.api' plugin modules were merged into mediawiki.api
274 and deprecated: mediawiki.api.category, mediawiki.api.edit,
275 mediawiki.api.login, mediawiki.api.options, mediawiki.api.parse,
276 mediawiki.api.upload, mediawiki.api.user, mediawiki.api.watch,
277 mediawiki.api.messages, and mediawiki.api.rollback.
278 * ApiBase::truncateArray() is deprecated. No replacement, as nothing is known
279 to use it.
280 * WatchAction::getUnwatchToken is deprecated. Use WatchAction::getWatchToken
281 with the 'unwatch' action parameter instead.
282 * IcuCollation::getICUVersion() is deprecated, as you can just use the PHP
283 constant INTL_ICU_VERSION directly in all versions that MediaWiki supports.
284 * Parser::fetchFile() is deprecated. Use ::fetchFileAndTitle() instead.
285 * The ApiQueryContributions class has been renamed to ApiQueryUserContribs.
286 * The XMPInfo, XMPReader, and XMPValidate classes have been deprecated in favor
287 of the namespaced classes provided by the wikimedia/xmp-reader library.
288 * SearchResultSet::{next,rewind} are deprecated. Calling code should
289 use foreach on the SearchResultSet, or the extractResults method. Extending
290 code should override extractResults.
291 * Instantiating SearchResultSet directly is deprecated. SearchEngine
292 implementations must subclass SearchResultSet for their purposes.
293 * SearchResult::setExtensionData argument has been changed from accepting an
294 array to accepting a Closure that returns the array when called.
295 * Class CryptRand, everything in MWCryptRand except generateHex() and function
296 MediaWikiServices::getCryptRand() are deprecated, use random_bytes() to
297 generate cryptographically secure random byte sequences.
298 * Parser::getConverterLanguage() is deprecated. Use ::getTargetLanguage()
299 instead.
300 * Language::markNoConversion() is deprecated. It confused readers because
301 it had unexpected behavior (only marking text if it looked like a URL)
302 and was only used in a single place in the code. Use
303 LanguageConverter::markNoConversion() instead.
304 * (T197492) Language::truncate() was soft deprecated in 1.31 and is
305 hard deprecated in this release. It has been split into two similar
306 methods, Language::truncateForVisual() and Language::truncateForDatabase(),
307 which measure length in characters and bytes, respectively. Use
308 Language::truncateForVisual() when possible to provide equity to users
309 of multibyte scripts.
310 * (T176526) EditPage::getContextTitle() falling back to $wgTitle when the
311 context title is unset is now deprecated; anything creating an EditPage
312 instance should set the context title via ::setContextTitle().
313 * The 'jquery.hidpi' module (polyfill for IMG srcset) is deprecated.
314 * ResourceLoaderStartUpModule::getStartupModules() and ::getLegacyModules()
315 are deprecated. These concepts are obsolete and have no replacement.
316 * String type for $lang of DifferenceEngine::setTextLanguage is deprecated.
317 * The following methods of OutputPage are now deprecated in favour
318 of using showFatalError directly: OutputPage::showFileDeleteError()
319 OutputPage::showFileNotFoundError(), OutputPage::showFileRenameError()
320 OutputPage::showFileCopyError() and OutputPage::showUnexpectedValueError().
321 * The Replacer, DoubleReplacer, HashtableReplacer, and RegexlikeReplacer
322 classes are now deprecated. Use a Closure instead.
323 * (T194263) ContentHandler::makeParserOptions() is deprecated. Use
324 WikiPage::makeParserOptions() or ParserOptions::newCanonical() instead.
325 * (T100681) Use of the Parsoid v1 API with the VirtualRESTService, deprecated in
326 MediaWiki 1.26, is now hard-deprecated. All known clients were converted to
327 the Parsoid v3 API in May 2015.
328 * $input is deprecated in hook 'LogEventsListGetExtraInputs'. Use
329 $formDescriptor instead.
330 * SearchEngine::transformSearchTerm( $term ) should no longer be called prior
331 to running searchText. This method was mainly implemented to support the
332 'prefix' URI param in SpecialSearch, but there are no reasons to expose this
333 logic as it should be handled internally by SearchEngine implementations
334 supporting this feature. SearchEngine implementations should no longer
335 override this methods.
336 * SearchEngine::replacePrefixes( $query ) should no longer be called prior
337 to running searchText/searchTitle.
338 * (T199657) Messages for $wgFilterLogTypes labels should be no longer be in the
339 'log-show-hide-[type]' format. Instead use 'logeventslist-[type]-log'.
340 * Global functions wfArrayFilter() and wfArrayFilterByKey() are deprecated.
341 use array_filter() directly.
342 * The $wgShowSQLErrors global is deprecated and nonfunctional.
343 Set $wgShowExceptionDetails and/or $wgShowHostnames instead.
344 * The $wgShowDBErrorBacktrace global is deprecated and nonfunctional.
345 Set $wgShowExceptionDetails instead.
346 * Public access to the DifferenceEngine properties mOldid, mNewid, mOldPage,
347 mNewPage, mOldContent, mNewContent, mRevisionsLoaded, mTextLoaded and
348 mCacheHit is deprecated. Use getOldid() / getNewid() for the first two,
349 do your own lookup for page/content. mNewRev / mOldRev remains public.
350 * The $wgExternalDiffEngine value 'wikidiff2' is deprecated. To use wikidiff2
351 just enable the PHP extension, and it will be autodetected.
352 * The wfUseMW function, soft-deprecated in 1.26, is now hard deprecated.
353 * All MagicWord static methods are now deprecated. Use the MagicWordFactory
354 methods instead.
355 * PasswordFactory::init is deprecated. To get a password factory with the
356 standard configuration, use MediaWikiServices::getPasswordFactory.
357 * $wgContLang is deprecated, use MediaWikiServices::getContentLanguage()
358 instead.
359 * $wgParser is deprecated, use MediaWikiServices::getParser() instead.
360 * wfGetMainCache() is deprecated, use ObjectCache::getLocalClusterInstance()
361 instead.
362 * wfGetCache() is deprecated, use ObjectCache::getInstance() instead.
363 * All SpecialPageFactory static methods are deprecated. Instead, call the
364 methods on a SpecialPageFactory instance, which may be obtained from
365 MediaWikiServices.
366
367 === Other changes in 1.32 ===
368 * (T198811) The following tables have had their UNIQUE indexes turned into
369 proper PRIMARY KEYs for increased maintainability: interwiki, page_props,
370 protected_titles and site_identifiers.
371 * OOUI HTMLForm will now display help text inline after the input field,
372 rather than in a popup. Previous behavior can be restored by using
373 `'help-inline' => false`.
374 * …
375
376 == Compatibility ==
377 MediaWiki 1.32 requires PHP 7.0.0 or later. Although HHVM 3.18.5 or later is
378 supported, it is generally advised to use PHP 7.0.0 or later for long term
379 support.
380
381 MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used,
382 but support for them is somewhat less mature. There is experimental support for
383 Oracle and Microsoft SQL Server.
384
385 The supported versions are:
386
387 * MySQL 5.5.8 or later
388 * PostgreSQL 9.2 or later
389 * SQLite 3.3.7 or later
390 * Oracle 9.0.1 or later
391 * Microsoft SQL Server 2005 (9.00.1399)
392
393 == Upgrading ==
394 1.32 has several database changes since 1.31, and will not work without schema
395 updates. Note that due to changes to some very large tables like the revision
396 table, the schema update may take quite long (minutes on a medium sized site,
397 many hours on a large site).
398
399 Don't forget to always back up your database before upgrading!
400
401 See the file UPGRADE for more detailed upgrade instructions, including
402 important information when upgrading from versions prior to 1.11.
403
404 For notes on 1.31.x and older releases, see HISTORY.
405
406 == Online documentation ==
407 Documentation for both end-users and site administrators is available on
408 MediaWiki.org, and is covered under the GNU Free Documentation License (except
409 for pages that explicitly state that their contents are in the public domain):
410
411 https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
412
413 == Mailing list ==
414 A mailing list is available for MediaWiki user support and discussion:
415
416 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
417
418 A low-traffic announcements-only list is also available:
419
420 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
421
422 It's highly recommended that you sign up for one of these lists if you're
423 going to run a public MediaWiki, so you can be notified of security fixes.
424
425 == IRC help ==
426 There's usually someone online in #mediawiki on irc.freenode.net.