mediawiki-extensions-OATHAuth/ServiceWiring.php
libraryupgrader 5b1a07906a build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn

Additional changes:
* Also sorted "composer fix" command to run phpcbf last.

Change-Id: Idb1b91244e653b2ba2e27bceb3eba769577124a9
2020-01-14 08:27:31 +00:00

26 lines
633 B
PHP

<?php
use MediaWiki\Extension\OATHAuth\OATHAuth;
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
use MediaWiki\MediaWikiServices;
return [
'OATHAuth' => function ( MediaWikiServices $services ) {
return new OATHAuth(
$services->getMainConfig(),
$services->getDBLoadBalancerFactory()
);
},
'OATHUserRepository' => function ( MediaWikiServices $services ) {
global $wgOATHAuthDatabase;
$auth = $services->getService( 'OATHAuth' );
return new OATHUserRepository(
$services->getDBLoadBalancerFactory()->getMainLB( $wgOATHAuthDatabase ),
new \HashBagOStuff( [
'maxKey' => 5
] ),
$auth
);
}
];