From a930bf7d7b071c0b47f8ea938af1a7de5beb8fb9 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 31 May 2018 14:28:42 +0100 Subject: [PATCH] Remove deprecated global $parserMemc and wfGetParserCacheStorage Deprecated since 1.30, no longer used in core, bundled components, and WMF-deployed extensions. Change-Id: I09715f94750f083712719ef599a2ea4260297681 --- .phpcs.xml | 2 +- RELEASE-NOTES-1.32 | 2 ++ docs/globals.txt | 2 +- includes/GlobalFunctions.php | 11 ----------- includes/Setup.php | 7 ------- 5 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index 14bb494495..375630f2c5 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -61,7 +61,7 @@ - + diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index 13d15c2ebd..46efbdfc56 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -129,6 +129,8 @@ because of Phabricator reports. * The protected methods PHPSessionHandler::returnSuccess() and returnFailure(), only needed for PHP5 compatibility, have been removed. It now uses the boolean values `true` and `false` respectively. +* The $parserMemc global and wfGetParserCacheStorage(), deprecated since 1.30, + were removed. Use the ParserCache class instead. === Deprecations in 1.32 === * Use of a StartProfiler.php file is deprecated in favour of placing diff --git a/docs/globals.txt b/docs/globals.txt index 5bdb31c15c..be887a65d8 100644 --- a/docs/globals.txt +++ b/docs/globals.txt @@ -63,5 +63,5 @@ $wgParser $wgRequest WebRequest object, to get request data -$wgMemc, $messageMemc, $parserMemc +$wgMemc, $messageMemc Object caches diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 6f49a141e1..00e35b1490 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3150,17 +3150,6 @@ function wfGetMessageCacheStorage() { return ObjectCache::getInstance( $wgMessageCacheType ); } -/** - * Get the cache object used by the parser cache - * - * @deprecated since 1.30, use MediaWikiServices::getParserCache()->getCacheStorage() - * @return BagOStuff - */ -function wfGetParserCacheStorage() { - global $wgParserCacheType; - return ObjectCache::getInstance( $wgParserCacheType ); -} - /** * Call hook functions defined in $wgHooks * diff --git a/includes/Setup.php b/includes/Setup.php index f73e686a28..3cc52f8e25 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -771,13 +771,6 @@ if ( $wgCommandLineMode ) { $wgMemc = wfGetMainCache(); $messageMemc = wfGetMessageCacheStorage(); -/** - * @deprecated since 1.30 - */ -$parserMemc = new DeprecatedGlobal( 'parserMemc', function () { - return MediaWikiServices::getInstance()->getParserCache()->getCacheStorage(); -}, '1.30' ); - wfDebugLog( 'caches', 'cluster: ' . get_class( $wgMemc ) . ', WAN: ' . ( $wgMainWANCache === CACHE_NONE ? 'CACHE_NONE' : $wgMainWANCache ) . -- 2.20.1