Skip to content

Commit

Permalink
Merge "Remove WikibaseRepo.LanguageNameLookup service"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Sep 20, 2023
2 parents 185e205 + 5dd38ee commit b53a8f9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 56 deletions.
7 changes: 0 additions & 7 deletions repo/WikibaseRepo.ServiceWiring.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
use Wikibase\Lib\Formatters\WikibaseSnakFormatterBuilders;
use Wikibase\Lib\Formatters\WikibaseValueFormatterBuilders;
use Wikibase\Lib\LanguageFallbackChainFactory;
use Wikibase\Lib\LanguageNameLookup;
use Wikibase\Lib\LanguageNameLookupFactory;
use Wikibase\Lib\MediaWikiMessageInLanguageProvider;
use Wikibase\Lib\MessageInLanguageProvider;
Expand Down Expand Up @@ -1389,12 +1388,6 @@ function ( EntityNamespaceLookup $nsLookup, DatabaseEntitySource $source ): Enti
);
},

'WikibaseRepo.LanguageNameLookup' => function ( MediaWikiServices $services ): LanguageNameLookup {
$userLanguage = WikibaseRepo::getUserLanguage( $services );
return WikibaseRepo::getLanguageNameLookupFactory( $services )
->getForLanguage( $userLanguage );
},

'WikibaseRepo.LanguageNameLookupFactory' => function ( MediaWikiServices $services ): LanguageNameLookupFactory {
return new LanguageNameLookupFactory( $services->getLanguageNameUtils() );
},
Expand Down
9 changes: 0 additions & 9 deletions repo/includes/WikibaseRepo.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
use Wikibase\Lib\Formatters\WikibaseSnakFormatterBuilders;
use Wikibase\Lib\Formatters\WikibaseValueFormatterBuilders;
use Wikibase\Lib\LanguageFallbackChainFactory;
use Wikibase\Lib\LanguageNameLookup;
use Wikibase\Lib\LanguageNameLookupFactory;
use Wikibase\Lib\MessageInLanguageProvider;
use Wikibase\Lib\Modules\PropertyValueExpertsModule;
Expand Down Expand Up @@ -174,14 +173,6 @@ public static function getLanguageDirectionalityLookup( ContainerInterface $serv
->get( 'WikibaseRepo.LanguageDirectionalityLookup' );
}

/**
* @deprecated use {@link LanguageNameLookupFactory} or {@link LanguageNameUtils} instead
*/
public static function getLanguageNameLookup( ContainerInterface $services = null ): LanguageNameLookup {
return ( $services ?: MediaWikiServices::getInstance() )
->get( 'WikibaseRepo.LanguageNameLookup' );
}

public static function getLanguageNameLookupFactory( ContainerInterface $services = null ): LanguageNameLookupFactory {
return ( $services ?: MediaWikiServices::getInstance() )
->get( 'WikibaseRepo.LanguageNameLookupFactory' );
Expand Down
40 changes: 0 additions & 40 deletions repo/tests/phpunit/unit/ServiceWiring/LanguageNameLookupTest.php

This file was deleted.

0 comments on commit b53a8f9

Please sign in to comment.