mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
3c76c7918b
Change-Id: Ie9b7d462c8ddf4abb749ee07537ccec1949b8fba
59 lines
1.8 KiB
PHP
59 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
// PHP unit does not understand code coverage for this file
|
|
// as the @covers annotation cannot cover a specific file
|
|
// This is fully tested in ServiceWiringTest.php
|
|
// @codeCoverageIgnoreStart
|
|
|
|
return [
|
|
'DiscussionTools.CommentParser' => static function ( MediaWikiServices $services ): CommentParser {
|
|
return new CommentParser(
|
|
$services->getMainConfig(),
|
|
$services->getContentLanguage(),
|
|
$services->getLanguageConverterFactory(),
|
|
$services->getService( 'DiscussionTools.LanguageData' ),
|
|
$services->getTitleParser()
|
|
);
|
|
},
|
|
'DiscussionTools.LanguageData' => static function ( MediaWikiServices $services ): LanguageData {
|
|
return new LanguageData(
|
|
$services->getMainConfig(),
|
|
$services->getContentLanguage(),
|
|
$services->getLanguageConverterFactory(),
|
|
$services->getSpecialPageFactory()
|
|
);
|
|
},
|
|
'DiscussionTools.SubscriptionStore' => static function ( MediaWikiServices $services ): SubscriptionStore {
|
|
return new SubscriptionStore(
|
|
$services->getConfigFactory(),
|
|
$services->getDBLoadBalancerFactory(),
|
|
$services->getReadOnlyMode(),
|
|
$services->getUserFactory(),
|
|
$services->getUserIdentityUtils()
|
|
);
|
|
},
|
|
'DiscussionTools.ThreadItemStore' => static function ( MediaWikiServices $services ): ThreadItemStore {
|
|
return new ThreadItemStore(
|
|
$services->getConfigFactory(),
|
|
$services->getDBLoadBalancerFactory(),
|
|
$services->getReadOnlyMode(),
|
|
$services->getPageStore(),
|
|
$services->getRevisionStore(),
|
|
$services->getTitleFormatter(),
|
|
$services->getActorStore(),
|
|
$services->getContentLanguage()
|
|
);
|
|
},
|
|
'DiscussionTools.ThreadItemFormatter' => static function ( MediaWikiServices $services ): ThreadItemFormatter {
|
|
return new ThreadItemFormatter(
|
|
$services->getLinkRenderer()
|
|
);
|
|
},
|
|
];
|
|
|
|
// @codeCoverageIgnoreEnd
|