mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-12-18 09:50:37 +00:00
22752225a1
Turn GadgetRepo into a service, deprecate GadgetRepo::singleton() Change-Id: I0ab14ca936eec1eead91d4eb0970f898628c8388
13 lines
340 B
PHP
13 lines
340 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\Gadgets\GadgetRepo;
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
return [
|
|
'GadgetsRepo' => static function ( MediaWikiServices $services ): GadgetRepo {
|
|
/** @var $repo GadgetRepo */
|
|
$repo = $services->getObjectFactory()->createObject( $services->getMainConfig()->get( 'GadgetsRepoClass' ) );
|
|
return $repo;
|
|
},
|
|
];
|