Merge "mw.feedback: Remove unused custom spinner"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 25 Mar 2019 17:44:54 +0000 (17:44 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 25 Mar 2019 17:44:54 +0000 (17:44 +0000)
13 files changed:
.phpcs.xml
RELEASE-NOTES-1.33
autoload.php
includes/DefaultSettings.php
includes/changetags/ChangeTags.php
includes/db/MWLBFactory.php
includes/libs/rdbms/lbfactory/LBFactory.php
includes/libs/rdbms/lbfactory/LBFactoryMulti.php
includes/objectcache/ObjectCache.php
includes/poolcounter/PoolCounter.php
includes/poolcounter/PoolCounterNull.php [new file with mode: 0644]
includes/registration/Processor.php
tests/phpunit/includes/cache/MessageCacheTest.php

index 6934648..d1e54a7 100644 (file)
                <exclude-pattern>*/includes/parser/Preprocessor_Hash\.php</exclude-pattern>
                <exclude-pattern>*/includes/parser/Preprocessor\.php</exclude-pattern>
                <exclude-pattern>*/includes/PathRouter\.php</exclude-pattern>
-               <exclude-pattern>*/includes/poolcounter/PoolCounter\.php</exclude-pattern>
                <exclude-pattern>*/includes/PrefixSearch\.php</exclude-pattern>
                <exclude-pattern>*/includes/profiler/SectionProfiler\.php</exclude-pattern>
                <exclude-pattern>*/includes/search/SearchEngine\.php</exclude-pattern>
index 93d3253..72a468b 100644 (file)
@@ -84,6 +84,8 @@ For notes on 1.32.x and older releases, see HISTORY.
   is no longer a problem, because the code now ensures the timestamp is always
   higher than the previous one. The writes are guarded with CAS logic (check
   and set), which prevents updates that would overlap.
+* $wgDBmysql5 (T196185) - This experimental setting, deprecated in 1.31, has
+  been removed.
 
 === New user-facing features in 1.33 ===
 * (T96041) __EXPECTUNUSEDCATEGORY__ on a category page causes the category
index bbfe251..94a99fa 100644 (file)
@@ -1108,10 +1108,10 @@ $wgAutoloadLocalClasses = [
        'PhpXmlBugTester' => __DIR__ . '/includes/installer/PhpBugTests.php',
        'Pingback' => __DIR__ . '/includes/Pingback.php',
        'PoolCounter' => __DIR__ . '/includes/poolcounter/PoolCounter.php',
+       'PoolCounterNull' => __DIR__ . '/includes/poolcounter/PoolCounterNull.php',
        'PoolCounterRedis' => __DIR__ . '/includes/poolcounter/PoolCounterRedis.php',
        'PoolCounterWork' => __DIR__ . '/includes/poolcounter/PoolCounterWork.php',
        'PoolCounterWorkViaCallback' => __DIR__ . '/includes/poolcounter/PoolCounterWorkViaCallback.php',
-       'PoolCounter_Stub' => __DIR__ . '/includes/poolcounter/PoolCounter.php',
        'PoolWorkArticleView' => __DIR__ . '/includes/poolcounter/PoolWorkArticleView.php',
        'PopulateArchiveRevId' => __DIR__ . '/maintenance/populateArchiveRevId.php',
        'PopulateBacklinkNamespace' => __DIR__ . '/maintenance/populateBacklinkNamespace.php',
index 3afa593..7a645a6 100644 (file)
@@ -2114,26 +2114,6 @@ $wgDBerrorLog = false;
  */
 $wgDBerrorLogTZ = false;
 
-/**
- * Set to true to engage MySQL 4.1/5.0 charset-related features;
- * for now will just cause sending of 'SET NAMES=utf8' on connect.
- *
- * @warning THIS IS EXPERIMENTAL!
- *
- * May break if you're not using the table defs from mysql5/tables.sql.
- * May break if you're upgrading an existing wiki if set differently.
- * Broken symptoms likely to include incorrect behavior with page titles,
- * usernames, comments etc containing non-ASCII characters.
- * Might also cause failures on the object cache and other things.
- *
- * Even correct usage may cause failures with Unicode supplementary
- * characters (those not in the Basic Multilingual Plane) unless MySQL
- * has enhanced their Unicode support.
- *
- * @deprecated since 1.31
- */
-$wgDBmysql5 = false;
-
 /**
  * Set true to enable Oracle DCRP (supported from 11gR1 onward)
  *
index 00eed14..3a93e57 100644 (file)
@@ -766,7 +766,7 @@ class ChangeTags {
                                        // Return nothing.
                                        $conds[] = '0';
                                        break;
-                               };
+                               }
                        }
 
                        if ( $filterTagIds !== [] ) {
index 6ed693e..9851460 100644 (file)
@@ -122,7 +122,6 @@ abstract class MWLBFactory {
                                                'tablePrefix' => $mainConfig->get( 'DBprefix' ),
                                                'flags' => DBO_DEFAULT,
                                                'sqlMode' => $mainConfig->get( 'SQLMode' ),
-                                               'utf8Mode' => $mainConfig->get( 'DBmysql5' )
                                        ];
 
                                        $lbConf['servers'][$i] = $server;
@@ -142,7 +141,6 @@ abstract class MWLBFactory {
                                        'load' => 1,
                                        'flags' => $flags,
                                        'sqlMode' => $mainConfig->get( 'SQLMode' ),
-                                       'utf8Mode' => $mainConfig->get( 'DBmysql5' )
                                ];
                                if ( in_array( $server['type'], $typesWithSchema, true ) ) {
                                        $server += [ 'schema' => $mainConfig->get( 'DBmwschema' ) ];
@@ -168,7 +166,6 @@ abstract class MWLBFactory {
                                        $lbConf['serverTemplate']['schema'] = $mainConfig->get( 'DBmwschema' );
                                }
                                $lbConf['serverTemplate']['sqlMode'] = $mainConfig->get( 'SQLMode' );
-                               $lbConf['serverTemplate']['utf8Mode'] = $mainConfig->get( 'DBmysql5' );
                        }
                }
 
index 007ac20..3a8f2e1 100644 (file)
@@ -654,7 +654,7 @@ abstract class LBFactory implements ILBFactory {
        }
 
        public function closeAll() {
-               $this->forEachLBCallMethod( 'closeAll', [] );
+               $this->forEachLBCallMethod( 'closeAll' );
        }
 
        public function setAgentName( $agent ) {
index 189ceee..aec99f4 100644 (file)
@@ -89,9 +89,6 @@ class LBFactoryMulti extends LBFactory {
         */
        private $readOnlyBySection = [];
 
-       /** @var array Load balancer factory configuration */
-       private $conf;
-
        /** @var LoadBalancer[] */
        private $mainLBs = [];
 
@@ -166,7 +163,6 @@ class LBFactoryMulti extends LBFactory {
        public function __construct( array $conf ) {
                parent::__construct( $conf );
 
-               $this->conf = $conf;
                $required = [ 'sectionsByDB', 'sectionLoads', 'serverTemplate' ];
                $optional = [ 'groupLoadsBySection', 'groupLoadsByDB', 'hostsByName',
                        'externalLoads', 'externalTemplateOverrides', 'templateOverridesByServer',
index dc8b146..fed0854 100644 (file)
@@ -238,7 +238,6 @@ class ObjectCache {
                global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType;
                $candidates = [ $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType ];
                foreach ( $candidates as $candidate ) {
-                       $cache = false;
                        if ( $candidate !== CACHE_NONE && $candidate !== CACHE_ANYTHING ) {
                                $cache = self::getInstance( $candidate );
                                // CACHE_ACCEL might default to nothing if no APCu
index ba0b4cb..060faec 100644 (file)
@@ -39,7 +39,7 @@
  * that start with "nowait:". However, only 0 timeouts (non-blocking requests)
  * can be used with "nowait:" keys.
  *
- * By default PoolCounter_Stub is used, which provides no locking. You
+ * By default PoolCounterNull is used, which provides no locking. You
  * can get a useful one in the PoolCounter extension.
  */
 abstract class PoolCounter {
@@ -111,7 +111,7 @@ abstract class PoolCounter {
        public static function factory( $type, $key ) {
                global $wgPoolCounterConf;
                if ( !isset( $wgPoolCounterConf[$type] ) ) {
-                       return new PoolCounter_Stub;
+                       return new PoolCounterNull;
                }
                $conf = $wgPoolCounterConf[$type];
                $class = $conf['class'];
@@ -208,23 +208,3 @@ abstract class PoolCounter {
                return $type . ':' . ( hexdec( substr( sha1( $key ), 0, 4 ) ) % $slots );
        }
 }
-
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PoolCounter_Stub extends PoolCounter {
-
-       public function __construct() {
-               /* No parameters needed */
-       }
-
-       public function acquireForMe() {
-               return Status::newGood( PoolCounter::LOCKED );
-       }
-
-       public function acquireForAnyone() {
-               return Status::newGood( PoolCounter::LOCKED );
-       }
-
-       public function release() {
-               return Status::newGood( PoolCounter::RELEASED );
-       }
-}
diff --git a/includes/poolcounter/PoolCounterNull.php b/includes/poolcounter/PoolCounterNull.php
new file mode 100644 (file)
index 0000000..95a5057
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Provides of semaphore semantics for restricting the number
+ * of workers that may be concurrently performing the same task.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * A default PoolCounter, which provides no locking.
+ */
+class PoolCounterNull extends PoolCounter {
+
+       public function __construct() {
+               /* No parameters needed */
+       }
+
+       public function acquireForMe() {
+               return Status::newGood( PoolCounter::LOCKED );
+       }
+
+       public function acquireForAnyone() {
+               return Status::newGood( PoolCounter::LOCKED );
+       }
+
+       public function release() {
+               return Status::newGood( PoolCounter::RELEASED );
+       }
+}
index 636d3b3..68ba413 100644 (file)
@@ -17,7 +17,6 @@ interface Processor {
         * @param string $path Absolute path of JSON file
         * @param array $info
         * @param int $version manifest_version for info
-        * @return array "credits" information to store
         */
        public function extractInfo( $path, array $info, $version );
 
index d8330ef..b03a309 100644 (file)
@@ -223,8 +223,6 @@ class MessageCacheTest extends MediaWikiLangTestCase {
 
        /**
         * Regression test for T218918
-        * @group Broken
-        * @fixme Disabled per https://phabricator.wikimedia.org/T219042
         */
        public function testLoadFromDB_fetchLatestRevision() {
                // Create three revisions of the same message page.
@@ -239,7 +237,7 @@ class MessageCacheTest extends MediaWikiLangTestCase {
                $importRevision = new WikiRevision( new HashConfig() );
                $importRevision->setTitle( $r3->getTitle() );
                $importRevision->setComment( 'Imported edit' );
-               $importRevision->setTimestamp( '19991122334455' );
+               $importRevision->setTimestamp( '19991122001122' );
                $importRevision->setText( 'IMPORTED OLD TEST' );
                $importRevision->setUsername( 'Alan Smithee' );