From 8e0ef3e187b4b8ebe847dbc8ae1ec2b96ed58ae0 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Tue, 8 Oct 2019 11:26:17 -0700 Subject: [PATCH] Services: Convert PasswordReset's static to a const now HHVM is gone Change-Id: I77e0d9ce86cf96824eb672d0f35c32b5f4c484be (cherry picked from commit 662b27776b0df77f31e9767bfbecd8bf0ca6ef93) --- includes/ServiceWiring.php | 2 +- includes/user/PasswordReset.php | 2 +- tests/phpunit/includes/user/PasswordResetTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index 6d3fe6c4bd..6c0748c8ce 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -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(), diff --git a/includes/user/PasswordReset.php b/includes/user/PasswordReset.php index be7ea915e4..2958b1f2d0 100644 --- a/includes/user/PasswordReset.php +++ b/includes/user/PasswordReset.php @@ -60,7 +60,7 @@ class PasswordReset implements LoggerAwareInterface { */ private $permissionCache; - public static $constructorOptions = [ + public const CONSTRUCTOR_OPTIONS = [ 'AllowRequiringEmailForResets', 'EnableEmail', 'PasswordResetRoutes', diff --git a/tests/phpunit/includes/user/PasswordResetTest.php b/tests/phpunit/includes/user/PasswordResetTest.php index b37a6b45bc..7acaa0651e 100644 --- a/tests/phpunit/includes/user/PasswordResetTest.php +++ b/tests/phpunit/includes/user/PasswordResetTest.php @@ -517,7 +517,7 @@ class PasswordResetTest extends MediaWikiTestCase { 'PasswordResetRoutes' => $passwordResetRoutes, ]; - return new ServiceOptions( PasswordReset::$constructorOptions, $hash ); + return new ServiceOptions( PasswordReset::CONSTRUCTOR_OPTIONS, $hash ); } /** -- 2.20.1