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: http://git.cyclocoop.org/data/%7B%7B%20url_for%28%27static%27%2C%20filename=%27js/%40%20%27info_articles_miens%27%20=%3E%20%27My%20articles%27%2C%20%27info_articles_tous%27%20=%3E%20%27All%20the%20articles%27%2C%20%27info_articles_trouves%27%20=%3E%20%27Articles%20found%27%2C-%27info_articles_trouves_dans_texte%27%20=%3E%20%27Articles%20found%20%28in%20the%20text%29%27%2C%20%27info_attente_validation%27%20=%3E%20%27Your%20articles%20awaiting%20validation%27%2C%20%27info_aucun_article%27%20=%3E%20%27No%20articles%27%2C-%27info_aucun_article_syndique%27%20=%3E%20%27No%20syndicated%20articles%27%2C%20%27info_aucun_auteur%27%20=%3E%20%27No%20authors%27%2C%20%27info_aucun_message%27%20=%3E%20%27No%20messages%27%2C%20%27info_aucun_rubrique%27%20=%3E%20%27No%20sections%27%2C-%27info_aucun_site%27%20=%3E%20%27No%20linked%20sites%27%2C-%27info_aucun_visiteur%27%20=%3E%20%27No%20visitors%27%2C%20%27info_aujourdhui%27%20=%3E%20%27today:%27%2C-%27info_auteur_message%27%20=%3E%20%27MESSAGE%20FROM:%27%2C%20%27info_auteurs%27%20=%3E%20%27Authors%27%2C%20%27info_auteurs_par_tri%27%20=%3E%20%27Authors%40partri%40%27%2C%20%27info_auteurs_trouves%27%20=%3E%20%27Authors%20found%27%2C%40%40%20-298%2C8%20%20254%2C6%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=8e0ef3e187b4b8ebe847dbc8ae1ec2b96ed58ae0;p=lhc%2Fweb%2Fwiklou.git 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 ); } /**