GlobalFunctions: Hard deprecate `wfGlobalCacheKey()` function
authorDerick Alangi <alangiderick@gmail.com>
Thu, 18 Jul 2019 08:22:01 +0000 (09:22 +0100)
committerDerick Alangi <alangiderick@gmail.com>
Thu, 18 Jul 2019 08:41:23 +0000 (09:41 +0100)
The only extension that used this was ConfirmEdit and it has been
cleaned up with Ia7b276ee65fdf58c, so is it time we hard deprecate
it?

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5CbwfGlobalCacheKey%5Cb&i=nope&files=&repos=

Depends-On: Ia7b276ee65fdf58c4fc0859563930528d44a03ca
Change-Id: I3fda797c64ec62df4454625ad1a3bf89f6a88246

includes/GlobalFunctions.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php

index c6c386c..7b4b502 100644 (file)
@@ -2521,6 +2521,7 @@ function wfForeignMemcKey( $db, $prefix, ...$args ) {
  * @return string
  */
 function wfGlobalCacheKey( ...$args ) {
+       wfDeprecated( __METHOD__, '1.30' );
        return ObjectCache::getLocalClusterInstance()->makeGlobalKey( ...$args );
 }
 
index 1210a50..660734e 100644 (file)
@@ -716,6 +716,7 @@ class GlobalTest extends MediaWikiTestCase {
         */
        public function testWfGlobalCacheKey() {
                $cache = ObjectCache::getLocalClusterInstance();
+               $this->hideDeprecated( 'wfGlobalCacheKey' );
                $this->assertEquals(
                        $cache->makeGlobalKey( 'foo', 123, 'bar' ),
                        wfGlobalCacheKey( 'foo', 123, 'bar' )