);
},
- 'CryptRand' => function ( MediaWikiServices $services ) {
- $secretKey = $services->getMainConfig()->get( 'SecretKey' );
- return new CryptRand(
- [
- // To try vary the system information of the state a bit more
- // by including the system's hostname into the state
- 'wfHostname',
- // It's mostly worthless but throw the wiki's id into the data
- // for a little more variance
- 'wfWikiID',
- // If we have a secret key set then throw it into the state as well
- function () use ( $secretKey ) {
- return $secretKey ?: '';
- }
- ],
- // The config file is likely the most often edited file we know should
- // be around so include its stat info into the state.
- // The constant with its location will almost always be defined, as
- // WebStart.php defines MW_CONFIG_FILE to $IP/LocalSettings.php unless
- // being configured with MW_CONFIG_CALLBACK (e.g. the installer).
- defined( 'MW_CONFIG_FILE' ) ? [ MW_CONFIG_FILE ] : [],
- LoggerFactory::getInstance( 'CryptRand' )
- );
+ 'CryptRand' => function () {
+ return new CryptRand();
},
'CryptHKDF' => function ( MediaWikiServices $services ) {
$cache = ObjectCache::getLocalClusterInstance();
}
- return new CryptHKDF( $secret, $config->get( 'HKDFAlgorithm' ),
- $cache, $context, $services->getCryptRand()
- );
+ return new CryptHKDF( $secret, $config->get( 'HKDFAlgorithm' ), $cache, $context );
},
'MediaHandlerFactory' => function ( MediaWikiServices $services ) {
foreach ( $config['paths'] as $prefix => $serviceConfig ) {
$class = $serviceConfig['class'];
// Merge in the global defaults
- $constructArg = isset( $serviceConfig['options'] )
- ? $serviceConfig['options']
- : [];
+ $constructArg = $serviceConfig['options'] ?? [];
$constructArg += $config['global'];
// Make the VRS service available at the mount point
$vrsClient->mount( $prefix, [ 'class' => $class, 'config' => $constructArg ] );
$blobStore,
$services->getMainWANObjectCache(),
$services->getCommentStore(),
+ $services->getContentModelStore(),
+ $services->getSlotRoleStore(),
+ $services->getMainConfig()->get( 'MultiContentRevisionSchemaMigrationStage' ),
$services->getActorMigration()
);
);
},
+ 'ChangeTagDefStore' => function ( MediaWikiServices $services ) {
+ return new NameTableStore(
+ $services->getDBLoadBalancer(),
+ $services->getMainWANObjectCache(),
+ LoggerFactory::getInstance( 'NameTableSqlStore' ),
+ 'change_tag_def',
+ 'ctd_id',
+ 'ctd_name',
+ null,
+ false,
+ function ( $insertFields ) {
+ $insertFields['ctd_user_defined'] = 0;
+ $insertFields['ctd_count'] = 0;
+ return $insertFields;
+ }
+ );
+ },
+
'PreferencesFactory' => function ( MediaWikiServices $services ) {
global $wgContLang;
$authManager = AuthManager::singleton();