From 4022150d1d0a9910fac4ea7d2032b5e7077f7787 Mon Sep 17 00:00:00 2001 From: Lucas Werkmeister Date: Wed, 13 Jul 2022 18:34:06 +0200 Subject: [PATCH] Use FallbackLabelDescriptionLookupFactory in MathWikibaseConfig Lookups returned by this factory will resolve redirects; the old factory is deprecated and will soon be removed. Bug: T312223 Change-Id: I3d03e2e7ad646c1048f914915b84836f958b7f6e --- src/MathWikibaseConfig.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/MathWikibaseConfig.php b/src/MathWikibaseConfig.php index 792ffce10..0e7ad9999 100644 --- a/src/MathWikibaseConfig.php +++ b/src/MathWikibaseConfig.php @@ -10,7 +10,7 @@ use Wikibase\Client\WikibaseClient; use Wikibase\DataModel\Entity\EntityIdParser; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\Store\EntityRevisionLookup; -use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookupFactory; +use Wikibase\Lib\Store\FallbackLabelDescriptionLookupFactory; /** * A config class for the MathWikibaseConnector to connect with Wikibase @@ -28,7 +28,7 @@ class MathWikibaseConfig { private $entityRevisionLookup; /** - * @var LanguageFallbackLabelDescriptionLookupFactory + * @var FallbackLabelDescriptionLookupFactory */ private $labelLookupFactory; @@ -60,13 +60,13 @@ class MathWikibaseConfig { /** * @param EntityIdParser $entityIdParser * @param EntityRevisionLookup $entityRevisionLookup - * @param LanguageFallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory + * @param FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory * @param Site $site */ public function __construct( EntityIdParser $entityIdParser, EntityRevisionLookup $entityRevisionLookup, - LanguageFallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, + FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, Site $site ) { $this->idParser = $entityIdParser; @@ -101,9 +101,9 @@ class MathWikibaseConfig { } /** - * @return LanguageFallbackLabelDescriptionLookupFactory + * @return FallbackLabelDescriptionLookupFactory */ - public function getLabelLookupFactory(): LanguageFallbackLabelDescriptionLookupFactory { + public function getLabelLookupFactory(): FallbackLabelDescriptionLookupFactory { return $this->labelLookupFactory; } @@ -160,7 +160,7 @@ class MathWikibaseConfig { self::$defaultConfig = new MathWikibaseConfig( WikibaseClient::getEntityIdParser(), WikibaseClient::getStore()->getEntityRevisionLookup(), - WikibaseClient::getLanguageFallbackLabelDescriptionLookupFactory(), + WikibaseClient::getFallbackLabelDescriptionLookupFactory(), $site ); }