mediawiki-extensions-Gadgets/includes/ServiceWiring.php
Siddharth VP 22752225a1 Make GadgetRepo a service
Turn GadgetRepo into a service, deprecate GadgetRepo::singleton()

Change-Id: I0ab14ca936eec1eead91d4eb0970f898628c8388
2023-12-05 17:38:41 -06:00

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;
},
];