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