From 15b5dc5d8eecb5a1784b0b7165a90a81e071d750 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 11 Jan 2017 13:52:58 -0800 Subject: [PATCH] mw.Api: Deprecate mw.Api.errors, mw.Api.warnings Change-Id: I90f1ca1f26d647f34059fec342778568f7a5ff71 --- RELEASE-NOTES-1.29 | 2 ++ resources/src/mediawiki/api.js | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 4174876c99..905ea12467 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -175,6 +175,8 @@ changes to languages because of Phabricator reports. * Linker::getInternalLinkAttributesObj() (deprecated since 1.25) was removed. * Linker::getLinkAttributesInternal() (deprecated since 1.25) was removed. * RedisConnectionPool::handleException (deprecated since 1.23) was removed. +* The static properties mw.Api.errors and mw.Api.warnings, containing incomplete + and outdated lists of errors/warnings returned by the API, are now deprecated. == Compatibility == diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js index a174f58425..d5032da8f4 100644 --- a/resources/src/mediawiki/api.js +++ b/resources/src/mediawiki/api.js @@ -427,9 +427,8 @@ /** * @static * @property {Array} - * List of errors we might receive from the API. - * For now, this just documents our expectation that there should be similar messages - * available. + * Very incomplete and outdated list of errors we might receive from the API. Do not use. + * @deprecated since 1.29 */ mw.Api.errors = [ // occurs when POST aborted @@ -487,17 +486,18 @@ 'stashwrongowner', 'stashnosuchfilekey' ]; + mw.log.deprecate( mw.Api, 'errors', mw.Api.errors ); /** * @static * @property {Array} - * List of warnings we might receive from the API. - * For now, this just documents our expectation that there should be similar messages - * available. + * Very incomplete and outdated list of warnings we might receive from the API. Do not use. + * @deprecated since 1.29 */ mw.Api.warnings = [ 'duplicate', 'exists' ]; + mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings ); }( mediaWiki, jQuery ) ); -- 2.20.1