use MediaWiki\Shell\CommandFactory;
use MediaWiki\Storage\BlobStoreFactory;
use MediaWiki\Storage\NameTableStore;
-use MediaWiki\Storage\RevisionStore;
+use MediaWiki\Storage\RevisionStoreFactory;
use MediaWiki\Storage\SqlBlobStore;
use Wikimedia\ObjectFactory;
},
'RevisionStore' => function ( MediaWikiServices $services ) {
+ return $services->getRevisionStoreFactory()->getRevisionStore();
+ },
+
+ 'RevisionStoreFactory' => function ( MediaWikiServices $services ) {
/** @var SqlBlobStore $blobStore */
$blobStore = $services->getService( '_SqlBlobStore' );
+ $config = $services->getMainConfig();
- $store = new RevisionStore(
+ $store = new RevisionStoreFactory(
$services->getDBLoadBalancer(),
$blobStore,
$services->getMainWANObjectCache(),
$services->getCommentStore(),
- $services->getActorMigration()
+ $services->getContentModelStore(),
+ $services->getSlotRoleStore(),
+ $services->getMainConfig()->get( 'MultiContentRevisionSchemaMigrationStage' ),
+ $services->getActorMigration(),
+ LoggerFactory::getInstance( 'RevisionStore' ),
+ $config->get( 'ContentHandlerUseDB' )
);
- $store->setLogger( LoggerFactory::getInstance( 'RevisionStore' ) );
-
- $config = $services->getMainConfig();
- $store->setContentHandlerUseDB( $config->get( 'ContentHandlerUseDB' ) );
-
return $store;
},
);
},
+ '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();