summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2022-01-10 15:53:56 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2022-01-10 15:53:56 +0000
commit40f1c72fda50908859312059e15aec24c7cb6026 (patch)
tree49d2b8ac81f03aae8108616d3288d06a9cd50bcf
parent5430e9cf3d63e037955dc026cc2dedc5e913b2c3 (diff)
parentfba157c7734a727ac925a3d9a5c1407d481eb55d (diff)
Merge "Hard deprecate wfGetCache() and wfGetMainCache()"
-rw-r--r--RELEASE-NOTES-1.382
-rw-r--r--includes/GlobalFunctions.php10
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();
}