Add hook EnhancedChangesList::getLogText
[lhc/web/wiklou.git] / RELEASE-NOTES-1.25
1 Security reminder: If you have PHP's register_globals option set, you must
2 turn it off. MediaWiki will not work with it enabled.
3
4 == MediaWiki 1.25 ==
5
6 THIS IS NOT A RELEASE YET
7
8 MediaWiki 1.25 is an alpha-quality branch and is not recommended for use in
9 production.
10
11 === Configuration changes in 1.25 ===
12 * $wgPageShowWatchingUsers was removed.
13 * $wgLocalVirtualHosts has been added to replace $wgConf->localVHosts.
14 * $wgAntiLockFlags was removed.
15 * $wgJavaScriptTestConfig was removed.
16 * Edit tokens returned from User::getEditToken may change on every call. Token
17 validity must be checked by passing the user-supplied token to
18 User::matchEditToken rather than by testing for equality with a
19 newly-generated token.
20 * (T74951) The UserGetLanguageObject hook may be passed any IContextSource
21 for its $context parameter. Formerly it was documented as receiving a
22 RequestContext specifically.
23 * Profiling was restructured and $wgProfiler now requires an 'output' parameter.
24 See StartProfiler.sample for details.
25 * $wgMangleFlashPolicy was added to make MediaWiki's mangling of anything that
26 might be a flash policy directive configurable.
27 * ApiOpenSearch now supports XML output. The OpenSearchXml extension should no
28 longer be used. If extracts and page images are desired, the TextExtracts and
29 PageImages extensions are required.
30 * $wgOpenSearchTemplate is deprecated in favor of $wgOpenSearchTemplates.
31 * Edits are now prepared via AJAX as users type edit summaries. This behavior
32 can be disabled via $wgAjaxEditStash.
33 * (T46740) The temporary option $wgIncludejQueryMigrate was removed, along
34 with the jQuery Migrate library, as indicated when this option was provided in
35 MediaWiki 1.24.
36 * ProfilerStandard and ProfilerSimpleTrace were removed. Make sure that any
37 StartProfiler.php config is updated to reflect this. Xhprof is available
38 for zend/hhvm. Also, for hhvm, one can consider using its xenon profiler.
39 * Default value of $wgSVGConverters['rsvg'] now uses the 'rsvg-convert' binary
40 rather than 'rsvg'.
41 * Default value of $wgSVGConverters['ImageMagick'] now uses transparent
42 background with white fallback color, rather than just white background.
43 * MediaWikiBagOStuff class removed, make sure any object cache config
44 uses SqlBagOStuff instead.
45 * The 'daemonized' flag must be set to true in $wgJobTypeConf for any redis
46 job queues. This means that mediawiki/services/jobrunner service has to
47 be installed and running for any such queues to work.
48
49 === New features in 1.25 ===
50 * (T64861) Updated plural rules to CLDR 26. Includes incompatible changes
51 for plural forms in Russian, Prussian, Tagalog, Manx and several languages
52 that fall back to Russian.
53 * (T60139) ResourceLoaderFileModule now supports language fallback
54 for 'languageScripts'.
55 * Added a new hook, "ContentAlterParserOutput", to allow extensions to modify the
56 parser output for a content object before links update.
57 * (T37785) Enhanced recent changes and extended watchlist are now default.
58 Documentation: https://meta.wikimedia.org/wiki/Help:Enhanced_recent_changes
59 and https://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions.
60 * (T69341) SVG images will no longer be base64-encoded when being embedded
61 in CSS. This results in slight size increase before gzip compression (due to
62 percent-encoding), but up to 20% decrease after it.
63 * Update jStorage to v0.4.12.
64 * MediaWiki now natively supports page status indicators: icons (or short text
65 snippets) usually displayed in the top-right corner of the page. They have
66 been in use on Wikipedia for a long time, implemented using templates and CSS
67 absolute positioning.
68 - Basic wikitext syntax: <indicator name="foo">[[File:Foo.svg|20px]]</indicator>
69 - Usage instructions: https://www.mediawiki.org/wiki/Help:Page_status_indicators
70 - Adjusting custom skins to support indicators:
71 https://www.mediawiki.org/wiki/Manual:Skinning#Page_status_indicators
72 * Edit tokens may now be time-limited: passing a maximum age to
73 User::matchEditToken will reject any older tokens.
74 * The debug logging internals have been overhauled, and are now using the
75 PSR-3 interfaces.
76 * Update CSSJanus to v1.1.1.
77 * Update lessphp to v0.5.0.
78 * Added a hook, "ApiOpenSearchSuggest", to allow extensions to provide extracts
79 and images for ApiOpenSearch output. The semantics are identical to the
80 "OpenSearchXml" hook provided by the OpenSearchXml extension.
81 * PrefixSearchBackend hook now has an $offset parameter. Combined with $limit,
82 this allows for pagination of prefix results. Extensions using this hook
83 should implement supporting behavior. Not doing so can result in undefined
84 behavior from API clients trying to continue through prefix results.
85 * Update jQuery from v1.11.1 to v1.11.2.
86 * External libraries installed via composer will now be displayed
87 on Special:Version in their own section. Extensions or skins that are
88 installed via composer will not be shown in this section as it is assumed
89 they will add the proper credits to the skins or extensions section. They
90 can also be accessed through the API via the new siprop=libraries to
91 ApiQuerySiteInfo.
92 * Update QUnit from v1.14.0 to v1.16.0.
93 * Update Moment.js from v2.8.3 to v2.8.4.
94 * Special:Tags now allows for manipulating the list of user-modifiable change
95 tags. Actually modifying the tagging of a revision or log entry is not
96 implemented yet.
97 * Added 'managetags' user right and 'ChangeTagCanCreate', 'ChangeTagCanDelete',
98 and 'ChangeTagCanCreate' hooks to allow for managing user-modifiable change
99 tags.
100 * Added 'ChangeTagsListActive' hook, to separate the concepts of "defined" and
101 "active" formerly conflated by the 'ListDefinedTags' hook.
102 * Added TemplateParser class that provides a server-side interface to cachable
103 dynamically-compiled Mustache templates (currently uses lightncandy library).
104 * Clickable anchors for each section heading in the content are now generated
105 and appear in the gutter on hovering over the heading.
106 * Added 'CategoryViewer::doCategoryQuery' and 'CategoryViewer::generateLink' hooks
107 to allow extensions to override how links to pages are rendered within NS_CATEGORY
108 * (T19665) Special:WantedPages only lists page which having at least one red link
109 pointing to it.
110 * New hooks 'ApiMain::moduleManager' and 'ApiQuery::moduleManager', can be
111 used for conditional registration of API modules.
112 * New hook 'EnhancedChangesList::getLogText' to alter, remove or add to the
113 links of a group of changes in EnhancedChangesList.
114
115 ==== External libraries ====
116 * MediaWiki now requires certain external libraries to be installed. In the past
117 these were bundled inside the Git repository of MediaWiki core, but now they
118 need to be installed separately. For users using the tarball, this will be taken
119 care of and no action will be required. Users using Git will either need to use
120 composer to fetch dependencies or use the mediawiki/vendor repository which includes
121 all dependencies for MediaWiki core and ones used in Wikimedia deployment. Detailed
122 instructions can be found at:
123 https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries
124 * The following libraries are now required:
125 ** psr/log
126 This library provides the interfaces set by the PSR-3 standard (http://www.php-fig.org/psr/psr-3/)
127 which are used by MediaWiki internally via the MWLoggerFactory class.
128 See the structured logging RfC (https://www.mediawiki.org/wiki/Requests_for_comment/Structured_logging)
129 for more background information.
130 ** cssjanus/cssjanus
131 This library was formerly bundled with MediaWiki core and has been removed.
132 It automatically flips CSS for RTL support.
133 ** leafo/lessphp
134 This library was formerly bundled with MediaWiki core and has been removed.
135 It compiles LESS files into CSS.
136 ** wikimedia/cdb
137 This library was formerly a part of MediaWiki core, and has been moved into a separate library.
138 It provides CDB functions which are used in the Interwiki and Localization caches.
139 More information about the library can be found at https://www.mediawiki.org/wiki/CDB.
140
141 === Bug fixes in 1.25 ===
142 * (T73003) No additional code will be generated to try to load CSS-embedded
143 SVG images in Internet Explorer 6 and 7, as they don't support them anyway.
144 * (T69021) On Special:BookSources, corrected validation of ISBNs (both
145 10- and 13-digit forms) containing "X".
146 * Page moving was refactored into a MovePage class. As part of that:
147 ** The AbortMove hook was removed.
148 ** MovePageIsValidMove is for extensions to specify whether a page
149 cannot be moved for technical reasons, and should not be overridden.
150 ** MovePageCheckPermissions is for checking whether the given user is
151 allowed to make the move.
152 ** Title::moveNoAuth() was deprecated. Use the MovePage class instead.
153 ** Title::moveTo() was deprecated. Use the MovePage class instead.
154 ** Title::isValidMoveOperation() broken down into MovePage::isValidMove()
155 and MovePage::checkPermissions().
156 * (T18530) Multiple autocomments are now formatted in an edit summary.
157 * (T70361) Autocomments containing "/*" are parsed correctly.
158 * The Special:WhatLinksHere page linked from 'Number of redirects to this page'
159 on action=info about a file page does not list file links anymore.
160 * (T78637) Search bar is not autofocused unless it is empty so that proper scrolling using arrow keys is possible.
161 * (T50853) Database::makeList() modified to handle 'NULL' separately when building IN clause
162 * (T85192) Captcha position modified in Usercreate template. As a result:
163 ** extrafields parameter added to Usercreate.php to insert additional data
164 ** 'extend' method added to QuickTemplate to append additional values to any field of data array
165 * (T86974) Several Title methods now load from the database when necessary
166 (instead of returning incorrect results) even when the page ID is known.
167 * (T74070) Duplicate search for archived files on file upload now omits the extension.
168 This requires the fa_sha1 field being populated.
169
170 === Action API changes in 1.25 ===
171 * (T67403) XML tag highlighting is now only performed for formats
172 "xmlfm" and "wddxfm".
173 * action=paraminfo supports generalized submodules (modules=query+value),
174 querymodules and formatmodules are deprecated
175 * action=paraminfo no longer outputs descriptions and other help text by
176 default. If needed, it may be requested using the new 'helpformat' parameter.
177 * action=help has been completely rewritten, and outputs help in HTML
178 rather than plain text.
179 * Hitting api.php without specifying an action now displays only the help for
180 the main module, with links to submodule help.
181 * API help is no longer displayed on errors.
182 * 'uselang' is now a recognized API parameter; "uselang=user" may be used to
183 explicitly select the language from the current user's preferences, and
184 "uselang=content" may be used to select the wiki's content language.
185 * Default output format for the API is now jsonfm.
186 * Simplified continuation will return a "batchcomplete" property in the result
187 when a batch of pages is complete.
188 * Pretty-printed HTML output now has nicer formatting and (if available)
189 better syntax highlighting.
190 * Deprecated list=deletedrevs in favor of newly-added prop=deletedrevisions and
191 list=alldeletedrevisions.
192 * prop=revisions will gracefully continue when given too many revids or titles,
193 rather than just ignoring the extras.
194 * prop=revisions will no longer die if rvcontentformat doesn't match a
195 revision's content model; it will instead warn and omit the content.
196 * If the user has the 'deletedhistory' right, action=query's revids parameter
197 will now recognize deleted revids.
198 * prop=revisions may be used as a generator, generating revids.
199 * (T68776) format=json results will no longer be corrupted when
200 $wgMangleFlashPolicy is in effect. format=php results will cleanly return an
201 error instead of returning invalid serialized data.
202 * Generators may now return data for the generated pages when used with
203 action=query.
204 * Query page data for generator=search and generator=prefixsearch will now
205 include an "index" field, which may be used by the client for sorting the
206 search results.
207 * ApiOpenSearch now supports XML output.
208 * ApiOpenSearch will now output descriptions and URLs as array indexes 2 and 3
209 in JSON format.
210 * (T76051) list=tags will now continue correctly.
211 * (T76052) list=tags can now indicate whether a tag is defined.
212 * (T75522) list=prefixsearch now supports continuation
213 * (T78737) action=expandtemplates can now return page properties.
214 * (T78690) list=allimages now accepts multiple pipe-separated values
215 for the 'aimime' parameter.
216 * prop=info with inprop=protections will now return applicable protection types
217 with the 'restrictiontypes' key.
218 * (T85417) When resolving redirects, ApiPageSet will now add the targets of
219 interwiki redirects to the list of interwiki titles.
220 * (T85417) When outputting the list of redirect titles, a 'tointerwiki'
221 property (like the existing 'tofragment' property) will be set.
222 * Added action=managetags to allow for managing the list of
223 user-modifiable change tags. Actually modifying the tagging of a revision or
224 log entry is not implemented yet.
225 * list=tags has additional properties to indicate 'active' status and tag
226 sources.
227 * siprop=libraries was added to ApiQuerySiteInfo to list installed external libraries.
228 * (T88010) Added action=checktoken, to test a CSRF token's validity.
229 * (T88010) Added intestactions to prop=info, to allow querying of
230 Title::userCan() via the API.
231 * Default type param for query list=watchlist and list=recentchanges has
232 been changed from all types (e.g. including 'external') to 'edit|new|log'.
233
234 === Action API internal changes in 1.25 ===
235 * ApiHelp has been rewritten to support i18n and paginated HTML output.
236 Most existing modules should continue working without changes, but should do
237 the following:
238 * Add an i18n message "apihelp-{$moduleName}-description" to replace getDescription().
239 * Add i18n messages "apihelp-{$moduleName}-param-{$param}" for each parameter
240 to replace getParamDescription(). If necessary, the settings array returned
241 by getParams() can use the new ApiBase::PARAM_HELP_MSG key to override the
242 message.
243 * Implement getExamplesMessages() to replace getExamples().
244 * Modules with submodules (like action=query) must have their submodules
245 override ApiBase::getParent() to return the correct parent object.
246 * The 'APIGetDescription' and 'APIGetParamDescription' hooks are deprecated,
247 and will have no effect for modules using i18n messages. Use
248 'APIGetDescriptionMessages' and 'APIGetParamDescriptionMessages' instead.
249 * Api formatters will no longer be asked to display the help screen on errors.
250 * ApiMain::getCredits() was removed. The credits are available in the
251 'api-credits' i18n message.
252 * ApiFormatBase has been changed to support i18n and syntax highlighting via
253 extensions with the new 'ApiFormatHighlight' hook. Core syntax highlighting
254 has been removed.
255 * ApiFormatBase now always buffers. Output is done when
256 ApiFormatBase::closePrinter is called.
257 * Much of the logic in ApiQueryRevisions has been split into ApiQueryRevisionsBase.
258 * The 'revids' parameter supplied by ApiPageSet will now count deleted
259 revisions as "good" if the user has the 'deletedhistory' right. New methods
260 ApiPageSet::getLiveRevisionIDs() and ApiPageSet::getDeletedRevisionIDs() are
261 provided to access just the live or just the deleted revids.
262 * Added ApiPageSet::setGeneratorData() and ApiPageSet::populateGeneratorData()
263 to allow generators to include data in the action=query result.
264 * New hooks 'ApiMain::moduleManager' and 'ApiQuery::moduleManager', can be
265 used for conditional registration of API modules.
266 * The following methods have been deprecated and may be removed in a future
267 release:
268 * ApiBase::getDescription
269 * ApiBase::getParamDescription
270 * ApiBase::getExamples
271 * ApiBase::makeHelpMsg
272 * ApiBase::makeHelpArrayToString
273 * ApiBase::makeHelpMsgParameters
274 * ApiFormatBase::setUnescapeAmps
275 * ApiFormatBase::getWantsHelp
276 * ApiFormatBase::setHelp
277 * ApiFormatBase::formatHTML
278 * ApiFormatBase::setBufferResult
279 * ApiFormatBase::getDescription
280 * ApiMain::setHelp
281 * ApiMain::reallyMakeHelpMsg
282 * ApiMain::makeHelpMsgHeader
283 * ApiQueryImageInfo::getPropertyDescriptions
284 * The following classes have been deprecated and may be removed in a future
285 release:
286 * ApiQueryDeletedrevs
287
288 === Languages updated in 1.25 ===
289
290 MediaWiki supports over 350 languages. Many localisations are updated
291 regularly. Below only new and removed languages are listed, as well as
292 changes to languages because of Bugzilla reports.
293
294 * (T66440) Kazakh (kk) wikis should no longer forcefully reset the user's
295 interface language to kk where unexpected.
296
297 === Other changes in 1.25 ===
298 * The skin autodiscovery mechanism, deprecated in MediaWiki 1.23, has been
299 removed. See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for
300 migration guide for creators and users of custom skins that relied on it.
301 * Javascript variables 'wgFileCanRotate' and 'wgFileExtensions' now only
302 available on Special:Upload.
303 * (T58257) Set site logo from mediawiki.skinning.interface module instead of
304 inline styles in the HTML.
305 * Removed ApiQueryUsers::getAutoGroups(). (deprecated since 1.20)
306 * Removed XmlDumpWriter::schemaVersion(). (deprecated since 1.20)
307 * Removed LogEventsList::getDisplayTitle(). (deprecated since 1.20)
308 * Removed Preferences::trySetUserEmail(). (deprecated since 1.20)
309 * Removed mw.user.name() and mw.user.anonymous() methods. (deprecated since 1.20)
310 * Removed 'ok' and 'err' parameters in the mediawiki.api modules. (deprecated
311 since 1.20)
312 * Removed 'async' parameter from the mw.Api#getCategories() method. (deprecated
313 since 1.20)
314 * Removed 'jquery.json' module. (deprecated since 1.24)
315 Use the 'json' module and global JSON object instead.
316 * Deprecated OutputPage::readOnlyPage() and OutputPage::rateLimited().
317 Also, the former will now throw an MWException if called with one or more
318 arguments.
319 * Removed hitcounters and associated code.
320 * The "temp" zone of the upload respository is now considered private. If it
321 already exists (such as under the images/ directory), please make sure that
322 the directory is not web readable (e.g. via a .htaccess file).
323 * BREAKING CHANGE: In the XML dump format used by Special:Export and
324 dumpBackup.php, the <model> and <format> tags now apprear before the <text>
325 tag, instead of after the <text> and <sha1> tags.
326 The new schema version is 0.10, the new schema URI is:
327 https://www.mediawiki.org/xml/export-0.10.xsd
328 * MWFunction::call() and MWFunction::callArray() were removed, having being
329 deprecated in 1.22.
330 * Deprecated the getInternalLinkAttributes, getInternalLinkAttributesObj,
331 and getInternalLinkAttributes methods in Linker, and removed
332 getExternalLinkAttributes method, which was deprecated in MediaWiki 1.18.
333 * Removed Sites class, which was deprecated in 1.21 and replaced by SiteSQLStore.
334 * The mw.api.getToken() method now uses action=query?meta=tokens. This will now
335 fail for custom tokens registered only via the deprecated ApiTokensGetTokenTypes
336 hook. The ApiQueryTokensRegisterTypes hook should be used for this to work.
337 * Added wgRelevantArticleId to the client-side config, for use on special pages.
338 * Deprecated the TitleIsCssOrJsPage hook. Superseded by the
339 ContentHandlerDefaultModelFor hook since MediaWiki 1.21.
340 * Deprecated the TitleIsWikitextPage hook. Superseded by the
341 ContentHandlerDefaultModelFor hook since MediaWiki 1.21.
342 * Changed parsing of variables in schema (.sql) files:
343 ** The substituted values are no longer parsed. (Formerly, several passes
344 were made for each variable, so depending on the order in which variables
345 were defined, variables might have been found inside encoded values. This
346 is no longer the case.)
347 ** Variables are no longer string encoded when the /*$var*/ syntax is used.
348 If string encoding is necessary, use the '{$var}' syntax instead.
349 ** Variable names must only consist of one or more of the characters
350 "A-Za-z0-9_".
351 ** In source text of the form '{$A}'{$B}' or `{$A}`{$B}`, where variable A
352 does not exist yet variable B does, the latter may not be replaced.
353 However, this difference is unlikely to arise in practice.
354 * (T67278) RFC, PMID, and ISBN "magic links" must be surrounded by non-word
355 characters on both sides.
356 * The FormatAutocomments hook will now receive $pre and $post as booleans,
357 rather than as strings that must be prepended or appended to $comment.
358 * (T30950, T31025) RFC, PMID, and ISBN "magic links" can no longer contain
359 newlines; but they can contain &nbsp; and other non-newline whitespace.
360 * The 'mediawiki.action.edit' ResourceLoader module no longer generates the edit
361 toolbar, which has been moved to a separate 'mediawiki.toolbar' module. If you
362 relied on this behavior, update your scripts' dependencies.
363 * HTMLForm's 'vform' display style has been separated to a subclass. Therefore:
364 * HTMLForm::isVForm() is now deprecated.
365 * You can no longer do this:
366 $form = new HTMLForm( … );
367 $form->setDisplayFormat( 'vform' ); // throws exception
368 Instead, do this:
369 $form = HTMLForm::factory( 'vform', … );
370 * Deprecated Revision methods getRawUser(), getRawUserText() and getRawComment().
371 * BREAKING CHANGE: mediawiki.user.generateRandomSessionId:
372 The alphabet of the prior string returned was A-Za-z0-9 and now it is 0-9A-F
373 * (T87504) Avoid serving SVG background-images in CSS for Opera 12, which
374 renders them incorrectly when combined with border-radius or background-size.
375 * Removed maintenance script dumpSisterSites.php.
376 * DatabaseBase class constructors must be called using the array argument style.
377 Ideally, DatabaseBase:factory() should be used instead in most cases.
378 * Deprecated ParserOutput::addSecondaryDataUpdate and ParserOutput::getSecondaryDataUpdates.
379 This is a hard deprecation, with getSecondaryDataUpdates returning an empty array and
380 addSecondaryDataUpdate throwing an exception. These functions will be removed in 1.26,
381 since they interfere with caching of ParserOutput objects.
382 * Introduced new hook 'SecondaryDataUpdates' that allows extensions to inject custom updates.
383
384 == Compatibility ==
385
386 MediaWiki 1.25 requires PHP 5.3.3 or later. There is experimental support for
387 HHVM 3.3.0.
388
389 MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
390 support for them is somewhat less mature. There is experimental support for
391 Oracle and Microsoft SQL Server.
392
393 The supported versions are:
394
395 * MySQL 5.0.2 or later
396 * PostgreSQL 8.3 or later
397 * SQLite 3.3.7 or later
398 * Oracle 9.0.1 or later
399 * Microsoft SQL Server 2005 (9.00.1399)
400
401 == Upgrading ==
402
403 1.25 has several database changes since 1.24, and will not work without schema
404 updates. Note that due to changes to some very large tables like the revision
405 table, the schema update may take quite long (minutes on a medium sized site,
406 many hours on a large site).
407
408 If upgrading from before 1.11, and you are using a wiki as a commons
409 repository, make sure that it is updated as well. Otherwise, errors may arise
410 due to database schema changes.
411
412 If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
413 new database fields are filled with data.
414
415 If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
416 1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
417 with MediaWiki 1.21.
418
419 Don't forget to always back up your database before upgrading!
420
421 See the file UPGRADE for more detailed upgrade instructions.
422
423 For notes on 1.24.x and older releases, see HISTORY.
424
425 == Online documentation ==
426
427 Documentation for both end-users and site administrators is available on
428 MediaWiki.org, and is covered under the GNU Free Documentation License (except
429 for pages that explicitly state that their contents are in the public domain):
430
431 https://www.mediawiki.org/wiki/Documentation
432
433 == Mailing list ==
434
435 A mailing list is available for MediaWiki user support and discussion:
436
437 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
438
439 A low-traffic announcements-only list is also available:
440
441 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
442
443 It's highly recommended that you sign up for one of these lists if you're
444 going to run a public MediaWiki, so you can be notified of security fixes.
445
446 == IRC help ==
447
448 There's usually someone online in #mediawiki on irc.freenode.net.