Services: Convert PasswordReset's static to a const now HHVM is gone
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 8 Oct 2019 18:26:17 +0000 (11:26 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Tue, 8 Oct 2019 20:31:48 +0000 (13:31 -0700)
Change-Id: I77e0d9ce86cf96824eb672d0f35c32b5f4c484be
(cherry picked from commit 662b27776b0df77f31e9767bfbecd8bf0ca6ef93)

includes/ServiceWiring.php
includes/user/PasswordReset.php
tests/phpunit/includes/user/PasswordResetTest.php

index 6d3fe6c..6c0748c 100644 (file)
@@ -522,7 +522,7 @@ return [
        },
 
        'PasswordReset' => function ( MediaWikiServices $services ) : PasswordReset {
-               $options = new ServiceOptions( PasswordReset::$constructorOptions, $services->getMainConfig() );
+               $options = new ServiceOptions( PasswordReset::CONSTRUCTOR_OPTIONS, $services->getMainConfig() );
                return new PasswordReset(
                        $options,
                        AuthManager::singleton(),
index be7ea91..2958b1f 100644 (file)
@@ -60,7 +60,7 @@ class PasswordReset implements LoggerAwareInterface {
         */
        private $permissionCache;
 
-       public static $constructorOptions = [
+       public const CONSTRUCTOR_OPTIONS = [
                'AllowRequiringEmailForResets',
                'EnableEmail',
                'PasswordResetRoutes',
index b37a6b4..7acaa06 100644 (file)
@@ -517,7 +517,7 @@ class PasswordResetTest extends MediaWikiTestCase {
                        'PasswordResetRoutes' => $passwordResetRoutes,
                ];
 
-               return new ServiceOptions( PasswordReset::$constructorOptions, $hash );
+               return new ServiceOptions( PasswordReset::CONSTRUCTOR_OPTIONS, $hash );
        }
 
        /**