From c8987d7c3e30a7d1c2e917cb6a9b0114281703e8 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Tue, 8 Oct 2019 11:33:31 -0700 Subject: [PATCH] Services: Convert MWLBFactory's static to a const now HHVM is gone Change-Id: I2b5c77c304e03af31bc3f15f2e3f6002ca2f2647 (cherry picked from commit 6898ba72325b2227d33d002d337474bd23e0bffb) --- includes/ServiceWiring.php | 2 +- includes/db/MWLBFactory.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index f6d0ec06c9..e0db05b6c8 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -199,7 +199,7 @@ return [ $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(), diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index 63b320e343..5daf9ef8fc 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -35,12 +35,10 @@ abstract class MWLBFactory { private static $loggedDeprecations = []; /** - * TODO Make this a const when HHVM support is dropped (T192166) - * * @var array * @since 1.34 */ - public static $applyDefaultConfigOptions = [ + public const APPLY_DEFAULT_CONFIG_OPTIONS = [ 'DBcompress', 'DBDefaultGroup', 'DBmwschema', @@ -79,7 +77,7 @@ abstract class MWLBFactory { BagOStuff $mainStash, WANObjectCache $wanCache ) { - $options->assertRequiredOptions( self::$applyDefaultConfigOptions ); + $options->assertRequiredOptions( self::APPLY_DEFAULT_CONFIG_OPTIONS ); global $wgCommandLineMode; -- 2.20.1