Before this commit, each bind function would return an object containing
a reference to the function used in the event listener creation with the
intention that this could later be used to cleanup the event listeners.
This is problematic for the following reasons:
* In order to cleanup the event listener, it forces the client to know
which element the event listener was added to (button, checkbox,
document, window, etc.),. the event type that was used ('click',
'focusin', etc), and whether or not the "useCapture" param was also
used. The `removeEventListener` API won't remove the correct event
listener unless these three pieces of info are known by the client [1].
* Because the above point is tricky to get right, numerous potential
memory leaks were possible with the `unbind` function as the
`useCapture` param wasn't being passed in some cases.
This commit aims to simplify the cleanup API by returning an anonymous
function in each bind function that the client can call to cleanup the
relevant event listeners without knowing any of the implementation
details. This also makes the `unbind` function unnecessary.
** This is a breaking change to the checkboxHack API ** but because
there aren't any known clients of the return values [2], a formal
deprecation process was assumed to be unnecessary. Note gadgets should
not be using the internal function mw.loader.require so these were
not considered.
[1] https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener#matching_event_listeners_for_removal
[2] https://codesearch.wmcloud.org/search/?q=checkboxHack&i=nope&files=&excludeFiles=&repos=
Bug: T291096
Change-Id: Ia2d79f27dd81fdc74a44829da3ca472f4c01d4b5
331 lines
14 KiB
Text
331 lines
14 KiB
Text
= MediaWiki 1.38 =
|
||
|
||
== MediaWiki 1.38.0-PRERELEASE ==
|
||
|
||
THIS IS NOT A RELEASE YET
|
||
|
||
MediaWiki 1.38 is an alpha-quality development branch, and is not recommended
|
||
for use in production.
|
||
|
||
== Upgrading notes for 1.38 ==
|
||
Don't forget to always back up your database before upgrading!
|
||
|
||
See the file UPGRADE for more detailed per-version upgrade instructions from the
|
||
oldest supported upgrading version, MediaWiki 1.29.
|
||
|
||
Some specific notes for MediaWiki 1.38 upgrades are below:
|
||
* …
|
||
|
||
For notes on 1.36.x and older releases, see HISTORY.
|
||
|
||
=== Configuration changes for system administrators in 1.38 ===
|
||
* …
|
||
|
||
==== New configuration ====
|
||
* $wgBrowserFormatDetection – This setting allows overriding browsers' automatic
|
||
detection and handling of formats. It's initially used to prevent auto-linking
|
||
of possible telephone numbers in wiki pages' output in Safari on iOS; this can
|
||
be re-enabled if you wish, or locally extended for other browsers' quirks.
|
||
* …
|
||
|
||
==== Changed configuration ====
|
||
* $wgMaxImageArea - This setting may now be set to false to disable size
|
||
checking before scaling. Extensions can still override its value by
|
||
using the BitmapHandlerCheckImageArea hook.
|
||
* …
|
||
|
||
==== Removed configuration ====
|
||
* $wgShellLocale - This setting has been removed as it was a flawed solution
|
||
to the problem of locale dependence, MediaWiki will now always set a locale
|
||
of C.UTF-8 or C and works around the remaining problems of the C locale by
|
||
not using escapeshellarg. This follows the direction of PHP 8.0, which sets
|
||
a locale of C by default instead of respecting LC_CTYPE.
|
||
* $wgLoggedOutMaxAge - Experiment removed, originally added in 1.35. (T293848)
|
||
* $wgIncludejQueryMigrate - Deprecated in 1.36. We only support jQuery v3.
|
||
* …
|
||
|
||
=== New user-facing features in 1.38 ===
|
||
* …
|
||
|
||
=== New developer features in 1.38 ===
|
||
* Added a deleteUserEmail maintenance script - This file enables the deletion
|
||
of a given user's associated email address. It can be helpful for
|
||
privacy-preserving operations.
|
||
* …
|
||
|
||
=== External library changes in 1.38 ===
|
||
* …
|
||
|
||
==== New external libraries ====
|
||
* …
|
||
|
||
===== New development-only external libraries =====
|
||
* …
|
||
|
||
==== Changed external libraries ====
|
||
* Updated wikimedia/parsoid from v0.14.0-a14 to v0.15.0-a1.
|
||
* Updated wikimedia/purtle from 1.0.7 to 1.0.8.
|
||
* Updated wikimedia/shellbox from 2.0.0 to 2.1.0.
|
||
* Updated pear/mail_mime from 1.10.9 to 1.10.11.
|
||
* Updated pear/net_smtp from 1.9.2 to 1.10.0.
|
||
* Updated psr/log from 1.1.3 to 1.1.4.
|
||
* Updated wikimedia/wrappedstring from 3.2.0 to 4.0.1.
|
||
* …
|
||
|
||
===== Changed development-only external libraries =====
|
||
* Updated doctrine/dbal for PHP < 7.3 from 2.10.4 to 2.13.3.
|
||
* Updated doctrine/dbal for PHP >= 7.3 from 3.0.0 to 3.1.2.
|
||
* Updated composer/spdx-licenses from 1.5.4 to 1.5.5.
|
||
* Updated composer/semver from 3.5.4 to 3.5.5.
|
||
* …
|
||
|
||
==== Removed external libraries ====
|
||
* …
|
||
|
||
=== Bug fixes in 1.38 ===
|
||
* …
|
||
|
||
=== Action API changes in 1.38 ===
|
||
* …
|
||
|
||
=== Action API internal changes in 1.38 ===
|
||
* …
|
||
|
||
=== Languages updated in 1.38 ===
|
||
MediaWiki supports over 400 languages. Many localisations are updated regularly.
|
||
Below only new and removed languages are listed, as well as changes to languages
|
||
because of Phabricator reports.
|
||
|
||
* (T292166) Updated namespace names for the Lombard language.
|
||
* (T291899) Added language support for Xiang Chinese (hsn).
|
||
* (T292612) Added language support for S'gaw Karen (ksw).
|
||
* (T293656) Added language support for Farefare (gur).
|
||
|
||
=== Breaking changes in 1.38 ===
|
||
* (T291008) The IP class, deprecated since 1.35 in favor of the IPUtils library,
|
||
has been removed. The IP related regexes which were also deprecated in favor
|
||
of the IPUtils library were also removed, IPUtils::RE_* should be used
|
||
instead.
|
||
* LinkCache::singleton(), deprecated since 1.28, has been removed.
|
||
* RepoGroup::singleton(), ::destroySingletons() and setSingleton(), all
|
||
deprecated since 1.34, have been removed.
|
||
* The following methods from FileDeleteForm were removed:
|
||
- ::__construct (the class is no longer newable)
|
||
- ::execute()
|
||
- ::haveDeletableFile()
|
||
Use FileDeleteAction instead.
|
||
* MessageCache::singleton(), deprecated since 1.34, has been removed.
|
||
* LockManagerGroup::singleton() and ::destroySingletons(), both deprecated since
|
||
1.34, have been removed.
|
||
* FileBackendGroup::singleton() and ::destroySingletons(), both deprecated since
|
||
1.35, have been removed.
|
||
* TemplateParser used to support disabling the cache with a boolean parameter
|
||
in its constructor. This was deprecated in 1.35 and has now been removed.
|
||
* The ArticleUndeleteLogEntry hook, deprecated in 1.37, was removed.
|
||
* The BeforeResetNotificationTimestamp hook, deprecated in 1.37, was removed.
|
||
* The global function mimeTypeMatch() has been removed without a deprecation
|
||
process.
|
||
* The following JavaScript mw.config keys have been removed:
|
||
- $wgCookiePrefix
|
||
- $wgCookieDomain
|
||
- $wgCookiePath
|
||
- $wgCookieExpiration
|
||
Use mw.cookie from the mediawiki.cookie module instead.
|
||
* The signature of PageUpdater::markAsRevert method was changed. It has never
|
||
been used outside of MediaWiki core.
|
||
* If you want to use interwiki titles with HTMLTitleTextField, you now need
|
||
to pass 'interwiki' => true. In 1.37, the default behavior was to let
|
||
interwiki title through by default, logging a deprecation warning.
|
||
* The `UndeleteForm::undelete` hook, deprecated in 1.37, was removed.
|
||
* BagOStuff::setDebug(), deprecated since 1.36, has been removed.
|
||
* The `jquery.mw-jump` ResourceLoader module was removed.
|
||
* The `wgForeignUploadTargets` and `wgEnableUploads` configuration values were
|
||
removed from mw.config. They had previously been documented as being included
|
||
for internal use by the mediawiki.ForeignUpload module.
|
||
* Several Skin methods, which have emitted deprecation warnings since 1.36, have
|
||
been removed. These include:
|
||
- Skin::privacyLink()
|
||
- Skin::aboutLink()
|
||
- Skin::disclaimerLink()
|
||
For these, instead use Skin::footerLink() to alter footer links.
|
||
- Skin::getLogo()
|
||
For this, use ResourceLoaderSkinModule::getAvailableLogos() instead.
|
||
- Skin::getIndicatorsHTML()
|
||
For this, use Skin::getIndicatorsData() instead.
|
||
- Skin::subPageSubtitle()
|
||
For this, use Skin::prepareSubtitle() instead.
|
||
- Skin::makeVariablesScript()
|
||
For this, use ResourceLoader::makeInlineScript() instead.
|
||
- Skin::getAllowedSkins()
|
||
- Skin::getSkinNames()
|
||
For these, use SkinFactory::getAllowedSkins() or ::getInstalledSkins().
|
||
- Skin::makeUrl()
|
||
- Skin::getSearchLink()
|
||
- Skin::mainPageLink()
|
||
For these, use Skin::getSearchPageTitle() instead.
|
||
* Parser::getUser and ::mUser, as well as ParserOptions::getUser, deprecated
|
||
since 1.37, has been removed.
|
||
* Parser::$mStripState, deprecated in 1.35, has been made private. Use
|
||
Parser::getStripState() instead.
|
||
* The following deprecated features in blocks were removed:
|
||
- DatabaseBlock constructor 'byText' property with blocker's name, use 'by'
|
||
property with UserIdentity value instead.
|
||
- DatabaseBlock constructor 'by' property with blocker's ID, use 'by' property
|
||
with UserIdentity value instead.
|
||
- DatabaseBlock::isWhitelistedFromAutoblocks, use ::isExemptedFromAutoblocks.
|
||
- DatabaseBlock::setBlocker now only accepts UserIdentity.
|
||
- AbstractBlock::getTargetAndType and ::getTarget, use ::getTargetName,
|
||
::getTargetUserIdentity and ::getType instead
|
||
* The following functions, emitting deprecations since 1.37, have been removed:
|
||
- Title::isWatchable()
|
||
- WatchAction::doWatchOrUnwatch(), WatchAction::doWatch(),
|
||
WatchAction::doUnwatch(), WatchAction::getWatchToken()
|
||
- User::isWatched(), User::isTempWatched(), User::addWatch(),
|
||
User::removeWatch()
|
||
* ParserOptions::setTidy() that had no effect and was deprecated since 1.35
|
||
has been removed.
|
||
* The constant ApiBase::PARAM_VALUE_LINKS, deprecated since 1.35 has been
|
||
removed.
|
||
* UserLoadOptions, UserSaveOptions and UserResetAllOptions hooks, deprecated
|
||
since 1.37, were removed.
|
||
* The return values for each `bind` function in checkboxHack.js has been changed
|
||
from an object to a function. In addition, the `unbind` function has been
|
||
removed. A deprecation process was assumed unnecessary as there were no known
|
||
usages.
|
||
* …
|
||
|
||
=== Deprecations in 1.38 ===
|
||
* The MWGrants class is deprecated in favor of the new GrantsInfo and
|
||
GrantsLocalization services.
|
||
* The global functions wfReadOnly() and wfReadOnlyReason() have been
|
||
deprecated in favor of the ReadOnlyMode service.
|
||
* PageProps::getInstance() has been deprecated. Use
|
||
MediaWikiServices::getPageProps() instead.
|
||
* User::setOption(), deprecated since 1.35, now emits deprecation warnings.
|
||
* Linker::formatComment(), ::formatLinksInComment(), ::commentBlock() and
|
||
revComment() were deprecated. Use the new CommentFormatter service.
|
||
* Skin::getSkinStylePath now triggers deprecation warnings. Direct string path
|
||
should be used instead.
|
||
* DatabaseBlock::purgeExpired(), deprecated since 1.36, now emits
|
||
deprecation warnings.
|
||
* SkinTemplate::getPersonalToolsList(), deprecated since 1.35, now emits
|
||
deprecation warnings.
|
||
* The following methods from the User class now trigger deprecation warnings:
|
||
- ::blockedBy
|
||
- ::getBlockId
|
||
* Content::getParserOutput() was deprecated.
|
||
Use ContentRenderer::getParserOutput and override
|
||
ContentHandler::fillParserOutput instead.
|
||
* Article::doDelete() was deprecated. Use WikiPage::doDeleteArticleReal if
|
||
you only need to delete the article. If you also need things to happen
|
||
with OutputPage, you may want to check the hooks in DeleteAction instead.
|
||
* Instantiating the MessageContent class now emits deprecation notices.
|
||
* Message::content() now triggers deprecation warnings.
|
||
* The following methods from the ParserOutput class now emit deprecation
|
||
warnings:
|
||
- ::hideNewSection() - use ::setHideNewSection()
|
||
- ::preventClickjacking() - use ::{get,set}PreventClickjacking()
|
||
- ::getProperty() - use ::getPageProperty()
|
||
- ::setProperty() - use ::setPageProperty()
|
||
- ::unsetProperty() - use ::unsetPageProperties()
|
||
- ::getProperties() - use ::getPageProperties()
|
||
- ::getCategoryLinks() - use ::getCategoryNames()
|
||
- ::setCategoryLinks() - use ::setCategories()
|
||
- ::addTrackingCategory() - use Parser::addTrackingCategory()
|
||
or TrackingCategories::addTrackingCategory()
|
||
- ::addWarning() - use ::addWarningMsg()
|
||
* The following methods from the ParserOutput class were deprecated:
|
||
- ::getFlag() - use ::getOutputFlag()
|
||
- ::setFlag() - use ::setOutputFlag()
|
||
- ::getAllFlags() - this method is now marked @internal
|
||
* The following methods were deprecated; use ::setPreventClickjacking(..)
|
||
instead:
|
||
- OutputPage::preventClickjacking()
|
||
- OutputPage::allowClickjacking()
|
||
- ImageHistoryList::preventClickjacking()
|
||
- ImageHistoryPseudoPager::preventClickjacking()
|
||
- ContribsPager::preventClickjacking()
|
||
* Collation::singleton() and ::factory() now trigger deprecation warnings.
|
||
* The following methods in MWNamespace, all deprecated since 1.34, now emit
|
||
deprecation warnings:
|
||
- isTalk()
|
||
- exists()
|
||
- subjectEquals()
|
||
- getCanonicalNamespaces()
|
||
- getCanonicalName()
|
||
- getCanonicalIndex()
|
||
- getValidNamespaces()
|
||
- isContent()
|
||
- hasSubpages()
|
||
- getContentNamespaces()
|
||
* Return values in the parameter $pageLang of the hook PageContentLanguage
|
||
with other types than a Language object, deprecated since 1.33, now emmits
|
||
deprecation warnings.
|
||
* All external access to ParserOutput and CacheTime classes properties will now
|
||
emit deprecation warnings. Use getters and setters instead.
|
||
* The PageArchive class has had several methods deprecated. The replacements
|
||
are as follows:
|
||
- Use UndeletePage instead of ::undeleteAsUser(), ::getFileStatus() and
|
||
::getRevisionStatus().
|
||
- Use the respective methods of the new ArchivedRevisionLookup service
|
||
instead of ::listRevisions, ::getRevisionRecordByTimestamp,
|
||
::getArchivedRevisionRecord, ::getPreviousRevisionRecord and
|
||
::getLastRevisionId.
|
||
- Use ArchivedRevisionLookup::hasArchivedRevisions instead of ::isDeleted.
|
||
* LinkCache::addGoodLinkObj() has been hard deprecated.
|
||
* …
|
||
|
||
=== Other changes in 1.38 ===
|
||
* The following things were changed in the file deletion form:
|
||
- The name and ID of the submit button are now `wpConfirmB`, not
|
||
`mw-filedelete-submit`
|
||
- The ID of the form is now `deleteconfirm`, not `mw-img-deleteconfirm`
|
||
- The `mw-filedelete-editreasons` class was replaced with
|
||
`mw-delete-editreasons`
|
||
The goal of these changes is to make the HTML more similar to that of
|
||
normal page deletion.
|
||
* …
|
||
|
||
== Compatibility ==
|
||
|
||
MediaWiki 1.38 requires PHP 7.3.19 or later and the following PHP extensions:
|
||
|
||
* ctype
|
||
* dom
|
||
* fileinfo
|
||
* iconv
|
||
* intl
|
||
* json
|
||
* mbstring
|
||
* xml
|
||
|
||
MySQL/MariaDB is the recommended DBMS. PostgreSQL or SQLite can also be used,
|
||
but support for them is somewhat less mature.
|
||
|
||
The supported versions are:
|
||
|
||
* MySQL 5.5.8 or later
|
||
* PostgreSQL 9.4 or later
|
||
* SQLite 3.8.0 or later
|
||
|
||
== Online documentation ==
|
||
Documentation for both end-users and site administrators is available on
|
||
MediaWiki.org, and is covered under the GNU Free Documentation License (except
|
||
for pages that explicitly state that their contents are in the public domain):
|
||
|
||
https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
|
||
|
||
== Mailing list ==
|
||
A mailing list is available for MediaWiki user support and discussion:
|
||
|
||
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
|
||
|
||
A low-traffic announcements-only list is also available:
|
||
|
||
https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
|
||
|
||
It's highly recommended that you sign up for one of these lists if you're
|
||
going to run a public MediaWiki, so you can be notified of security fixes.
|
||
|
||
== IRC help ==
|
||
There's usually someone online in #mediawiki on irc.libera.chat.
|