From: James D. Forrester Date: Tue, 8 Oct 2019 18:26:17 +0000 (-0700) Subject: Services: Convert PasswordReset's static to a const now HHVM is gone X-Git-Tag: 1.34.0-rc.0~23 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=8e0ef3e187b4b8ebe847dbc8ae1ec2b96ed58ae0 Services: Convert PasswordReset's static to a const now HHVM is gone Change-Id: I77e0d9ce86cf96824eb672d0f35c32b5f4c484be (cherry picked from commit 662b27776b0df77f31e9767bfbecd8bf0ca6ef93) --- 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 ); } /**