Merge "Revert "objectcache: fix race conditions in RedisBagOStuff::incr()""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 18 Jul 2019 18:46:17 +0000 (18:46 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 18 Jul 2019 18:46:17 +0000 (18:46 +0000)
includes/GlobalFunctions.php
includes/TitleArrayFromResult.php
includes/specialpage/AuthManagerSpecialPage.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 ee60f7b..80fdf9d 100644 (file)
@@ -41,7 +41,7 @@ class TitleArrayFromResult extends TitleArray implements Countable {
        }
 
        /**
-        * @param bool|IResultWrapper $row
+        * @param bool|stdClass $row
         * @return void
         */
        protected function setCurrent( $row ) {
index 101570f..65cd2d2 100644 (file)
@@ -429,7 +429,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
                                // accidentally returning it so best check and fix
                                $status = Status::wrap( $status );
                        } elseif ( is_string( $status ) ) {
-                               $status = Status::newFatal( new RawMessage( '$1', $status ) );
+                               $status = Status::newFatal( new RawMessage( '$1', [ $status ] ) );
                        } elseif ( is_array( $status ) ) {
                                if ( is_string( reset( $status ) ) ) {
                                        $status = Status::newFatal( ...$status );
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' )