Merge "Fix types around ILoadBalancer and IResultWrapper"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 4 Jul 2019 22:30:35 +0000 (22:30 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 4 Jul 2019 22:30:35 +0000 (22:30 +0000)
includes/ProtectionForm.php
includes/db/MWLBFactory.php
includes/libs/objectcache/MultiWriteBagOStuff.php
includes/libs/objectcache/RedisBagOStuff.php
includes/specials/forms/PreferencesFormOOUI.php
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.TagItemWidget.less

index 2f10598..4bead34 100644 (file)
@@ -200,7 +200,7 @@ class ProtectionForm {
        /**
         * Show the input form with optional error message
         *
-        * @param string|null $err Error message or null if there's no error
+        * @param string|string[]|null $err Error message or null if there's no error
         */
        function show( $err = null ) {
                $out = $this->mContext->getOutput();
index 27695cc..3d404d3 100644 (file)
@@ -70,6 +70,7 @@ abstract class MWLBFactory {
         * @param BagOStuff $mainStash
         * @param WANObjectCache $wanCache
         * @return array
+        * @internal For use with service wiring
         */
        public static function applyDefaultConfig(
                array $lbConf,
@@ -152,8 +153,11 @@ abstract class MWLBFactory {
                        $serversCheck = [ $lbConf['serverTemplate'] ] ?? [];
                }
 
-               self::assertValidServerConfigs( $serversCheck, $options->get( 'DBname' ),
-                       $options->get( 'DBprefix' ) );
+               self::assertValidServerConfigs(
+                       $serversCheck,
+                       $options->get( 'DBname' ),
+                       $options->get( 'DBprefix' )
+               );
 
                $lbConf = self::injectObjectCaches( $lbConf, $srvCace, $mainStash, $wanCache );
 
@@ -164,7 +168,7 @@ abstract class MWLBFactory {
         * @return array
         */
        private static function getDbTypesWithSchemas() {
-               return [ 'postgres', 'msssql' ];
+               return [ 'postgres', 'mssql' ];
        }
 
        /**
@@ -328,6 +332,7 @@ abstract class MWLBFactory {
         *
         * @param array $config (e.g. $wgLBFactoryConf)
         * @return string Class name
+        * @internal For use with service wiring
         */
        public static function getLBFactoryClass( array $config ) {
                // For configuration backward compatibility after removing
@@ -365,13 +370,9 @@ abstract class MWLBFactory {
        /**
         * @param LBFactory $lbFactory
         * @param string $dbType 'mysql', 'sqlite', etc.
+        * @internal For use with service wiring
         */
        public static function setSchemaAliases( LBFactory $lbFactory, $dbType ) {
-               if ( $dbType instanceof Config ) {
-                       // Before 1.34 this took a whole Config just to get $dbType
-                       wfDeprecated( __METHOD__ . ' with Config argument', '1.34' );
-                       $dbType = $dbType->get( 'DBtype' );
-               }
                if ( $dbType === 'mysql' ) {
                        /**
                         * When SQLite indexes were introduced in r45764, it was noted that
@@ -398,6 +399,7 @@ abstract class MWLBFactory {
        /**
         * Log a database deprecation warning
         * @param string $msg Deprecation message
+        * @internal For use with service wiring
         */
        public static function logDeprecation( $msg ) {
                global $wgDevelopmentWarnings;
index 0503382..e832734 100644 (file)
@@ -299,7 +299,7 @@ class MultiWriteBagOStuff extends BagOStuff {
         * @param int[] $indexes List of backing cache indexes
         * @param bool $asyncWrites
         * @param string $method Method name of backing caches
-        * @param array[] $args Arguments to the method of backing caches
+        * @param array $args Arguments to the method of backing caches
         * @return bool
         */
        protected function doWrite( $indexes, $asyncWrites, $method, array $args ) {
index 0ba9c3f..743b9eb 100644 (file)
@@ -427,7 +427,7 @@ class RedisBagOStuff extends BagOStuff {
         * not. The safest response for us is to explicitly destroy the connection
         * object and let it be reopened during the next request.
         * @param RedisConnRef $conn
-        * @param Exception $e
+        * @param RedisException $e
         */
        protected function handleException( RedisConnRef $conn, $e ) {
                $this->setLastError( BagOStuff::ERR_UNEXPECTED );
index 9b86812..5dae156 100644 (file)
@@ -146,9 +146,8 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
                                ) .
                                $this->getFooterText( $key );
 
-                       $tabPanels[] = new OOUI\TabPanelLayout( [
+                       $tabPanels[] = new OOUI\TabPanelLayout( 'mw-prefsection-' . $key, [
                                'classes' => [ 'mw-htmlform-autoinfuse-lazy' ],
-                               'name' => 'mw-prefsection-' . $key,
                                'label' => $label,
                                'content' => new OOUI\FieldsetLayout( [
                                        'classes' => [ 'mw-prefs-section-fieldset' ],
index 31a5f54..4f645b9 100644 (file)
@@ -42,7 +42,7 @@
                color: @colorGray5;
        }
 
-       &.oo-ui-labelElement .oo-ui-labelElement-label {
+       &.oo-ui-labelElement:not( .oo-ui-tagItemWidget-fixed ) .oo-ui-labelElement-label {
                cursor: pointer;
        }