use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
use MediaWiki\Auth\AuthManager;
+use MediaWiki\Block\BlockRestrictionStore;
use MediaWiki\Config\ConfigRepository;
use MediaWiki\Interwiki\ClassicInterwikiLookup;
use MediaWiki\Interwiki\InterwikiLookup;
use MediaWiki\Storage\BlobStoreFactory;
use MediaWiki\Storage\NameTableStoreFactory;
use MediaWiki\Storage\SqlBlobStore;
+use MediaWiki\Storage\PageEditStash;
return [
'ActorMigration' => function ( MediaWikiServices $services ) : ActorMigration {
);
},
+ 'BlockRestrictionStore' => function ( MediaWikiServices $services ) : BlockRestrictionStore {
+ return new BlockRestrictionStore(
+ $services->getDBLoadBalancer()
+ );
+ },
+
'CommentStore' => function ( MediaWikiServices $services ) : CommentStore {
return new CommentStore(
$services->getContentLanguage(),
);
},
+ 'PageEditStash' => function ( MediaWikiServices $services ) : PageEditStash {
+ $config = $services->getMainConfig();
+
+ return new PageEditStash(
+ ObjectCache::getLocalClusterInstance(),
+ $services->getDBLoadBalancer(),
+ LoggerFactory::getInstance( 'StashEdit' ),
+ $services->getStatsdDataFactory(),
+ defined( 'MEDIAWIKI_JOB_RUNNER' ) || $config->get( 'CommandLineMode' )
+ ? PageEditStash::INITIATOR_JOB_OR_CLI
+ : PageEditStash::INITIATOR_USER
+ );
+ },
+
'Parser' => function ( MediaWikiServices $services ) : Parser {
return $services->getParserFactory()->create();
},
$config,
LoggerFactory::getInstance( 'resourceloader' )
);
+
$rl->addSource( $config->get( 'ResourceLoaderSources' ) );
+
+ // Core modules, then extension/skin modules
$rl->register( include "$IP/resources/Resources.php" );
+ $rl->register( $config->get( 'ResourceModules' ) );
+ Hooks::run( 'ResourceLoaderRegisterModules', [ &$rl ] );
+
+ if ( $config->get( 'EnableJavaScriptTest' ) === true ) {
+ $rl->registerTestModules();
+ }
return $rl;
},