Remove FileBackendGroup::singleton() and ::destroySingletons()
both deprecated since 1.35, hard deprecated since 1.37 and unused. Bug: T249025 Change-Id: Ie4759fa3fa25202d623317acb444079f10e33817
This commit is contained in:
parent
d028567e4c
commit
da26927c73
3 changed files with 4 additions and 26 deletions
|
|
@ -75,6 +75,8 @@ because of Phabricator reports.
|
|||
=== Breaking changes in 1.38 ===
|
||||
* LinkCache::singleton(), deprecated since 1.28, has been removed.
|
||||
* MessageCache::singleton(), deprecated since 1.34, has been removed.
|
||||
* FileBackendGroup::singleton() and ::destroySingletons(), both deprecated since
|
||||
1.35, have been removed.
|
||||
* …
|
||||
|
||||
=== Deprecations in 1.38 ===
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ use MediaWiki\Config\ServiceOptions;
|
|||
use MediaWiki\FileBackend\FSFile\TempFSFileFactory;
|
||||
use MediaWiki\FileBackend\LockManager\LockManagerGroupFactory;
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use Wikimedia\ObjectFactory;
|
||||
|
||||
/**
|
||||
|
|
@ -73,26 +72,6 @@ class FileBackendGroup {
|
|||
'fallbackWikiId',
|
||||
];
|
||||
|
||||
/**
|
||||
* @deprecated since 1.35, hard deprecated since 1.37
|
||||
* inject the service instead
|
||||
*
|
||||
* @return FileBackendGroup
|
||||
*/
|
||||
public static function singleton(): FileBackendGroup {
|
||||
wfDeprecated( __METHOD__, '1.35' );
|
||||
return MediaWikiServices::getInstance()->getFileBackendGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.35, hard deprecated since 1.37
|
||||
* test framework should reset services between tests instead
|
||||
*/
|
||||
public static function destroySingleton() {
|
||||
wfDeprecated( __METHOD__, '1.35' );
|
||||
MediaWikiServices::getInstance()->resetServiceForTesting( 'FileBackendGroup' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ServiceOptions $options
|
||||
* @param ConfiguredReadOnlyMode $configuredReadOnlyMode
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
<?php
|
||||
|
||||
use MediaWiki\FileBackend\LockManager\LockManagerGroupFactory;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass FileBackendGroup
|
||||
* @covers ::singleton
|
||||
* @covers ::destroySingleton
|
||||
*/
|
||||
class FileBackendGroupIntegrationTest extends MediaWikiIntegrationTestCase {
|
||||
use FileBackendGroupTestTrait;
|
||||
|
|
@ -16,7 +13,7 @@ class FileBackendGroupIntegrationTest extends MediaWikiIntegrationTestCase {
|
|||
}
|
||||
|
||||
private function getLockManagerGroupFactory( $domain ): LockManagerGroupFactory {
|
||||
return MediaWikiServices::getInstance()->getLockManagerGroupFactory();
|
||||
return $this->getServiceContainer()->getLockManagerGroupFactory();
|
||||
}
|
||||
|
||||
private function newObj( array $options = [] ): FileBackendGroup {
|
||||
|
|
@ -46,7 +43,7 @@ class FileBackendGroupIntegrationTest extends MediaWikiIntegrationTestCase {
|
|||
|
||||
$this->resetServices();
|
||||
|
||||
$services = MediaWikiServices::getInstance();
|
||||
$services = $this->getServiceContainer();
|
||||
$services->resetServiceForTesting( 'FileBackendGroup' );
|
||||
|
||||
$obj = $services->getFileBackendGroup();
|
||||
|
|
|
|||
Loading…
Reference in a new issue