diff options
author | Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de> | 2021-12-07 21:51:49 +0100 |
---|---|---|
committer | Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de> | 2022-01-09 22:25:00 +0100 |
commit | fba157c7734a727ac925a3d9a5c1407d481eb55d (patch) | |
tree | 52096977d0722d72c452f0a66fb961635b79a0fb | |
parent | 804dcac8a393adcaacf9371074cce32cae81971c (diff) |
Hard deprecate wfGetCache() and wfGetMainCache()
Bug: T293928
Change-Id: I7d9220730cb1f09d5b22f271fb172bd4640212ad
-rw-r--r-- | RELEASE-NOTES-1.38 | 2 | ||||
-rw-r--r-- | includes/GlobalFunctions.php | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/RELEASE-NOTES-1.38 b/RELEASE-NOTES-1.38 index 2d0ff2e03100..4ce5a3a5ae14 100644 --- a/RELEASE-NOTES-1.38 +++ b/RELEASE-NOTES-1.38 @@ -404,6 +404,8 @@ because of Phabricator reports. - Use ArchivedRevisionLookup::hasArchivedRevisions instead of ::isDeleted. * The `mediawiki.pager.tablePager` module was deprecated in favor of the more generic `mediawiki.pager.styles`. +* wfGetCache() and wfGetMainCache(), both deprecated since 1.32, now emit + deprecation warnings. * LinkCache::addGoodLinkObj() has been hard deprecated. * ApiStashEdit::parseAndStash has been hard deprecated. * Content::prepareSave was hard-deprecated, now emits deprecation warnings. diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0a6ddc9733b1..f3be87e55cde 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2428,21 +2428,27 @@ function wfShorthandToInteger( $string = '', $default = -1 ) { /** * Get a specific cache object. * - * @deprecated since 1.32, use ObjectCache::getInstance() instead + * @deprecated since 1.32, hard deprecated since 1.38 + * Use ObjectCache::getInstance() instead + * * @param int|string $cacheType A CACHE_* constants, or other key in $wgObjectCaches * @return BagOStuff */ function wfGetCache( $cacheType ) { + wfDeprecated( __FUNCTION__, '1.32' ); return ObjectCache::getInstance( $cacheType ); } /** * Get the main cache object * - * @deprecated since 1.32, use ObjectCache::getLocalClusterInstance() instead + * @deprecated since 1.32, hard deprecated since 1.38 + * Use ObjectCache::getLocalClusterInstance() instead + * * @return BagOStuff */ function wfGetMainCache() { + wfDeprecated( __FUNCTION__, '1.32' ); return ObjectCache::getLocalClusterInstance(); } |