Services: Convert MWLBFactory's static to a const now HHVM is gone
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 8 Oct 2019 18:33:31 +0000 (11:33 -0700)
committerJforrester <jforrester@wikimedia.org>
Tue, 8 Oct 2019 22:54:28 +0000 (22:54 +0000)
Change-Id: I2b5c77c304e03af31bc3f15f2e3f6002ca2f2647
(cherry picked from commit 6898ba72325b2227d33d002d337474bd23e0bffb)

includes/ServiceWiring.php
includes/db/MWLBFactory.php

index f6d0ec0..e0db05b 100644 (file)
@@ -199,7 +199,7 @@ return [
 
                $lbConf = MWLBFactory::applyDefaultConfig(
                        $mainConfig->get( 'LBFactoryConf' ),
 
                $lbConf = MWLBFactory::applyDefaultConfig(
                        $mainConfig->get( 'LBFactoryConf' ),
-                       new ServiceOptions( MWLBFactory::$applyDefaultConfigOptions, $mainConfig ),
+                       new ServiceOptions( MWLBFactory::APPLY_DEFAULT_CONFIG_OPTIONS, $mainConfig ),
                        $services->getConfiguredReadOnlyMode(),
                        $services->getLocalServerObjectCache(),
                        $services->getMainObjectStash(),
                        $services->getConfiguredReadOnlyMode(),
                        $services->getLocalServerObjectCache(),
                        $services->getMainObjectStash(),
index 63b320e..5daf9ef 100644 (file)
@@ -35,12 +35,10 @@ abstract class MWLBFactory {
        private static $loggedDeprecations = [];
 
        /**
        private static $loggedDeprecations = [];
 
        /**
-        * TODO Make this a const when HHVM support is dropped (T192166)
-        *
         * @var array
         * @since 1.34
         */
         * @var array
         * @since 1.34
         */
-       public static $applyDefaultConfigOptions = [
+       public const APPLY_DEFAULT_CONFIG_OPTIONS = [
                'DBcompress',
                'DBDefaultGroup',
                'DBmwschema',
                'DBcompress',
                'DBDefaultGroup',
                'DBmwschema',
@@ -79,7 +77,7 @@ abstract class MWLBFactory {
                BagOStuff $mainStash,
                WANObjectCache $wanCache
        ) {
                BagOStuff $mainStash,
                WANObjectCache $wanCache
        ) {
-               $options->assertRequiredOptions( self::$applyDefaultConfigOptions );
+               $options->assertRequiredOptions( self::APPLY_DEFAULT_CONFIG_OPTIONS );
 
                global $wgCommandLineMode;
 
 
                global $wgCommandLineMode;