Services: Convert BlobStoreFactory's static to a const now HHVM is gone
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 8 Oct 2019 18:27:22 +0000 (11:27 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 8 Oct 2019 20:31:48 +0000 (13:31 -0700)
Change-Id: Ia319c881f0457fde71e355eca4873ac157e605d3
(cherry picked from commit 4afe9030c2ff36811e5ff8260e9c401b6e047c01)

includes/ServiceWiring.php
includes/Storage/BlobStoreFactory.php

index 860edfd..6d3fe6c 100644 (file)
@@ -107,7 +107,7 @@ return [
                        $services->getDBLoadBalancerFactory(),
                        $services->getExternalStoreAccess(),
                        $services->getMainWANObjectCache(),
-                       new ServiceOptions( BlobStoreFactory::$constructorOptions,
+                       new ServiceOptions( BlobStoreFactory::CONSTRUCTOR_OPTIONS,
                                $services->getMainConfig() ),
                        $services->getContentLanguage()
                );
index b59c68d..c1371c9 100644 (file)
@@ -61,12 +61,10 @@ class BlobStoreFactory {
        private $contLang;
 
        /**
-        * TODO Make this a const when HHVM support is dropped (T192166)
-        *
         * @var array
         * @since 1.34
         */
-       public static $constructorOptions = [
+       public const CONSTRUCTOR_OPTIONS = [
                'CompressRevisions',
                'DefaultExternalStore',
                'LegacyEncoding',
@@ -80,7 +78,7 @@ class BlobStoreFactory {
                ServiceOptions $options,
                Language $contLang
        ) {
-               $options->assertRequiredOptions( self::$constructorOptions );
+               $options->assertRequiredOptions( self::CONSTRUCTOR_OPTIONS );
 
                $this->lbFactory = $lbFactory;
                $this->extStoreAccess = $extStoreAccess;