Merge "Rehabilitate DateFormatter"
[lhc/web/wiklou.git] / includes / ServiceWiring.php
index 722bac1..fed1b6d 100644 (file)
@@ -138,6 +138,10 @@ return [
                return new CryptRand();
        },
 
+       'DateFormatterFactory' => function () : DateFormatterFactory {
+               return new DateFormatterFactory;
+       },
+
        'DBLoadBalancer' => function ( MediaWikiServices $services ) : Wikimedia\Rdbms\LoadBalancer {
                // just return the default LB from the DBLoadBalancerFactory service
                return $services->getDBLoadBalancerFactory()->getMainLB();
@@ -571,8 +575,13 @@ return [
        },
 
        'SpecialPageFactory' => function ( MediaWikiServices $services ) : SpecialPageFactory {
+               $config = $services->getMainConfig();
+               $options = [];
+               foreach ( SpecialPageFactory::$constructorOptions as $key ) {
+                       $options[$key] = $config->get( $key );
+               }
                return new SpecialPageFactory(
-                       $services->getMainConfig(),
+                       $options,
                        $services->getContentLanguage()
                );
        },