Turn PasswordReset into a service
[lhc/web/wiklou.git] / includes / ServiceWiring.php
index 83847d8..2c1725e 100644 (file)
@@ -521,6 +521,17 @@ return [
                );
        },
 
+       'PasswordReset' => function ( MediaWikiServices $services ) : PasswordReset {
+               $options = new ServiceOptions( PasswordReset::$constructorOptions, $services->getMainConfig() );
+               return new PasswordReset(
+                       $options,
+                       AuthManager::singleton(),
+                       $services->getPermissionManager(),
+                       $services->getDBLoadBalancer(),
+                       LoggerFactory::getInstance( 'authentication' )
+               );
+       },
+
        'PerDbNameStatsdDataFactory' =>
        function ( MediaWikiServices $services ) : StatsdDataFactoryInterface {
                $config = $services->getMainConfig();