Hard deprecate wfGetCache() and wfGetMainCache()

Bug: T293928
Change-Id: I7d9220730cb1f09d5b22f271fb172bd4640212ad
This commit is contained in:
Alexander Vorwerk 2021-12-07 21:51:49 +01:00
parent 804dcac8a3
commit fba157c773
2 changed files with 10 additions and 2 deletions

View file

@ -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.

View file

@ -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();
}