From 10c283e431e6a8d032b261064cd75567d2fb86a9 Mon Sep 17 00:00:00 2001 From: addshore Date: Wed, 12 Aug 2015 12:03:35 +0100 Subject: [PATCH] Use EntityLookup from DataModelServices EntityLookup has been removed from WikibaseLib Thus we must now get it from DataModelServices. This extensions now requires ~1.1 of DMServices --- composer.json | 3 ++- src/PropertySuggester/GetSuggestions.php | 2 +- src/PropertySuggester/SuggestionGenerator.php | 2 +- tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index e5675e4..9c70a45 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "issues": "https://github.com/Wikidata-lib/PropertySuggester/issues" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.0", + "wikibase/data-model-services": "~1.1" }, "require-dev": { "phpunit/phpunit": "3.7.*", diff --git a/src/PropertySuggester/GetSuggestions.php b/src/PropertySuggester/GetSuggestions.php index 6c3812c..752485f 100644 --- a/src/PropertySuggester/GetSuggestions.php +++ b/src/PropertySuggester/GetSuggestions.php @@ -9,7 +9,7 @@ use PropertySuggester\Suggesters\SimpleSuggester; use PropertySuggester\Suggesters\SuggesterEngine; use Wikibase\DataModel\Entity\Property; -use Wikibase\Lib\Store\EntityLookup; +use Wikibase\DataModel\Services\Lookup\EntityLookup; use Wikibase\Lib\Store\EntityTitleLookup; use Wikibase\Repo\WikibaseRepo; use Wikibase\TermIndex; diff --git a/src/PropertySuggester/SuggestionGenerator.php b/src/PropertySuggester/SuggestionGenerator.php index 99f7cee..1ae8ca3 100644 --- a/src/PropertySuggester/SuggestionGenerator.php +++ b/src/PropertySuggester/SuggestionGenerator.php @@ -7,7 +7,7 @@ use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\Lib\Store\EntityLookup; +use Wikibase\DataModel\Services\Lookup\EntityLookup; use Wikibase\TermIndex; use Wikibase\TermIndexEntry; use InvalidArgumentException; diff --git a/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php b/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php index 45e4945..ff043d0 100644 --- a/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php +++ b/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php @@ -7,9 +7,9 @@ use PropertySuggester\Suggesters\Suggestion; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Entity\Item; +use Wikibase\DataModel\Services\Lookup\EntityLookup; use Wikibase\DataModel\Snak\PropertySomeValueSnak; use Wikibase\DataModel\Entity\ItemId; -use Wikibase\Lib\Store\EntityLookup; use Wikibase\TermIndex; use InvalidArgumentException; use Wikibase\TermIndexEntry; @@ -46,7 +46,7 @@ class SuggestionGeneratorTest extends MediaWikiTestCase { public function setUp() { parent::setUp(); - $this->lookup = $this->getMock( 'Wikibase\Lib\Store\EntityLookup' ); + $this->lookup = $this->getMock( 'Wikibase\DataModel\Services\Lookup\EntityLookup' ); $this->termIndex = $this->getMock( 'Wikibase\TermIndex' ); $this->suggester = $this->getMock( 'PropertySuggester\Suggesters\SuggesterEngine' );