resourceloader: Use upsert() instead of replace() for module_deps write
[lhc/web/wiklou.git] / RELEASE-NOTES-1.29
1 == MediaWiki 1.29 ==
2
3 THIS IS NOT A RELEASE YET
4
5 MediaWiki 1.29 is an alpha-quality branch and is not recommended for use in
6 production.
7
8 === Configuration changes in 1.29 ===
9 * Default cookie expiration time has been reduced to 30 days. Login cookie
10 expiration time is kept at 180 days.
11 * A new configuration variable has been added: $wgCookieSetOnAutoblock. This
12 determines whether to set a cookie when a user is autoblocked. Doing so means
13 that a blocked user, even after logging out and moving to a new IP address,
14 will still be blocked.
15 * The resetpassword right and associated password reset capture feature has
16 been removed.
17 * The $error parameter to the EmailUser hook should be set to a Status object
18 or boolean false. This should be compatible with at least MediaWiki 1.23 if
19 not earlier. Returning a raw HTML string is now deprecated.
20 * The $message parameter to the ApiCheckCanExecute hook should be set to an
21 ApiMessage. This is compatible with MediaWiki 1.27 and later. Returning a
22 code for ApiBase::parseMsg() will no longer work.
23 * ApiBase::$messageMap is no longer public. Code attempting to access it will
24 result in a PHP fatal error.
25 * $wgUserEmailUseReplyTo is now true by default to work around restrictive DMARC
26 policies.
27 * Subpages are now enabled by default in the Template namespace. Set
28 $wgNamespacesWithSubpages[NS_TEMPLATE] to false to keep the old behavior.
29 * $wgRunJobsAsync is now false by default (T142751). This change only affects
30 wikis with $wgJobRunRate > 0.
31 * A temporary feature flag, $wgDisableUserGroupExpiry, is provided to disable
32 new features that rely on the schema changes to the user_groups table. This
33 feature flag will likely be removed before 1.29 is released.
34
35 === New features in 1.29 ===
36 * (T5233) A cookie can now be set when a user is autoblocked, to track that user
37 if they move to a new IP address. This is disabled by default.
38 * Added ILocalizedException interface to standardize the use of localized
39 exceptions, largely so the API can handle them more sensibly.
40 * Blocks created automatically by MediaWiki, such as for configured proxies or
41 dnsbls, are now indicated as such and use a new i18n message when displayed.
42 * Added new $wgHTTPImportTimeout setting. Sets timeout for
43 downloading the XML dump during a transwiki import in seconds.
44 * Parser limit report is now available in machine-readable format to JavaScript
45 via mw.config.get('wgPageParseReport').
46 * Added $wgSoftBlockRanges, to allow for automatically blocking anonymous edits
47 from certain IP ranges (e.g. private IPs).
48 * (T59603) Added new magic word {{PAGELANGUAGE}} which returns the language code
49 of the page being parsed.
50 * HTML5 form validation attributes will no longer be suppressed. Originally
51 browsers had poor support for them, but modern browsers handle them fine.
52 This might affect some forms that used them and only worked because the
53 attributes were not actually being set.
54 * Expiry times can now be specified when users are added to user groups.
55
56 === External library changes in 1.29 ===
57
58 ==== Upgraded external libraries ====
59 * Updated QUnit from v1.22.0 to v1.23.1.
60 * Updated cssjanus from v1.1.2 to 1.1.3.
61 * Updated psr/log from v1.0.0 to v1.0.2.
62
63 ==== New external libraries ====
64
65 ==== Removed and replaced external libraries ====
66
67 === Bug fixes in 1.29 ===
68 * (T62604) Core parser functions returning a number now format the number according
69 to the page content language, not wiki content language.
70 * (T27187) Search suggestions based on jquery.suggestions will now correctly only
71 highlight prefix matches in the results.
72
73 === Action API changes in 1.29 ===
74 * Submitting sensitive authentication request parameters to action=clientlogin,
75 action=createaccount, action=linkaccount, and action=changeauthenticationdata
76 in the query string is now an error. They should be submitted in the POST
77 body instead.
78 * The capture option for action=resetpassword has been removed
79 * action=clearhasmsg now requires a POST.
80 * (T47843) API errors and warnings may be requested in non-English languages
81 using the new 'errorformat', 'errorlang', and 'errorsuselocal' parameters.
82 * API error codes may have changed. Most notably, errors from modules using
83 parameter prefixes (e.g. all query submodules) will no longer be prefixed.
84 * ApiPageSet-using modules will report the 'invalidreason' using the specified
85 'errorformat'.
86 * action=emailuser may return a "Warnings" status, and now returns 'warnings' and
87 'errors' subelements (as applicable) instead of 'message'.
88 * action=imagerotate returns an 'errors' subelement rather than 'errormessage'.
89 * action=move now reports errors when moving the talk page as an array under
90 key 'talkmove-errors', rather than using 'talkmove-error-code' and
91 'talkmove-error-info'. The format for subpage move errors has also changed.
92 * action=revisiondelete no longer includes a "rendered" property on warnings
93 and errors for each item. Use errorformat=wikitext if you're wanting parsed
94 output.
95 * action=rollback no longer returns a "messageHtml" property. Use
96 errorformat=html if you're wanting HTML formatting of error messages.
97 * action=upload now reports optional stash failures as an array under key
98 'stasherrors' rather than a 'stashfailed' text string.
99 * action=watch reports 'errors' and 'warnings' instead of a single 'error', and
100 no longer returns a 'message' on success.
101 * Added action=validatepassword to validate passwords for the account creation
102 and password change forms.
103 * action=purge now requires a POST.
104
105 === Action API internal changes in 1.29 ===
106 * New methods were added to ApiBase to handle errors and warnings using i18n
107 keys. Methods for using hard-coded English messages were deprecated:
108 * ApiBase::dieUsage() was deprecated
109 * ApiBase::dieUsageMsg() was deprecated
110 * ApiBase::dieUsageMsgOrDebug() was deprecated
111 * ApiBase::getErrorFromStatus() was deprecated
112 * ApiBase::parseMsg() was deprecated
113 * ApiBase::setWarning() was deprecated
114 * ApiBase::$messageMap is no longer public. Code attempting to access it will
115 result in a PHP fatal error.
116 * The $message parameter to the ApiCheckCanExecute hook should be set to an
117 ApiMessage. This is compatible with MediaWiki 1.27 and later. Returning a
118 code for ApiBase::parseMsg() will no longer work.
119 * UsageException is deprecated in favor of ApiUsageException. For the time
120 being ApiUsageException is a subclass of UsageException to allow things that
121 catch only UsageException to still function properly.
122 * If, for some strange reason, code was using an ApiErrorFormatter instead of
123 ApiErrorFormatter_BackCompat, note that the result format has changed and
124 various methods now take a module path rather than a module name.
125 * ApiMessageTrait::getApiCode() now strips 'apierror-' and 'apiwarn-' prefixes
126 from the message key, and maps some message keys for backwards compatibility.
127
128 === Languages updated in 1.29 ===
129
130 MediaWiki supports over 350 languages. Many localisations are updated
131 regularly. Below only new and removed languages are listed, as well as
132 changes to languages because of Phabricator reports.
133
134 * Based as always on linguistic studies on intelligibility and language
135 knowledge by geography, language fallbacks have been expanded. When a
136 translation is missing in the user's preferred interface language, the
137 corresponding translation for the fallback language will be used instead.
138 English will only be used as last resort when there are no translations.
139 Some configurations (such as date formats and gender namespaces) have also
140 been updated when using the fallback language's configuration was inadequate.
141 The new or reinstated language fallbacks are (after cs ↔ sk in 1.28):
142 ca ↔ oc; hsb ↔ dsb; io → eo; mdf → ru; pnt → el; roa-tara → it; rup → ro;
143 sh → bs, sr-el, hr.
144 * (T155957) Talk Namespaces for Javanese language (jv) have been updated.
145
146 ==== No fallback for Ukrainian ====
147 * (T39314) The fallback from Ukrainian to Russian was removed. The Ukrainian
148 language will now use the default fallback language: English. When a translation
149 to Ukrainian is not available, an English string will be shown.
150
151 === Other changes in 1.29 ===
152 * Database::getSearchEngine() (deprecated in 1.28) was removed. Use
153 SearchEngineFactory::getSearchEngineClass() instead.
154 * $wgSessionsInMemcached (deprecated in 1.20) was removed. No replacement is
155 required as all sessions are stored in Object Cache now.
156 * MWHttpRequest::execute() should be considered to return a StatusValue; the
157 Status return type is deprecated.
158 * User::edits() (deprecated in 1.21) was removed.
159 * Xml::escapeJsString() (deprecated in 1.21) was removed.
160 * Article::getText() and Article::prepareTextForEdit() (deprecated in 1.21)
161 were removed.
162 * Article::getAutosummary() and WikiPage::getAutosummary() (deprecated in 1.21)
163 were removed.
164 * Hook ArticleViewCustom (deprecated in 1.21) was removed. Use ArticleContentViewCustom
165 instead.
166 * Hooks EditPageGetDiffText and ShowRawCssJs (deprecated in 1.21) were removed.
167 * Class RevisiondeleteAction (deprecated in 1.25) was removed.
168 * WikiPage::prepareTextForEdit() (deprecated in 1.21) was removed.
169 * WikiPage::getText() (deprecated in 1.21) was removed.
170 * Article::fetchContent() (deprecated in 1.21) was removed.
171 * User::getPassword() (deprecated in 1.27) was removed.
172 * User::getTemporaryPassword() (deprecated in 1.27) was removed.
173 * User::isPasswordReminderThrottled() (deprecated in 1.27) was removed.
174 * Class FSRepo (deprecated in 1.19) was removed.
175 * WebRequest::checkSessionCookie() (deprecated in 1.27) was removed. Use
176 \MediaWiki\Session\SessionManager::singleton()->getPersistedSessionId() instead.
177 * Class ImageGallery (deprecated in 1.22) was removed.
178 Use ImageGalleryBase::factory instead.
179 * Title::moveNoAuth() (deprecated in 1.25) was removed. Use MovePage class instead.
180 * Hook UnknownAction (deprecated in 1.19) was actually deprecated (it will now
181 emit warnings). Create a subclass of Action and add it to $wgActions instead.
182 * WikiRevision::getText() (deprecated since 1.21) is no longer marked deprecated.
183 * Linker::getInterwikiLinkAttributes() (deprecated since 1.25) was removed.
184 * Linker::getInternalLinkAttributes() (deprecated since 1.25) was removed.
185 * Linker::getInternalLinkAttributesObj() (deprecated since 1.25) was removed.
186 * Linker::getLinkAttributesInternal() (deprecated since 1.25) was removed.
187 * RedisConnectionPool::handleException (deprecated since 1.23) was removed.
188 * The static properties mw.Api.errors and mw.Api.warnings, containing incomplete
189 and outdated lists of errors/warnings returned by the API, are now deprecated.
190 * wiki.phtml entry point was removed. Refer to index.php instead. If you want "wiki.phtml"
191 URLs to continue to work, set up redirects. In Apache, this can be done by enabling
192 mod_rewrite and adding the following rules to your configuration:
193
194 RewriteEngine On
195 RewriteBase /
196 RewriteRule ^/w/wiki\.phtml$ /w/index.php [R=301,L]
197 * Hook ArticleAfterFetchContent (deprecated in 1.21) was removed.
198 Use ArticleAfterFetchContentObject instead.
199 * Hook ArticleInsertComplete (deprecated in 1.21) was removed.
200 Use PageContentInsertComplete instead.
201 * Hook ArticleSave (deprecated in 1.21) was removed.
202 Use PageContentSave instead.
203 * Hook ArticleSaveComplete (deprecated in 1.21) was removed.
204 Use PageContentSaveComplete instead.
205 * Hook EditFilterMerged (deprecated in 1.21) was removed.
206 Use EditFilterMergedContent instead.
207 * Hook EditPageGetPreviewText (deprecated in 1.21) was removed.
208 Use EditPageGetPreviewContent instead.
209 * Hook TitleIsCssOrJsPage (deprecated in 1.21) was removed.
210 Use ContentHandlerDefaultModelFor instead.
211 * Hook TitleIsWikitextPage (deprecated in 1.21) was removed.
212 Use ContentHandlerDefaultModelFor instead.
213 * Article::getContent() (deprecated in 1.21) was removed.
214 * Revision::getText() (deprecated in 1.21) was removed.
215 * Article::doEdit() and WikiPage::doEdit() (deprecated in 1.21) were removed.
216 * Parser::replaceUnusualEscapes() (deprecated in 1.24) was removed.
217 * Article::doEditContent() was marked as deprecated, to be removed in 1.30
218 or later.
219 * ContentHandler::runLegacyHooks() was removed.
220 * refreshLinks.php now can be limited to a particular category with --category=...
221 or a tracking category with --tracking-category=...
222 * User-like objects that are passed to SpecialUserRights and its subclasses are
223 now required to have a getGroupMemberships() method. See UserRightsProxy for
224 an example.
225 * User::$mGroups (instance variable) was marked private. Use User::getGroups()
226 instead.
227 * User::getGroupName(), User::getGroupMember(), User:getGroupPage(),
228 User::makeGroupLinkHTML(), and User::makeGroupLinkWiki() were deprecated.
229 Use equivalent methods on the UserGroupMembership class.
230 * Maintenance scripts and tests that call User::addGroup() must now ensure that
231 User objects have been added to the database prior to calling addGroup().
232 * Protected function UsersPager::getGroups() was removed, and protected function
233 UsersPager::buildGroupLink() was changed from a static to an instance method.
234 * The third parameter ($cache) to the UsersPagerDoBatchLookups hook was changed;
235 see docs/hooks.txt.
236 * User::crypt() (deprecated in 1.24) was removed.
237 * User::comparePasswords() (deprecated in 1.24) was removed.
238 * ArchivedFile::getUserText() (deprecated in 1.23) was removed.
239 * HTMLFileCache::newFromTitle() (deprecated in 1.24) was removed.
240
241 == Compatibility ==
242
243 MediaWiki 1.29 requires PHP 5.5.9 or later. There is experimental support for
244 HHVM 3.6.5 or later.
245
246 MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
247 support for them is somewhat less mature. There is experimental support for
248 Oracle and Microsoft SQL Server.
249
250 The supported versions are:
251
252 * MySQL 5.0.3 or later
253 * PostgreSQL 8.3 or later
254 * SQLite 3.3.7 or later
255 * Oracle 9.0.1 or later
256 * Microsoft SQL Server 2005 (9.00.1399)
257
258 == Upgrading ==
259
260 1.29 has several database changes since 1.28, and will not work without schema
261 updates. Note that due to changes to some very large tables like the revision
262 table, the schema update may take quite long (minutes on a medium sized site,
263 many hours on a large site).
264
265 If upgrading from before 1.11, and you are using a wiki as a commons
266 repository, make sure that it is updated as well. Otherwise, errors may arise
267 due to database schema changes.
268
269 If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
270 new database fields are filled with data.
271
272 If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
273 1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
274 with MediaWiki 1.21.
275
276 Don't forget to always back up your database before upgrading!
277
278 See the file UPGRADE for more detailed upgrade instructions.
279
280 For notes on 1.28.x and older releases, see HISTORY.
281
282 == Online documentation ==
283
284 Documentation for both end-users and site administrators is available on
285 MediaWiki.org, and is covered under the GNU Free Documentation License (except
286 for pages that explicitly state that their contents are in the public domain):
287
288 https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
289
290 == Mailing list ==
291
292 A mailing list is available for MediaWiki user support and discussion:
293
294 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
295
296 A low-traffic announcements-only list is also available:
297
298 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
299
300 It's highly recommended that you sign up for one of these lists if you're
301 going to run a public MediaWiki, so you can be notified of security fixes.
302
303 == IRC help ==
304
305 There's usually someone online in #mediawiki on irc.freenode.net.