API: Add hooks for ApiQueryBase's query and row-processing
[lhc/web/wiklou.git] / RELEASE-NOTES-1.28
1 == MediaWiki 1.28 ==
2
3 THIS IS NOT A RELEASE YET
4
5 MediaWiki 1.28 is an alpha-quality branch and is not recommended for use in
6 production.
7
8 === Configuration changes in 1.28 ===
9 * $wgSend404Code now affects status code of action=history if the page is not there.
10 * BREAKING CHANGE: $wgHTTPProxy is now *required* for all external requests
11 made by MediaWiki via a proxy. Relying on the http_proxy environment
12 variable is no longer supported.
13 * The load.php entry point now enforces the existing policy of not allowing
14 access to session data, which includes the session user and the session
15 user's language. If such access is attempted, an exception will be thrown.
16 * The number of internal PBKDF2 iterations used to derive the session secret
17 is configurable via $wgSessionPbkdf2Iterations.
18 * Upload dialog's file upload log comment can now be configured separately for
19 local and foreign uploads.
20 * $wgForeignUploadTargets now defaults to `[ 'local' ]`, where `'local'`
21 signifies local uploads. A value of `[]` (empty array) now means that
22 no upload targets are allowed, effectively disabling the upload dialog.
23 * The deprecated $wgEditEncoding variable has been removed; it was only used
24 for Esperanto language character conversion. You are now recommended to use
25 input methods provided by the UniversalLanguageSelector extension.
26 * When $wgPingback is true, MediaWiki will periodically ping
27 https://www.mediawiki.org/beacon with basic information about the local
28 MediaWiki installation. This data includes, for example, the type of system,
29 PHP version, and chosen database backend. This behavior is off by default.
30 * When $wgEditSubmitButtonLabelPublish is true, MediaWiki will label the button
31 to store-to-database-and-show-to-others as "Publish page"/"Publish changes";
32 if false, the default, they will be "Save page"/"Save changes".
33 * The 'editcontentmodel' permission is now granted to all logged-in users ('user').
34 instead of just administrators ('sysop'). Documentation for this feature is
35 available at <https://www.mediawiki.org/wiki/Help:ChangeContentModel>.
36 * $wgRevisionCacheExpiry is now set to one week by default instead of being disabled.
37
38 === New features in 1.28 ===
39 * User::isBot() method for checking if an account is a bot role account.
40 * Added a new 'slideshow' mode for galleries.
41 * Added a new hook, 'UserIsBot', to aid in determining if a user is a bot.
42 * Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
43 interact with API parsing.
44 * Added a new hook, 'UploadVerifyUpload', which can be used to reject a file
45 upload. Unlike 'UploadVerifyFile' it provides information about upload comment
46 and the file description page, but does not run for uploads to stash.
47 * (T141604) Extensions can now provide a better error message when their
48 maintenance scripts are run without the extension being installed.
49 * (T8948) Numeric sorting in categories is now supported by setting $wgCategoryCollation
50 to 'uca-default-u-kn' or 'uca-<langcode>-u-kn'. If you can't use UCA collations,
51 a 'numeric' collation is also available. If migrating from another
52 collation, you will need to run the updateCollation.php maintenance script.
53 * Two new codes have been added to #time parser function: "xit" for days in current
54 month, and "xiz" for days passed in the year, both in Iranian calendar.
55 * mw.Api has a new option, useUS, to use U+001F (Unit Separator) when
56 appropriate for sending multi-valued parameters. This defaults to true when
57 the mw.Api instance seems to be for the local wiki.
58 * After a client performs an action which alters a database that has replica databases,
59 MediaWiki will wait for the replica databases to synchronize with the master database
60 while it renders the HTML output. However, if the output is a redirect to another wiki
61 on the wiki farm with a different domain, MediaWiki will instead alter the redirect
62 URL to include a ?cpPosTime parameter that triggers the database synchronization when
63 the URL is followed by the client. The same-domain case uses a new cpPosTime cookie.
64 * Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
65 'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
66 'show' parameters to existing API query modules.
67
68 === External library changes in 1.28 ===
69
70 ==== Upgraded external libraries ====
71 * Updated es5-shim from v4.1.5 to v4.5.8
72 * Updated composer/semver from v1.4.1 to v1.4.2
73 * Updated wikimedia/php-session-serializer from v1.0.3 to v1.0.4
74
75 ==== New external libraries ====
76 * Added wikimedia/scoped-callback v1.0.0
77 * Added wikimedia/wait-condition-loop v1.0.1
78
79 ==== Removed and replaced external libraries ====
80
81 === Bug fixes in 1.28 ===
82 * (T146496) action=history pages should return 404 HTTP error code if the page does not exist
83 * (T137264) SECURITY: XSS in unclosed internal links
84 * (T133147) SECURITY: Escape '<' and ']]>' in inline <style> blocks
85 * (T133147) SECURITY: Require login to preview user CSS pages
86 * (T132926) SECURITY: Do not allow undeleting a revision deleted file if it is
87 the top file
88 * (T129738) SECURITY: Make $wgBlockDisablesLogin also restrict logged in
89 permissions
90 * (T129738) SECURITY: Make blocks log users out if $wgBlockDisablesLogin is true
91 * (T139670) Move 'UserGetRights' call before application of
92 Session::getAllowedUserRights()
93
94 === Action API changes in 1.28 ===
95 * Added 'maxarticlesize' property to action=query&meta=siteinfo which contains
96 the value of $wgMaxArticleSize.
97 * Property 'modulemessages' from action=parse&prop=modules was removed
98 (deprecated since 1.26).
99 * The following response properties from action=login, deprecated in 1.27, are
100 now removed: lgtoken, cookieprefix, sessionid. Clients should handle cookies
101 to properly manage session state.
102 * Submitting the lgtoken and lgpassword parameters in the query string to
103 action=login is now deprecated and outputs a warning. They should be submitted
104 in the POST body instead.
105 * Submitting sensitive authentication request parameters to action=clientlogin,
106 action=createaccount, action=linkaccount, and action=changeauthenticationdata
107 in the query string is now deprecated and outputs a warning. They should be
108 submitted in the POST body instead.
109 * (T141960) Multi-valued parameters may now be separated using U+001F (Unit Separator)
110 instead of the pipe character. This will be useful if some of the multiple
111 values need to contain pipes, e.g. for action=options.
112 * The API will now warn if input is not NFC-normalized Unicode or if it
113 contains invalid characters.
114 * The 'normalized' list output by action=query and other modules that use
115 ApiPageSet may contain entries where the 'from' value is percent-encoded as
116 the raw value cannot be represented in a valid API response. These are
117 indicated by a 'fromencoded' boolean alongside the existing 'from' parameter.
118 * (T28680) action=paraminfo can now return info about all submodules of a
119 module without listing them all explicitly.
120
121 === Action API internal changes in 1.28 ===
122 * Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
123 interact with ApiParse and ApiExpandTemplates.
124 * (T139565) SECURITY: API: Generate head items in the context of the given title
125 * (T115333) SECURITY: Check read permission when loading page content in ApiParse
126 * ApiBase::getResultData() was removed (deprecated since 1.25)
127 * ApiBase::makeHelpArrayToString() was removed (deprecated since 1.25)
128 * ApiBase::makeHelpMsgParameters() was removed (deprecated since 1.25)
129 * ApiBase::makeHelpMsg() was removed (deprecated since 1.25)
130 * ApiFormatBase::formatHTML() was removed (deprecated since 1.25)
131 * ApiFormatBase::getNeedsRawData() was removed (deprecated since 1.25)
132 * ApiFormatBase::getWantsHelp() was removed (deprecated since 1.25)
133 * ApiFormatBase::setBufferResult() was removed (deprecated since 1.25)
134 * ApiFormatBase::setHelp() was removed (deprecated since 1.25)
135 * ApiFormatBase::setUnescapeAmps() was removed (deprecated since 1.25)
136 * ApiMain::makeHelpMsgHeader() was removed (deprecated since 1.25)
137 * ApiMain::reallyMakeHelpMsg() was removed (deprecated since 1.25)
138 * ApiMain::setHelp() was removed (deprecated since 1.25)
139 * ApiResult::beginContinuation() was removed (deprecated since 1.25)
140 * ApiResult::cleanUpUTF8() was removed (deprecated since 1.25)
141 * ApiResult::convertStatusToArray() was removed (deprecated since 1.25)
142 * ApiResult::disableSizeCheck() was removed (deprecated since 1.24)
143 * ApiResult::enableSizeCheck() was removed (deprecated since 1.24)
144 * ApiResult::endContinuation() was removed (deprecated since 1.25)
145 * ApiResult::getData() was removed (deprecated since 1.25)
146 * ApiResult::getIsRawMode() was removed (deprecated since 1.25)
147 * ApiResult::setContent() was removed (deprecated since 1.25)
148 * ApiResult::setContinueParam() was removed (deprecated since 1.25)
149 * ApiResult::setElement() was removed (deprecated since 1.25)
150 * ApiResult::setGeneratorContinueParam() was removed (deprecated since 1.25)
151 * ApiResult::setIndexedTagName_internal() was removed (deprecated since 1.25)
152 * ApiResult::setIndexedTagName_recursive() was removed (deprecated since 1.25)
153 * ApiResult::setMainForContinuation() was removed (deprecated since 1.25)
154 * ApiResult::setParsedLimit() was removed (deprecated since 1.25)
155 * ApiResult::setRawMode() was removed (deprecated since 1.25)
156 * ApiResult::size() was removed (deprecated since 1.25)
157 * Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
158 'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
159 'show' parameters to existing API query modules. A query module can enable
160 these hooks by passing an array for $hookData to ApiQueryBase::select() and
161 by calling ApiQueryBase->processRow() before adding a row's data to the
162 result.
163
164 === Languages updated in 1.28 ===
165
166 MediaWiki supports over 350 languages. Many localisations are updated
167 regularly. Below only new and removed languages are listed, as well as
168 changes to languages because of Phabricator reports.
169
170 * (T137411) ban (Balinese), thanks to translators Adi Mayndra, Andru,
171 BASAbali, M. Adiputra, Naval Scene, Nemo bis, NoiX180, and 아라.
172 * (T135867) shn (Shan), thanks to translators Khun Sar, Piangpha,
173 Saiddzone Saimawnkham, Saosukham, and Sengwan.
174 * Czech (cs) and Slovak (sk) set as reciprocal fallbacks
175
176 === Other changes in 1.28 ===
177 * (T128697) Improved handling of large diffs.
178 * [BREAKING CHANGE] $wgExtendedLoginCookies has been removed. You can
179 use or update a custom session provider if needed.
180 * Deprecated APIEditBeforeSave hook in favor of EditFilterMergedContent.
181 * The 'UploadVerification' hook is deprecated. Use 'UploadVerifyFile' instead.
182 * SiteConfiguration::isLocalVHost() was removed (deprecated since 1.25).
183 * The 'UserLoginComplete' hook has a new parameter to differentiate between actual
184 login and visiting the login page while already logged in.
185 * ResourceLoader::makeLoaderURL() was removed (deprecated since 1.24).
186 * $.fn.liveAndTestAtStart was removed (deprecated since 1.24).
187 * mw.util.tooltipAccessKeyPrefix was removed (deprecated since 1.24).
188 * mw.util.tooltipAccessKeyRegexp was removed (deprecated since 1.24).
189 * Linker::link() and Linker::linkKnown() were deprecated; please instead use
190 MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks
191 were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd
192 respectively. See docs/hooks.txt for the specific changes needed for those hooks.
193 * Linker::formatSize() was deprecated. Use Language::formatSize() directly.
194 * Aliases for Linker methods, deprecated since 1.21, were removed from Skin:
195 * Skin::commentBlock() (use Linker::commentBlock() instead)
196 * Skin::generateRollback() (use Linker::generateRollback() instead)
197 * Skin::link() (use MediaWiki\Linker\LinkRenderer instead)
198 * Skin::linkKnown() (use MediaWiki\Linker\LinkRenderer instead)
199 * Skin::userLink() (use Linker::userLink() instead)
200 * Skin::userToolLinks() (use Linker::userToolLinks() instead)
201 * The 'ParserLimitReportFormat' hook was removed.
202 * Disabled "bug 2702" HTML tidying of parsed UI messages on wikis where Tidy is
203 disabled.
204 * DifferenceEngine::generateDiffBody() was removed (deprecated since 1.21).
205 * UploadBase::stashFileGetKey() and UploadBase::stashSession() were deprecated.
206 Use ...->stashFile()->getFileKey() instead.
207 * "Public domain" was removed as a wiki license option from the installer, in
208 favour of CC-0.
209 * AuthenticationRequest::$required is now changed from REQUIRED to PRIMARY_REQUIRED
210 on requests needed by primary providers even if all primaries need them.
211 Primary providers are discouraged from returning multiple REQUIRED requests.
212 * OOjs UI PHP widgets constructed with the `'infusable' => true` config option
213 will no longer be automatically infused. You should call `OO.ui.infuse()`
214 on them yourself from your JavaScript code.
215 * parserTests.php has moved to tests/parser/parserTests.php
216 * The command line options specific to parser tests have been removed from
217 phpunit.php: --regex and --keep-uploads. Instead of --regex, use --filter.
218 Instead of --keep-uploads, use the same option to parserTests.php, but you
219 must specify a directory with --upload-dir.
220 * The 'jquery.arrowSteps' ResourceLoader module is now deprecated.
221 * IP::isConfiguredProxy() and IP::isTrustedProxy() were removed. Callers should
222 migrate to using the same functions on a ProxyLookup instance, obtainable from
223 MediaWikiServices.
224
225 == Compatibility ==
226
227 MediaWiki 1.28 requires PHP 5.5.9 or later. There is experimental support for
228 HHVM 3.6.5 or later.
229
230 MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
231 support for them is somewhat less mature. There is experimental support for
232 Oracle and Microsoft SQL Server.
233
234 The supported versions are:
235
236 * MySQL 5.0.3 or later
237 * PostgreSQL 8.3 or later
238 * SQLite 3.3.7 or later
239 * Oracle 9.0.1 or later
240 * Microsoft SQL Server 2005 (9.00.1399)
241
242 == Upgrading ==
243
244 1.28 has several database changes since 1.27, and will not work without schema
245 updates. Note that due to changes to some very large tables like the revision
246 table, the schema update may take quite long (minutes on a medium sized site,
247 many hours on a large site).
248
249 If upgrading from before 1.11, and you are using a wiki as a commons
250 repository, make sure that it is updated as well. Otherwise, errors may arise
251 due to database schema changes.
252
253 If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
254 new database fields are filled with data.
255
256 If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
257 1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
258 with MediaWiki 1.21.
259
260 Don't forget to always back up your database before upgrading!
261
262 See the file UPGRADE for more detailed upgrade instructions.
263
264 For notes on 1.27.x and older releases, see HISTORY.
265
266 == Online documentation ==
267
268 Documentation for both end-users and site administrators is available on
269 MediaWiki.org, and is covered under the GNU Free Documentation License (except
270 for pages that explicitly state that their contents are in the public domain):
271
272 https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
273
274 == Mailing list ==
275
276 A mailing list is available for MediaWiki user support and discussion:
277
278 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
279
280 A low-traffic announcements-only list is also available:
281
282 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
283
284 It's highly recommended that you sign up for one of these lists if you're
285 going to run a public MediaWiki, so you can be notified of security fixes.
286
287 == IRC help ==
288
289 There's usually someone online in #mediawiki on irc.freenode.net.