Merge "Hard deprecate GadgetRepo::singleton and GadgetRepo::setSingleton"

This commit is contained in:
jenkins-bot 2024-07-05 17:14:04 +00:00 committed by Gerrit Code Review
commit d455cbd512

View file

@ -240,6 +240,7 @@ abstract class GadgetRepo {
* @return GadgetRepo
*/
public static function singleton() {
wfDeprecated( __METHOD__, '1.42' );
if ( self::$instance === null ) {
return MediaWikiServices::getInstance()->getService( 'GadgetsRepo' );
}
@ -253,6 +254,7 @@ abstract class GadgetRepo {
* @param GadgetRepo|null $repo
*/
public static function setSingleton( $repo = null ) {
wfDeprecated( __METHOD__, '1.42' );
self::$instance = $repo;
}
}