mw.Api: Deprecate mw.Api.errors, mw.Api.warnings
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 11 Jan 2017 21:52:58 +0000 (13:52 -0800)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 11 Jan 2017 21:54:07 +0000 (13:54 -0800)
Change-Id: I90f1ca1f26d647f34059fec342778568f7a5ff71

RELEASE-NOTES-1.29
resources/src/mediawiki/api.js

index 4174876..905ea12 100644 (file)
@@ -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 ==
 
index a174f58..d5032da 100644 (file)
        /**
         * @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
                '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 ) );