Remove deprecated mw.Api.errors and mw.Api.warnings
[lhc/web/wiklou.git] / RELEASE-NOTES-1.34
1 = MediaWiki 1.34 =
2
3 == MediaWiki 1.34.0-PRERELEASE ==
4
5 THIS IS NOT A RELEASE YET
6
7 MediaWiki 1.34 is an alpha-quality development branch, and is not recommended
8 for use in production.
9
10 == Upgrading notes for 1.34 ==
11 1.34 has several database changes since 1.33, and will not work without schema
12 updates. Note that due to changes to some very large tables like the revision
13 table, the schema update may take quite long (minutes on a medium sized site,
14 many hours on a large site).
15
16 Don't forget to always back up your database before upgrading!
17
18 See the file UPGRADE for more detailed upgrade instructions, including
19 important information when upgrading from versions prior to 1.11.
20
21 Some specific notes for MediaWiki 1.34 upgrades are below:
22
23 * …
24
25 For notes on 1.33.x and older releases, see HISTORY.
26
27 === Configuration changes for system administrators in 1.34 ===
28
29 ==== New configuration ====
30 * $wgAllowExternalReqID (T201409) - This configuration setting controls whether
31 Mediawiki accepts the request ID set by the incoming request via the
32 `X-Request-Id` header. If set to `true`, that value will be used throughout
33 the code as the request identificator. Otherwise, the sent header will be
34 ignored and the request ID will either be taken from Apache's mod_unique
35 module or will be generated by Mediawiki itself (depending on the set-up).
36 * $wgEnableSpecialMute (T218265) - This configuration controls whether
37 Special:Mute is available and whether to include a link to it on emails
38 originating from Special:Email.
39
40 ==== Changed configuration ====
41 * $wgUseCdn, $wgCdnServers, $wgCdnServersNoPurge, and $wgCdnMaxAge – These four
42 CDN-related config variables have been renamed from being specific to Squid –
43 they were previously $wgUseSquid, $wgSquidServers, $wgSquidServersNoPurge, and
44 $wgSquidMaxage respectively. This aligns them with the related existing
45 variable $wgCdnMaxageLagged. The previous configuration variable names are
46 deprecated, but will be used as the fall back if they are still set.
47 Note that wgSquidPurgeUseHostHeader has not been renamed, as it is deprecated.
48 * (T27707) File type checks for image uploads have been relaxed to allow files
49 containing some HTML markup in metadata. As a result, the $wgAllowTitlesInSVG
50 setting is no longer applied and is now always true. Note that MSIE 7 may
51 still be able to misinterpret certain malformed PNG files as HTML.
52 * Introduced $wgVerifyMimeTypeIE to allow disabling the MSIE 6/7 file type
53 detection heuristic on upload, which is more conservative than the checks
54 that were changed above.
55 * …
56
57 ==== Removed configuration ====
58 * $wgWikiDiff2MovedParagraphDetectionCutoff — If you still want a custom change
59 size threshold, please specify in php.ini, using the configuration variable
60 wikidiff2.moved_paragraph_detection_cutoff.
61 * $wgDebugPrintHttpHeaders - The default of including HTTP headers in the
62 debug log channel is no longer configurable. The debug log itself remains
63 configurable via $wgDebugLogFile.
64
65 === New user-facing features in 1.34 ===
66 * Special:Mute has been added as a quick way for users to block unwanted emails
67 from other users originating from Special:EmailUser.
68
69 === New developer features in 1.34 ===
70 * The ImgAuthModifyHeaders hook was added to img_auth.php to allow modification
71 of headers in private wikis.
72 * Language::formatTimePeriod now supports the new 'avoidhours' option to output
73 strings like "5 days ago" instead of "5 days 13 hours ago".
74
75 === External library changes in 1.34 ===
76
77 ==== New external libraries ====
78 * …
79
80 ==== Changed external libraries ====
81 * Updated Mustache from 1.0.0 to v3.0.1.
82 * Updated OOUI from v0.31.3 to v0.33.2.
83 * Updated composer/semver from 1.4.2 to 1.5.0.
84 * Updated composer/spdx-licenses from 1.4.0 to 1.5.1 (dev-only).
85 * Updated mediawiki/codesniffer from 25.0.0 to 26.0.0 (dev-only).
86 * Updated cssjanus/cssjanus from 1.2.1 to 1.3.0.
87 * Updated wikimedia/at-ease from 1.2.0 to 2.0.0.
88 * Updated wikimedia/remex-html from 2.0.1 to 2.0.3.
89 * Updated monolog/monolog from 1.22.1 to 1.24.0 (dev-only).
90 * Updated wikimedia/object-factory from 1.0.0 to 2.1.0.
91 * Updated wikimedia/timestamp from 2.2.0 to 3.0.0.
92 * Updated wikimedia/xmp-reader from 0.6.2 to 0.6.3.
93 * Updated mediawiki/mediawiki-phan-config from 0.6.0 to 0.6.1 (dev-only).
94 * …
95
96 ==== Removed external libraries ====
97 * The jquery.async module, deprecated in 1.33, was removed.
98 * …
99
100 === Bug fixes in 1.34 ===
101 * (T222529) If a log entry or page revision is recorded in the database with an
102 empty username, attempting to display it will log an error and return a "no
103 username available" to the user instead of silently displaying nothing or
104 invalid links.
105
106 === Action API changes in 1.34 ===
107 * The 'recenteditcount' response property from action=query list=allusers,
108 deprecated in 1.25, has been removed.
109
110 === Action API internal changes in 1.34 ===
111 * …
112
113 === Languages updated in 1.34 ===
114 MediaWiki supports over 350 languages. Many localisations are updated regularly.
115 Below only new and removed languages are listed, as well as changes to languages
116 because of Phabricator reports.
117
118 * (T152908) Added language support for N'Ko (nqo).
119
120 === Breaking changes in 1.34 ===
121 * The global functions wfSuppressWarnings and wfRestoreWarnings, deprecated in
122 1.26, have been removed. Use Wikimedia\AtEase\AtEase::suppressWarnings() and
123 Wikimedia\AtEase\AtEase::restoreWarnings() directly.
124 * Preferences class, deprecated in 1.31, has been removed.
125 * The following parts of code, deprecated in 1.32, were removed in favor of
126 built-in PHP functions:
127 * CryptRand class
128 * CryptRand service
129 * Functions of the MWCryptRand class: singleton(), wasStrong() and generate().
130 * Language::setCode, deprecated in 1.32, was removed. Use Language::factory to
131 create a new Language object with a different language code.
132 * MWNamespace::clearCaches() has been removed. So has the $rebuild parameter
133 to MWNamespace::getCanonicalNamespaces(), which was deprecated since 1.31.
134 Instead, reset services, such as by calling $this->overrideMwServices() (if
135 your test extends MediaWikiTestCase). Services will generally not pick up
136 configuration changes from after they were created, so you must reset
137 services after any configuration change. Even if your code works now, it is
138 likely to break in future versions as more code is moved to services.
139 * The ill-defined "DatabaseOraclePostInit" hook has been removed.
140 * PreferencesFormLegacy and PreferencesForm classes, deprecated in 1.32, have
141 been removed.
142 * ObjectFactory class, deprecated in 1.31, has been removed.
143 * HWLDFWordAccumudlator class, deprecated in 1.28, has been removed.
144 * XMPInfo, XMPReader and XMPValidate, deprecated in 1.32, have been removed.
145 * The RedirectSpecialPage::execute method could sometimes return a Title object.
146 This behavior was removed, and the method now matches the parent signature
147 (SpecialPage::execute) which is to return HTML string or void.
148 To obtain the destination title, use RedirectSpecialPage::getRedirect.
149 * The 'recenteditcount' response property from action API action=query
150 list=allusers, deprecated in 1.25, has been removed.
151 * SearchEngine::userNamespaces(), SearchEngine::namespacesAsText(),
152 SearchEngine::create(), SearchEngine::getSearchTypes() and
153 SearchEngine::getNearMatch(), methods deprecated in 1.27, have been removed.
154 * FileRepo::streamFile(), deprecated in 1.26, has been removed.
155 * User::randomPassword() method, deprecated in 1.27, have been removed.
156 * MWNamespace::canTalk(), deprecated in 1.30, have been removed.
157 * Parser class property $mUniqPrefix, deprecated in 1.26, has been removed.
158 * wfArrayFilter() and wfArrayFilterByKey(), deprecated in 1.32, have been
159 removed.
160 * wfMakeUrlIndexes() function, deprecated in 1.33, have been removed.
161 * Method signatures in WatchedItemQueryServiceExtension have changed from taking
162 User objects to taking UserIdentity objects. Extensions implementing this
163 interface need to be changed accordingly.
164 * User::getGroupPage() and ::makeGroupLinkHTML(), deprecated in 1.29, have been
165 removed. Use UserGroupMembership::getGroupPage and ::getLink instead.
166 * User::makeGroupLinkWiki(), deprecated in 1.29, has been removed. Use
167 UserGroupMembership::getLink() instead.
168 * SavepointPostgres, deprecated in 1.31, has been removed.
169 * OutputPage::enableSectionEditLinks(), OutputPage::sectionEditLinksEnabled(),
170 ParserOptions::getEditSection(), ParserOptions::setEditSection(), and
171 ParserOutput::getEditSectionTokens, ::getTOCEnabled, ::setEditSectionTokens,
172 and ::setTOCEnabled, deprecated in 1.31, have been removed.
173 * EditPage::safeUnicodeInput() and ::safeUnicodeOutput(), deprecated in 1.30,
174 have been removed.
175 * Four methods in OutputPage, deprecated in 1.32, have been removed. You should
176 use OutputPage::showFatalError or throw a FatalError instead. The methods are
177 ::showFileCopyError(), ::showFileRenameError(), ::showFileDeleteError(), and
178 ::showFileNotFoundError().
179 * ApiBase::truncateArray(), deprecated in 1.32, has been removed.
180 * IcuCollation::getICUVersion(), deprecated in 1.32, has been removed. Use PHP's
181 INTL_ICU_VERSION constant directly.
182 * HTMLForm::setSubmitProgressive(), deprecated in 1.32, has been removed.
183 * ResourceLoaderStartUpModules::getStartupModules() and ::getLegacyModules(),
184 both deprecated in 1.32, have been removed.
185 * BaseTemplate::msgHtml() and QuickTemplate::msgHtml(), deprecated in 1.32, have
186 been removed. Use ->msg() or ->getMsg() instead.
187 * WatchAction::getUnwatchToken(), deprecated in 1.32, has been removed. Instead,
188 use WatchAction::getWatchToken() with action 'unwatch' directly.
189 * Language::initEncoding(), ::recodeForEdit(), and recodeInput(), deprecated in
190 1.28, have been removed.
191 * PageArchive::getTextFromRow(), ::listAllPages(), and ::getLastRevisionText(),
192 deprecated in 1.32, have been removed.
193 * OutputPage::getModuleScripts(), ParserOutput::getModuleScripts(), deprecated
194 in 1.33, have been removed.
195 * User::getPasswordValidity(), deprecated in 1.33, has been removed.
196 * ApiQueryBase::prepareUrlQuerySearchString(), deprecated in 1.33, has been
197 removed.
198 * ChangeTags::purgeTagUsageCache(), deprecated in 1.33, has been removed.
199 * JobQueueGroup::pushLazyJobs(), deprecated in 1.33, has been removed.
200 * MediaWikiTestCase::stashMwGlobals(), deprecated in 1.32, has been removed.
201 * SearchEngine::transformSearchTerm(), deprecated in 1.32, has been removed.
202 * The Block typehint only refers to blocks stored in the database. It should be
203 updated to AbstractBlock in cases where any type of block could be expected.
204 * FileRepoStatus, deprecated in 1.25, has been removed.
205 * The LegacyHookPreAuthenticationProvider class, deprecated since its creation
206 in 1.27, has been removed.
207 * IP::isValidBlock(), deprecated in 1.30, has been removed.
208 * WikiPage::prepareContentForEdit now doesn't accept an integer for $revision,
209 was deprecated in 1.25.
210 * The jquery.byteLength module, deprecated in 1.31, was removed.
211 Use the mediawiki.String module instead.
212 * mw.language.specialCharacters, deprecated in 1.33, has been removed.
213 Use require( 'mediawiki.language.specialCharacters' ) instead.
214 * EditPage::submit(), deprecated in 1.29, has been removed. Use $this->edit()
215 directly.
216 * HTMLForm::getErrors(), deprecated in 1.28, has been removed. Use
217 getErrorsOrWarnings() instead.
218 * SpecialPage::getTitle(), deprecated in 1.23, has been removed. Use
219 SpecialPage::getPageTitle() instead.
220 * jquery.ui.effect-bounce, jquery.ui.effect-explode, jquery.ui.effect-fold
221 jquery.ui.effect-pulsate, jquery.ui.effect-slide, jquery.ui.effect-transfer,
222 which are no longer used, have now been removed.
223 * SpecialEmailUser::validateTarget(), ::getTarget() without a sender/user
224 specified, deprecated in 1.30, have been removed.
225 * BufferingStatsdDataFactory::getBuffer(), deprecated in 1.30, has been removed.
226 * The constant DB_SLAVE, deprecated in 1.28, has been removed. Use DB_REPLICA.
227 * The constants NS_IMAGE and NS_IMAGE_TALK, deprecated in 1.14, have been
228 removed. Use NS_FILE and NS_FILE_TALK respectively.
229 * Replacer, DoubleReplacer, HashtableReplacer and RegexlikeReplacer
230 (deprecated in 1.32) have been removed. Closures should be used instead.
231 * OutputPage::addWikiText(), ::addWikiTextWithTitle(), ::addWikiTextTitleTidy(),
232 ::addWikiTextTidy(), ::addWikiTextTitle(), deprecated in 1.32, have been
233 removed.
234 * The $wgUseKeyHeader configuration option and the OutputPage::getKeyHeader()
235 method, deprecated in 1.32, have been removed.
236 * WebInstallerOutput::addWikiText(), deprecated in 1.32, has been removed.
237 * Parser::fetchFile(), deprecated in 1.32, has been removed. Use the method
238 Parser::fetchFileAndTitle() instead.
239 * The global function wfBCP47, deprecated in 1.31, has been removed.
240 * wfCountDown() function, deprecated in 1.31, has been removed. Use
241 \Maintenance::countDown() method instead.
242 * OutputPage::wrapWikiMsg() no longer accepts an options parameter. This was
243 deprecated since 1.20.
244 * Skin::outputPage() no longer accepts a context. This was deprecated in 1.20.
245 * Linker::link() no longer accepts a string for the query array, as was
246 deprecated in 1.20.
247 * PrefixSearch::titleSearch(), deprecated in 1.23, has been removed. Use the
248 SearchEngine::defaultPrefixSearch or ::completionSearch() methods instead.
249 * The UserRights hook, deprecated in 1.26, has been removed. Instead, use the
250 UserGroupsChanged hook.
251 * Skin::getDefaultInstance(), deprecated in 1.27, has been removed. Get the
252 instance from MediaWikiServices instead.
253 * The UserLoadFromSession hook, deprecated in 1.27, has been removed.
254 * The wfResetSessionID global function, deprecated in 1.27, has been removed.
255 Use MediaWiki\Session\SessionManager instead.
256 * The wfGetLBFactory global function, deprecated in 1.27, has been removed.
257 Use MediaWikiServices::getInstance()->getDBLoadBalancerFactory().
258 * The internal method OutputPage->addScriptFile() will no longer silently drop
259 calls that use an invalid path (i.e., something other than an absolute path,
260 protocol-relative URL, or full scheme URL), and will instead pass them to the
261 client where they will likely 404. This usage was deprecated in 1.24.
262 * Database::reportConnectionError, deprecated in 1.32, has been removed.
263 * APIEditBeforeSave hook, deprecated in 1.28, has been removed. Please see
264 EditFilterMergedContent hook for an alternative way to use this feature.
265 * API module methods getDescription(), getParamDescription(), & getExamples(),
266 all deprecated in 1.25 and ignored, have been removed.
267 * The API module method getDescriptionMessage(), deprecated in 1.30, has been
268 removed.
269 * The JavaScript global variable wgLoadScript has been removed. Use
270 mw.util.wikiScript( 'load' ) instead.
271 * ResourceLoader no longer creates the 'mw.legacy' placeholder object. It has
272 been unused since 1.16 and was deprecated in 1.22. To deprecate a property
273 in JavaScript, use mw.log.deprecate() instead.
274 * The 'user.groups' module, deprecated in 1.28, was removed.
275 Use the 'user' module instead.
276 * The ability to override User::$mRights has been removed.
277 * Previously, when iterating ResultWrapper with foreach() or a similar
278 construct, the range of the index was 1..numRows. This has been fixed to be
279 0..(numRows-1).
280 * The ChangePasswordForm hook, deprecated in 1.27, has been removed. Use the
281 AuthChangeFormFields hook or security levels instead.
282 * WikiMap::getWikiIdFromDomain(), deprecated in 1.33, has been removed.
283 Use WikiMap::getWikiIdFromDbDomain() instead.
284 * The config variables $wgHtml5, $wgJsMimeType, and $wgXhtmlDefaultNamespace,
285 which were deprecated and ignored by core since 1.22, are no longer set to any
286 value, and SkinTemplate no longer emits a 'jsmimetype' key. Any extensions not
287 updated since 2013 to cope with this deprecation may now break.
288 * (T222637) Passing ResourceLoaderModule objects to ResourceLoader::register()
289 or $wgResourceModules is no longer supported.
290 Use the 'class' or 'factory' option of the array format instead.
291 * The parameter $lang of the functions generateTOC and tocList in Linker and
292 DummyLinker must be in type Language when present. Other types are
293 deprecated since 1.33.
294 * The static properties mw.Api.errors and mw.Api.warnings, deprecated in 1.29,
295 have been removed.
296 * …
297
298 === Deprecations in 1.34 ===
299 * The MWNamespace class is deprecated. Use NamespaceInfo.
300 * ExtensionRegistry->load() is deprecated, as it breaks dependency checking.
301 Instead, use ->queue().
302 * User::isBlocked() is deprecated since it does not tell you if the user is
303 blocked from editing a particular page. Use User::getBlock() or
304 PermissionManager::isBlockedFrom() or PermissionManager::userCan() instead.
305 * User::isLocallyBlockedProxy and User::inDnsBlacklist are deprecated and moved
306 to the BlockManager as private helper methods.
307 * User::isDnsBlacklisted is deprecated. Use BlockManager::isDnsBlacklisted
308 instead.
309 * The Config argument to ChangesListSpecialPage::checkStructuredFilterUiEnabled
310 is deprecated. Pass only the User argument.
311 * WatchedItem::getUser is deprecated. Use getUserIdentity.
312 * Passing a Title as the first parameter to the getTimestampById method of
313 RevisionStore is deprecated. Omit it, passing only the remaining parameters.
314 * Title::getPreviousRevisionId and Title::getNextRevisionId are deprecated. Use
315 RevisionLookup::getPreviousRevision and RevisionLookup::getNextRevision.
316 * The Title parameter to RevisionLookup::getPreviousRevision and
317 RevisionLookup::getNextRevision is deprecated and should be omitted.
318 * MWHttpRequest::factory is deprecated. Use HttpRequestFactory.
319 * The Http class is deprecated. For the request, get, and post methods, use
320 HttpRequestFactory. For isValidURI, use MWHttpRequest::isValidURI. For
321 getProxy, use (string)$wgHTTPProxy. For createMultiClient, construct a
322 MultiHttpClient directly.
323 * Http::$httpEngine is deprecated and has no replacement. The default 'guzzle'
324 engine will eventually be made the only engine for HTTP requests.
325 * RepoGroup::singleton(), RepoGroup::destroySingleton(),
326 RepoGroup::setSingleton(), wfFindFile(), and wfLocalFile() are all
327 deprecated. Use MediaWikiServices instead.
328 * The getSubjectPage, getTalkPage, and getOtherPage of Title are deprecated.
329 Use NamespaceInfo's getSubjectPage, getTalkPage, and getAssociatedPage.
330 * MWMessagePack class, no longer used, has been deprecated in 1.34.
331 * The Block class is separated into DatabaseBlock (for blocks stored in the
332 database), and SystemBlock (for temporary blocks created by the system).
333 SystemBlock should be used when creating any temporary blocks. Block is
334 a deprecated alias for DatabaseBlock.
335 * Parser::$mConf is deprecated. It will be removed entirely in a later version.
336 Some context can be found at T224165.
337 * Constructing Parser directly is deprecated. Obtain one from ParserFactory.
338 * Title::moveSubpages is deprecated. Use MovePage::moveSubpages or
339 MovePage::moveSubpagesIfAllowed.
340 * The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
341 * (T62260) Hard deprecate Language::getExtraUserToggles() method.
342 * Language::viewPrevNext function is deprecated, use
343 PrevNextNavigationRenderer::buildPrevNextNavigation instead
344 * User::trackBlockWithCookie and DatabaseBlock::clearCookie are deprecated. Use
345 BlockManager::trackBlockWithCookie and BlockManager::clearCookie instead.
346 * DatabaseBlock::setCookie, DatabaseBlock::getCookieValue,
347 DatabaseBlock::getIdFromCookieValue and AbstractBlock::shouldTrackWithCookie
348 are moved to internal helper methods for BlockManager::trackBlockWithCookie.
349 * ResourceLoaderContext::getConfig and ResourceLoaderContext::getLogger have
350 been deprecated. Inside ResourceLoaderModule subclasses, use the local methods
351 instead. Elsewhere, use the methods from the ResourceLoader class.
352 * The Preprocessor_DOM implementation has been deprecated. It will be
353 removed in a future release. Use the Preprocessor_Hash implementation
354 instead.
355 * Sanitizer::attributeWhitelist() and Sanitizer::setupAttributeWhitelist()
356 have been deprecated; they will be made private in the future.
357 * SearchResult::termMatches() method is deprecated. It was unreliable because
358 only populated by few search engine implementations. Use
359 SqlSearchResult::getTermMatches() if really needed.
360 * SearchResult::getTextSnippet( $terms ) the $terms param is being deprecated
361 and should no longer be passed. Search engine implemenations should be
362 responsible for carrying relevant information needed for highlighting with
363 their own SearchResultSet/SearchResult sub-classes.
364 * SearchEngine::$searchTerms protected field is deprecated. Moved to
365 SearchDatabase.
366 * The use of the $terms param in the ShowSearchHit and ShowSearchHitTitle
367 hooks is highly discouraged as it's only populated by SearchDatabase search
368 engines.
369 * Skin::escapeSearchLink() is deprecated. Use Skin::getSearchLink() or the skin
370 template option 'searchaction' instead.
371 * LoadBalancer::haveIndex() and LoadBalancer::isNonZeroLoad() have
372 been deprecated.
373 * User::getRights() and User::$mRights have been deprecated. Use
374 PermissionManager::getUserPermissions() instead.
375 * The LocalisationCacheRecache hook no longer allows purging of message blobs
376 to be prevented. Modifying the $purgeBlobs parameter now has no effect.
377
378 === Other changes in 1.34 ===
379 * …
380
381 == Compatibility ==
382 MediaWiki 1.34 requires PHP 7.0.13 or later. Although HHVM 3.18.5 or later is
383 supported, it is generally advised to use PHP 7.0.13 or later for long term
384 support.
385
386 MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used,
387 but support for them is somewhat less mature. There is experimental support for
388 Oracle and Microsoft SQL Server.
389
390 The supported versions are:
391
392 * MySQL 5.5.8 or later
393 * PostgreSQL 9.2 or later
394 * SQLite 3.8.0 or later
395 * Oracle 9.0.1 or later
396 * Microsoft SQL Server 2005 (9.00.1399)
397
398 == Online documentation ==
399 Documentation for both end-users and site administrators is available on
400 MediaWiki.org, and is covered under the GNU Free Documentation License (except
401 for pages that explicitly state that their contents are in the public domain):
402
403 https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
404
405 == Mailing list ==
406 A mailing list is available for MediaWiki user support and discussion:
407
408 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
409
410 A low-traffic announcements-only list is also available:
411
412 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
413
414 It's highly recommended that you sign up for one of these lists if you're
415 going to run a public MediaWiki, so you can be notified of security fixes.
416
417 == IRC help ==
418 There's usually someone online in #mediawiki on irc.freenode.net.