WMDE-leszek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/353327 )
Change subject: [WIP]Move PropertyInfoLookup and Store, and their implementation to Data Access component ...................................................................... [WIP]Move PropertyInfoLookup and Store, and their implementation to Data Access component TODO: fix what broke in the move Bug: TODO add Change-Id: I409267d2d6f014be17a1972ecc88f7bf27661026 --- M client/includes/Store/ClientStore.php M client/includes/Store/Sql/DirectSqlStore.php M client/tests/phpunit/MockClientStore.php M client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php M client/tests/phpunit/includes/Store/Sql/DirectSqlStoreTest.php M data-access/src/DispatchingDataAccessServices.php M data-access/src/DispatchingServiceContainer.php M data-access/src/MultipleRepositoryAwareWikibaseServices.php M data-access/src/RepositoryServiceWiring.php R data-access/src/Store/CacheAwarePropertyInfoStore.php R data-access/src/Store/CachingPropertyInfoLookup.php R data-access/src/Store/PropertyInfoLookup.php R data-access/src/Store/PropertyInfoStore.php R data-access/src/Store/Sql/PropertyInfoTable.php M data-access/src/WikibaseServices.php M data-access/tests/phpunit/DispatchingServiceWiringTest.php M data-access/tests/phpunit/MultipleRepositoryAwareWikibaseServicesTest.php M data-access/tests/phpunit/RepositoryServiceWiringTest.php R data-access/tests/phpunit/Store/CachingPropertyInfoLookupTest.php R data-access/tests/phpunit/Store/Sql/PropertyInfoTableTest.php R data-access/tests/phpunit/TestDoubles/MockPropertyInfoLookup.php M lib/includes/Formatters/WikibaseSnakFormatterBuilders.php M lib/includes/PropertyInfoDataTypeLookup.php M lib/includes/Store/DispatchingPropertyInfoLookup.php M lib/includes/Store/FieldPropertyInfoProvider.php M lib/tests/phpunit/Formatters/WikibaseSnakFormatterBuildersTest.php M lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php M lib/tests/phpunit/PropertyInfoSnakUrlExpanderTest.php M lib/tests/phpunit/Store/CacheAwarePropertyInfoStoreTest.php M lib/tests/phpunit/Store/DispatchingPropertyInfoLookupTest.php M lib/tests/phpunit/Store/FieldPropertyInfoProviderTest.php M lib/tests/phpunit/Store/MockPropertyInfoLookupTest.php M repo/includes/Content/PropertyHandler.php M repo/includes/PropertyInfoBuilder.php M repo/includes/Specials/SpecialListProperties.php M repo/includes/Store/Sql/DatabaseSchemaUpdater.php M repo/includes/Store/Sql/PropertyInfoTableBuilder.php M repo/includes/Store/Sql/SqlStore.php M repo/includes/Store/Store.php M repo/maintenance/rebuildPropertyInfo.php M repo/tests/phpunit/includes/Specials/SpecialListPropertiesTest.php M repo/tests/phpunit/includes/Store/Sql/PropertyInfoTableBuilderTest.php M repo/tests/phpunit/includes/Store/Sql/SqlStoreTest.php 43 files changed, 95 insertions(+), 88 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/27/353327/1 diff --git a/client/includes/Store/ClientStore.php b/client/includes/Store/ClientStore.php index 5a861ff..1351a6c 100644 --- a/client/includes/Store/ClientStore.php +++ b/client/includes/Store/ClientStore.php @@ -12,7 +12,7 @@ use Wikibase\DataModel\Services\Term\PropertyLabelResolver; use Wikibase\Lib\Store\EntityChangeLookup; use Wikibase\Lib\Store\EntityRevisionLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\Lib\Store\SiteLinkLookup; use Wikibase\Store\EntityIdLookup; diff --git a/client/includes/Store/Sql/DirectSqlStore.php b/client/includes/Store/Sql/DirectSqlStore.php index 7ccf31f..63355f6 100644 --- a/client/includes/Store/Sql/DirectSqlStore.php +++ b/client/includes/Store/Sql/DirectSqlStore.php @@ -6,8 +6,8 @@ use ObjectCache; use Wikibase\Client\RecentChanges\RecentChangesDuplicateDetector; use Wikibase\Client\Store\Sql\PagePropsEntityIdLookup; -use Wikibase\Lib\Store\CachingPropertyInfoLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\CachingPropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikimedia\Rdbms\SessionConsistentConnectionManager; use Wikibase\Client\Store\UsageUpdater; use Wikibase\Client\Usage\Sql\SqlSubscriptionManager; @@ -438,7 +438,7 @@ /** * @see ClientStore::getPropertyInfoLookup * - * @return PropertyInfoLookup + * @return \Wikibase\DataAccess\Store\PropertyInfoLookup */ public function getPropertyInfoLookup() { if ( $this->propertyInfoLookup === null ) { diff --git a/client/tests/phpunit/MockClientStore.php b/client/tests/phpunit/MockClientStore.php index 5c459be..88e1f29 100644 --- a/client/tests/phpunit/MockClientStore.php +++ b/client/tests/phpunit/MockClientStore.php @@ -9,10 +9,10 @@ use Wikibase\ClientStore; use Wikibase\DataModel\Services\Entity\NullEntityPrefetcher; use Wikibase\DataModel\Services\Lookup\EntityLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\Lib\Tests\MockPropertyLabelResolver; use Wikibase\Lib\Tests\MockRepository; -use Wikibase\Lib\Tests\Store\MockPropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; use Wikibase\Lib\Tests\Store\MockTermIndex; use Wikibase\Store\EntityIdLookup; use Wikibase\TermIndex; @@ -43,7 +43,7 @@ private static $mockRepository = null; /** - * @var PropertyInfoLookup|null + * @var \Wikibase\DataAccess\Store\PropertyInfoLookup|null */ private static $propertyInfoLookup = null; @@ -192,7 +192,7 @@ } /** - * @param PropertyInfoLookup $propertyInfoLookup + * @param \Wikibase\DataAccess\Store\PropertyInfoLookup $propertyInfoLookup */ public function setPropertyInfoLookup( PropertyInfoLookup $propertyInfoLookup ) { self::$propertyInfoLookup = $propertyInfoLookup; diff --git a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php index dd79669..710006d 100644 --- a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php +++ b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php @@ -23,8 +23,8 @@ use Wikibase\DataModel\Snak\PropertySomeValueSnak; use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; -use Wikibase\Lib\Tests\Store\MockPropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; use Wikibase\Test\MockClientStore; /** diff --git a/client/tests/phpunit/includes/Store/Sql/DirectSqlStoreTest.php b/client/tests/phpunit/includes/Store/Sql/DirectSqlStoreTest.php index 3b2545e..40a003a 100644 --- a/client/tests/phpunit/includes/Store/Sql/DirectSqlStoreTest.php +++ b/client/tests/phpunit/includes/Store/Sql/DirectSqlStoreTest.php @@ -23,9 +23,9 @@ use Wikibase\Lib\Store\EntityNamespaceLookup; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\EntityStoreWatcher; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\Lib\Store\SiteLinkLookup; -use Wikibase\Lib\Tests\Store\MockPropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; use Wikibase\Store\EntityIdLookup; use Wikibase\TermIndex; diff --git a/data-access/src/DispatchingDataAccessServices.php b/data-access/src/DispatchingDataAccessServices.php index 82d85bc..c51e004 100644 --- a/data-access/src/DispatchingDataAccessServices.php +++ b/data-access/src/DispatchingDataAccessServices.php @@ -7,7 +7,7 @@ use Wikibase\Lib\Interactors\TermSearchInteractorFactory; use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityRevisionLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * An interface of a container/factory of services providing access to data of entities from diff --git a/data-access/src/DispatchingServiceContainer.php b/data-access/src/DispatchingServiceContainer.php index ad7a8f4..b33fce4 100644 --- a/data-access/src/DispatchingServiceContainer.php +++ b/data-access/src/DispatchingServiceContainer.php @@ -14,7 +14,7 @@ use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\EntityStoreWatcher; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * A factory/locator of services dispatching the action to services configured for the @@ -162,7 +162,7 @@ } /** - * @return PropertyInfoLookup + * @return \Wikibase\DataAccess\Store\PropertyInfoLookup */ public function getPropertyInfoLookup() { return $this->getService( 'PropertyInfoLookup' ); diff --git a/data-access/src/MultipleRepositoryAwareWikibaseServices.php b/data-access/src/MultipleRepositoryAwareWikibaseServices.php index 21b711e..a586952 100644 --- a/data-access/src/MultipleRepositoryAwareWikibaseServices.php +++ b/data-access/src/MultipleRepositoryAwareWikibaseServices.php @@ -4,6 +4,7 @@ namespace Wikibase\DataAccess; use MediaWiki\Services\ServiceContainer; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityRedirect; use Wikibase\DataModel\Services\Entity\EntityPrefetcher; @@ -13,7 +14,6 @@ use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\EntityStoreWatcher; -use Wikibase\Lib\Store\PropertyInfoLookup; /** * Top-level container/factory of data access services making use of the "dispatching" pattern of diff --git a/data-access/src/RepositoryServiceWiring.php b/data-access/src/RepositoryServiceWiring.php index 5083db6..cb2c273 100644 --- a/data-access/src/RepositoryServiceWiring.php +++ b/data-access/src/RepositoryServiceWiring.php @@ -3,12 +3,12 @@ use Wikibase\Client\Serializer\ForbiddenSerializer; use Wikibase\Client\WikibaseClient; use Wikibase\DataAccess\RepositoryServiceContainer; +use Wikibase\DataAccess\Store\Sql\PropertyInfoTable; use Wikibase\DataModel\Services\Entity\EntityPrefetcher; use Wikibase\Lib\Interactors\TermIndexSearchInteractorFactory; use Wikibase\Lib\Store\EntityContentDataCodec; use Wikibase\Lib\Store\PrefetchingTermLookup; use Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor; -use Wikibase\Lib\Store\Sql\PropertyInfoTable; use Wikibase\Lib\Store\Sql\SqlEntityInfoBuilderFactory; use Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor; use Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataLookup; diff --git a/lib/includes/Store/CacheAwarePropertyInfoStore.php b/data-access/src/Store/CacheAwarePropertyInfoStore.php similarity index 98% rename from lib/includes/Store/CacheAwarePropertyInfoStore.php rename to data-access/src/Store/CacheAwarePropertyInfoStore.php index fbb946b..0902cac 100644 --- a/lib/includes/Store/CacheAwarePropertyInfoStore.php +++ b/data-access/src/Store/CacheAwarePropertyInfoStore.php @@ -1,6 +1,6 @@ <?php -namespace Wikibase\Lib\Store; +namespace Wikibase\DataAccess\Store; use BagOStuff; use InvalidArgumentException; diff --git a/lib/includes/Store/CachingPropertyInfoLookup.php b/data-access/src/Store/CachingPropertyInfoLookup.php similarity index 97% rename from lib/includes/Store/CachingPropertyInfoLookup.php rename to data-access/src/Store/CachingPropertyInfoLookup.php index b078dd5..f15e440 100644 --- a/lib/includes/Store/CachingPropertyInfoLookup.php +++ b/data-access/src/Store/CachingPropertyInfoLookup.php @@ -1,8 +1,9 @@ <?php -namespace Wikibase\Lib\Store; +namespace Wikibase\DataAccess\Store; use BagOStuff; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Entity\PropertyId; /** diff --git a/lib/includes/Store/PropertyInfoLookup.php b/data-access/src/Store/PropertyInfoLookup.php similarity index 95% rename from lib/includes/Store/PropertyInfoLookup.php rename to data-access/src/Store/PropertyInfoLookup.php index a345d5a..fb6322f 100644 --- a/lib/includes/Store/PropertyInfoLookup.php +++ b/data-access/src/Store/PropertyInfoLookup.php @@ -1,9 +1,10 @@ <?php -namespace Wikibase\Lib\Store; +namespace Wikibase\DataAccess\Store; use DBError; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\Lib\Store\StorageException; /** * @license GPL-2.0+ diff --git a/lib/includes/Store/PropertyInfoStore.php b/data-access/src/Store/PropertyInfoStore.php similarity index 90% rename from lib/includes/Store/PropertyInfoStore.php rename to data-access/src/Store/PropertyInfoStore.php index e9ba418..418d09f 100644 --- a/lib/includes/Store/PropertyInfoStore.php +++ b/data-access/src/Store/PropertyInfoStore.php @@ -1,9 +1,10 @@ <?php -namespace Wikibase\Lib\Store; +namespace Wikibase\DataAccess\Store; use DBError; use Wikibase\DataModel\Entity\PropertyId; +use Wikibase\Lib\Store\StorageException; /** * @license GPL-2.0+ diff --git a/lib/includes/Store/Sql/PropertyInfoTable.php b/data-access/src/Store/Sql/PropertyInfoTable.php similarity index 97% rename from lib/includes/Store/Sql/PropertyInfoTable.php rename to data-access/src/Store/Sql/PropertyInfoTable.php index 0ec5f2d..693d1e4 100644 --- a/lib/includes/Store/Sql/PropertyInfoTable.php +++ b/data-access/src/Store/Sql/PropertyInfoTable.php @@ -1,16 +1,16 @@ <?php -namespace Wikibase\Lib\Store\Sql; +namespace Wikibase\DataAccess\Store\Sql; use DBAccessBase; use DBError; use InvalidArgumentException; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoStore; use Wikibase\DataModel\Assert\RepositoryNameAssert; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\EntityIdComposer; -use Wikibase\Lib\Store\PropertyInfoLookup; -use Wikibase\Lib\Store\PropertyInfoStore; use Wikimedia\Assert\Assert; use Wikimedia\Rdbms\ResultWrapper; diff --git a/data-access/src/WikibaseServices.php b/data-access/src/WikibaseServices.php index cc6cb8d..dff54b1 100644 --- a/data-access/src/WikibaseServices.php +++ b/data-access/src/WikibaseServices.php @@ -2,12 +2,12 @@ namespace Wikibase\DataAccess; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Services\Entity\EntityPrefetcher; use Wikibase\DataModel\Services\Term\TermBuffer; use Wikibase\Lib\Interactors\TermSearchInteractorFactory; use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityRevisionLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; /** * Interface of the top-level container/factory of data access services. diff --git a/data-access/tests/phpunit/DispatchingServiceWiringTest.php b/data-access/tests/phpunit/DispatchingServiceWiringTest.php index 78c9789..662c4f6 100644 --- a/data-access/tests/phpunit/DispatchingServiceWiringTest.php +++ b/data-access/tests/phpunit/DispatchingServiceWiringTest.php @@ -5,6 +5,7 @@ use Wikibase\Client\WikibaseClient; use Wikibase\DataAccess\DispatchingServiceContainer; use Wikibase\DataAccess\RepositoryServiceContainerFactory; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Entity\BasicEntityIdParser; use Wikibase\DataModel\Services\Entity\EntityPrefetcher; use Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParserFactory; @@ -14,7 +15,6 @@ use Wikibase\Lib\Interactors\TermSearchInteractorFactory; use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityRevisionLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; /** * @group Wikibase diff --git a/data-access/tests/phpunit/MultipleRepositoryAwareWikibaseServicesTest.php b/data-access/tests/phpunit/MultipleRepositoryAwareWikibaseServicesTest.php index eb302d5..2cbd30c 100644 --- a/data-access/tests/phpunit/MultipleRepositoryAwareWikibaseServicesTest.php +++ b/data-access/tests/phpunit/MultipleRepositoryAwareWikibaseServicesTest.php @@ -4,13 +4,13 @@ use Wikibase\DataAccess\DispatchingDataAccessServices; use Wikibase\DataAccess\MultipleRepositoryAwareWikibaseServices; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Services\Entity\EntityPrefetcher; use Wikibase\DataModel\Services\Term\TermBuffer; use Wikibase\Lib\Interactors\TermSearchInteractorFactory; use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\EntityStoreWatcher; -use Wikibase\Lib\Store\PropertyInfoLookup; /** * @covers Wikibase\DataAccess\MultipleRepositoryAwareWikibaseServices diff --git a/data-access/tests/phpunit/RepositoryServiceWiringTest.php b/data-access/tests/phpunit/RepositoryServiceWiringTest.php index e0b60bb..16baa95 100644 --- a/data-access/tests/phpunit/RepositoryServiceWiringTest.php +++ b/data-access/tests/phpunit/RepositoryServiceWiringTest.php @@ -6,6 +6,7 @@ use LogicException; use Wikibase\Client\WikibaseClient; use Wikibase\DataAccess\RepositoryServiceContainer; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Entity\EntityIdParser; use Wikibase\DataModel\Services\Entity\EntityPrefetcher; use Wikibase\DataModel\Services\EntityId\PrefixMappingEntityIdParser; @@ -13,7 +14,6 @@ use Wikibase\Lib\Store\EntityInfoBuilderFactory; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Lib\Store\PrefetchingTermLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; use Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor; use Wikibase\TermIndex; diff --git a/lib/tests/phpunit/Store/CachingPropertyInfoLookupTest.php b/data-access/tests/phpunit/Store/CachingPropertyInfoLookupTest.php similarity index 88% rename from lib/tests/phpunit/Store/CachingPropertyInfoLookupTest.php rename to data-access/tests/phpunit/Store/CachingPropertyInfoLookupTest.php index 7bb3326..5475109 100644 --- a/lib/tests/phpunit/Store/CachingPropertyInfoLookupTest.php +++ b/data-access/tests/phpunit/Store/CachingPropertyInfoLookupTest.php @@ -1,11 +1,12 @@ <?php -namespace Wikibase\Lib\Tests\Store; +namespace Wikibase\DataAccess\Tests\Store; use HashBagOStuff; +use Wikibase\DataAccess\Store\CachingPropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\Lib\Store\CachingPropertyInfoLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; /** * @covers Wikibase\CachingPropertyInfoLookup @@ -35,7 +36,7 @@ $lookup = $this->newCachingPropertyInfoLookup( [ 'P23' => [ PropertyInfoLookup::KEY_DATA_TYPE => 'string' ] ] ); $this->assertSame( - [ PropertyInfoLookup::KEY_DATA_TYPE => 'string' ], + [ \Wikibase\DataAccess\Store\PropertyInfoLookup::KEY_DATA_TYPE => 'string' ], $lookup->getPropertyInfo( new PropertyId( 'P23' ) ) ); } diff --git a/lib/tests/phpunit/Store/Sql/PropertyInfoTableTest.php b/data-access/tests/phpunit/Store/Sql/PropertyInfoTableTest.php similarity index 94% rename from lib/tests/phpunit/Store/Sql/PropertyInfoTableTest.php rename to data-access/tests/phpunit/Store/Sql/PropertyInfoTableTest.php index 561a54e..c91426e 100644 --- a/lib/tests/phpunit/Store/Sql/PropertyInfoTableTest.php +++ b/data-access/tests/phpunit/Store/Sql/PropertyInfoTableTest.php @@ -1,14 +1,14 @@ <?php -namespace Wikibase\Lib\Tests\Store\Sql; +namespace Wikibase\DataAccess\Tests\Store\Sql; use MediaWikiTestCase; use InvalidArgumentException; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\Sql\PropertyInfoTable; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\EntityIdComposer; -use Wikibase\Lib\Store\PropertyInfoLookup; -use Wikibase\Lib\Store\Sql\PropertyInfoTable; /** * @covers Wikibase\PropertyInfoTable @@ -34,7 +34,7 @@ } private function newPropertyInfoTable( $repository = '' ) { - return new PropertyInfoTable( $this->getEntityComposer(), false, $repository ); + return new \Wikibase\DataAccess\Store\Sql\PropertyInfoTable( $this->getEntityComposer(), false, $repository ); } public function testGivenNoDataTypeInInfo_setPropertyInfoThrowsException() { @@ -194,7 +194,7 @@ public function testGivenPropertyIdFromWrongRepository_setPropertyInfoThrowsException( $repositoryName, PropertyId $id ) { $this->setExpectedException( InvalidArgumentException::class ); - $infoTable = new PropertyInfoTable( $this->getEntityComposer(), false, $repositoryName ); + $infoTable = new \Wikibase\DataAccess\Store\Sql\PropertyInfoTable( $this->getEntityComposer(), false, $repositoryName ); $infoTable->setPropertyInfo( $id, [ PropertyInfoLookup::KEY_DATA_TYPE => 'string' ] ); } @@ -204,7 +204,7 @@ public function testGivenPropertyIdFromWrongRepository_getPropertyInfoThrowsException( $repositoryName, PropertyId $id ) { $this->setExpectedException( InvalidArgumentException::class ); - $infoTable = new PropertyInfoTable( $this->getEntityComposer(), false, $repositoryName ); + $infoTable = new \Wikibase\DataAccess\Store\Sql\PropertyInfoTable( $this->getEntityComposer(), false, $repositoryName ); $infoTable->getPropertyInfo( $id ); } diff --git a/lib/tests/phpunit/Store/MockPropertyInfoLookup.php b/data-access/tests/phpunit/TestDoubles/MockPropertyInfoLookup.php similarity index 94% rename from lib/tests/phpunit/Store/MockPropertyInfoLookup.php rename to data-access/tests/phpunit/TestDoubles/MockPropertyInfoLookup.php index 519a154..52946fb 100644 --- a/lib/tests/phpunit/Store/MockPropertyInfoLookup.php +++ b/data-access/tests/phpunit/TestDoubles/MockPropertyInfoLookup.php @@ -1,10 +1,10 @@ <?php -namespace Wikibase\Lib\Tests\Store; +namespace Wikibase\DataAccess\Tests\TestDoubles; use InvalidArgumentException; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * Class MockPropertyInfoLockup is an implementation of PropertyInfoLookup based on a local array. diff --git a/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php b/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php index cdbeb37..05437ef 100644 --- a/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php +++ b/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php @@ -8,7 +8,7 @@ use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup; use Wikibase\Lib\Formatters\HtmlExternalIdentifierFormatter; use Wikibase\Lib\Formatters\WikitextExternalIdentifierFormatter; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * Low level factory for SnakFormatters for well known data types. @@ -44,7 +44,7 @@ /** * @param WikibaseValueFormatterBuilders $valueFormatterBuilders - * @param PropertyInfoLookup $propertyInfoLookup + * @param \Wikibase\DataAccess\Store\PropertyInfoLookup $propertyInfoLookup * @param PropertyDataTypeLookup $dataTypeLookup * @param DataTypeFactory $dataTypeFactory */ diff --git a/lib/includes/PropertyInfoDataTypeLookup.php b/lib/includes/PropertyInfoDataTypeLookup.php index d3dddd8..f10f29e 100644 --- a/lib/includes/PropertyInfoDataTypeLookup.php +++ b/lib/includes/PropertyInfoDataTypeLookup.php @@ -5,7 +5,7 @@ use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup; use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookupException; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * PropertyDataTypeLookup that uses an PropertyInfoLookup to find @@ -22,12 +22,12 @@ private $fallbackLookup; /** - * @var PropertyInfoLookup + * @var \Wikibase\DataAccess\Store\PropertyInfoLookup */ private $infoLookup; /** - * @param PropertyInfoLookup $infoLookup + * @param \Wikibase\DataAccess\Store\PropertyInfoLookup $infoLookup * @param PropertyDataTypeLookup|null $fallbackLookup */ public function __construct( PropertyInfoLookup $infoLookup, PropertyDataTypeLookup $fallbackLookup = null ) { diff --git a/lib/includes/Store/DispatchingPropertyInfoLookup.php b/lib/includes/Store/DispatchingPropertyInfoLookup.php index d3778a9..4c503f4 100644 --- a/lib/includes/Store/DispatchingPropertyInfoLookup.php +++ b/lib/includes/Store/DispatchingPropertyInfoLookup.php @@ -3,6 +3,7 @@ namespace Wikibase\Lib\Store; use DBError; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Assert\RepositoryNameAssert; use Wikibase\DataModel\Entity\PropertyId; use Wikimedia\Assert\Assert; diff --git a/lib/includes/Store/FieldPropertyInfoProvider.php b/lib/includes/Store/FieldPropertyInfoProvider.php index 11ac004..d0acc27 100644 --- a/lib/includes/Store/FieldPropertyInfoProvider.php +++ b/lib/includes/Store/FieldPropertyInfoProvider.php @@ -3,7 +3,7 @@ namespace Wikibase\Lib; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\Lib\Store\StorageException; use Wikimedia\Assert\Assert; @@ -27,7 +27,7 @@ private $propertyInfoKey; /** - * @param PropertyInfoLookup $infoLookup + * @param \Wikibase\DataAccess\Store\PropertyInfoLookup $infoLookup * @param string $propertyInfoKey Name of the desired field in the PropertyInfo array. * Use one of the PropertyInfoStore::KEY_XXX constants. */ diff --git a/lib/tests/phpunit/Formatters/WikibaseSnakFormatterBuildersTest.php b/lib/tests/phpunit/Formatters/WikibaseSnakFormatterBuildersTest.php index a5330e7..e8eaf56 100644 --- a/lib/tests/phpunit/Formatters/WikibaseSnakFormatterBuildersTest.php +++ b/lib/tests/phpunit/Formatters/WikibaseSnakFormatterBuildersTest.php @@ -12,10 +12,10 @@ use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\DataModel\Snak\Snak; use Wikibase\Lib\SnakFormatter; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\Lib\WikibaseSnakFormatterBuilders; use Wikibase\Lib\WikibaseValueFormatterBuilders; -use Wikibase\Lib\Tests\Store\MockPropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; /** * @covers Wikibase\Lib\WikibaseSnakFormatterBuilders diff --git a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php index 05db735..5ee7312 100644 --- a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php +++ b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php @@ -8,8 +8,8 @@ use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup; use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookupException; use Wikibase\Lib\PropertyInfoDataTypeLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; -use Wikibase\Lib\Tests\Store\MockPropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; /** * @covers Wikibase\Lib\PropertyInfoDataTypeLookup diff --git a/lib/tests/phpunit/PropertyInfoSnakUrlExpanderTest.php b/lib/tests/phpunit/PropertyInfoSnakUrlExpanderTest.php index 52e72f5..3bf3bb2 100644 --- a/lib/tests/phpunit/PropertyInfoSnakUrlExpanderTest.php +++ b/lib/tests/phpunit/PropertyInfoSnakUrlExpanderTest.php @@ -9,8 +9,8 @@ use Wikibase\Lib\FieldPropertyInfoProvider; use Wikibase\Lib\PropertyInfoProvider; use Wikibase\Lib\PropertyInfoSnakUrlExpander; -use Wikibase\Lib\Store\PropertyInfoLookup; -use Wikibase\Lib\Tests\Store\MockPropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; use Wikimedia\Assert\ParameterTypeException; /** diff --git a/lib/tests/phpunit/Store/CacheAwarePropertyInfoStoreTest.php b/lib/tests/phpunit/Store/CacheAwarePropertyInfoStoreTest.php index 41e01c3..8409d15 100644 --- a/lib/tests/phpunit/Store/CacheAwarePropertyInfoStoreTest.php +++ b/lib/tests/phpunit/Store/CacheAwarePropertyInfoStoreTest.php @@ -5,9 +5,9 @@ use BagOStuff; use InvalidArgumentException; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\Lib\Store\CacheAwarePropertyInfoStore; -use Wikibase\Lib\Store\PropertyInfoLookup; -use Wikibase\Lib\Store\PropertyInfoStore; +use Wikibase\DataAccess\Store\CacheAwarePropertyInfoStore; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoStore; /** * @covers Wikibase\Lib\Store\CacheAwarePropertyInfoStore; @@ -21,7 +21,7 @@ class CacheAwarePropertyInfoStoreTest extends \PHPUnit_Framework_TestCase { private function newCacheAwarePropertyInfoStore( BagOStuff $cache ) { - $mockStore = $this->getMock( PropertyInfoStore::class ); + $mockStore = $this->getMock( \Wikibase\DataAccess\Store\PropertyInfoStore::class ); $mockStore->expects( $this->any() )->method( 'setPropertyInfo' ); $mockStore->expects( $this->any() ) ->method( 'removePropertyInfo' ) @@ -34,7 +34,7 @@ } ) ); - /** @var PropertyInfoStore $mockStore */ + /** @var \Wikibase\DataAccess\Store\PropertyInfoStore $mockStore */ return new CacheAwarePropertyInfoStore( $mockStore, $cache, 3600, __CLASS__ ); } diff --git a/lib/tests/phpunit/Store/DispatchingPropertyInfoLookupTest.php b/lib/tests/phpunit/Store/DispatchingPropertyInfoLookupTest.php index a5ff3c8..cf0c6ee 100644 --- a/lib/tests/phpunit/Store/DispatchingPropertyInfoLookupTest.php +++ b/lib/tests/phpunit/Store/DispatchingPropertyInfoLookupTest.php @@ -3,9 +3,10 @@ namespace Wikibase\Lib\Tests\Store; use InvalidArgumentException; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\Store\DispatchingPropertyInfoLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * @covers Wikibase\Lib\Store\DispatchingPropertyInfoLookup @@ -22,11 +23,11 @@ public function setUp() { $this->localPropertyInfo = [ - 'P23' => [ PropertyInfoLookup::KEY_DATA_TYPE => 'string' ], + 'P23' => [ \Wikibase\DataAccess\Store\PropertyInfoLookup::KEY_DATA_TYPE => 'string' ], 'P42' => [ PropertyInfoLookup::KEY_DATA_TYPE => 'commonsMedia', 'foo' => 'bar' ] ]; $this->fooPropertyInfo = [ - 'foo:P123' => [ PropertyInfoLookup::KEY_DATA_TYPE => 'string', 'foo' => 'bar' ], + 'foo:P123' => [ \Wikibase\DataAccess\Store\PropertyInfoLookup::KEY_DATA_TYPE => 'string', 'foo' => 'bar' ], 'foo:P42' => [ PropertyInfoLookup::KEY_DATA_TYPE => 'commonsMedia' ] ]; } @@ -104,13 +105,13 @@ ], 'non-string keys' => [ [ - '' => $this->getMock( PropertyInfoLookup::class ), - 100 => $this->getMock( PropertyInfoLookup::class ), + '' => $this->getMock( \Wikibase\DataAccess\Store\PropertyInfoLookup::class ), + 100 => $this->getMock( \Wikibase\DataAccess\Store\PropertyInfoLookup::class ), ], ], 'repo name containing colon' => [ [ - '' => $this->getMock( PropertyInfoLookup::class ), + '' => $this->getMock( \Wikibase\DataAccess\Store\PropertyInfoLookup::class ), 'fo:oo' => $this->getMock( PropertyInfoLookup::class ), ], ], diff --git a/lib/tests/phpunit/Store/FieldPropertyInfoProviderTest.php b/lib/tests/phpunit/Store/FieldPropertyInfoProviderTest.php index 3f57b6e..f7ab8db 100644 --- a/lib/tests/phpunit/Store/FieldPropertyInfoProviderTest.php +++ b/lib/tests/phpunit/Store/FieldPropertyInfoProviderTest.php @@ -5,7 +5,7 @@ use PHPUnit_Framework_TestCase; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\Lib\FieldPropertyInfoProvider; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * @covers Wikibase\Lib\FieldPropertyInfoProvider @@ -24,7 +24,7 @@ public function testGetPropertyInfo( $info, $key, $expected ) { $propertyId = new PropertyId( 'P1' ); - $lookup = $this->getMock( PropertyInfoLookup::class ); + $lookup = $this->getMock( \Wikibase\DataAccess\Store\PropertyInfoLookup::class ); $lookup->expects( $this->once() ) ->method( 'getPropertyInfo' ) ->with( $propertyId ) diff --git a/lib/tests/phpunit/Store/MockPropertyInfoLookupTest.php b/lib/tests/phpunit/Store/MockPropertyInfoLookupTest.php index 3aa804f..46a81b7 100644 --- a/lib/tests/phpunit/Store/MockPropertyInfoLookupTest.php +++ b/lib/tests/phpunit/Store/MockPropertyInfoLookupTest.php @@ -2,8 +2,9 @@ namespace Wikibase\Lib\Tests\Store; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; use Wikibase\DataModel\Entity\PropertyId; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; /** * @covers Wikibase\Lib\Tests\Store\MockPropertyInfoLookup diff --git a/repo/includes/Content/PropertyHandler.php b/repo/includes/Content/PropertyHandler.php index 9579199..6217f74 100644 --- a/repo/includes/Content/PropertyHandler.php +++ b/repo/includes/Content/PropertyHandler.php @@ -6,6 +6,7 @@ use IContextSource; use Page; use Title; +use Wikibase\DataAccess\Store\PropertyInfoStore; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\EntityIdParser; use Wikibase\DataModel\Entity\Property; @@ -17,7 +18,6 @@ use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookupFactory; use Wikibase\PropertyContent; use Wikibase\PropertyInfoBuilder; -use Wikibase\Lib\Store\PropertyInfoStore; use Wikibase\Repo\Search\Elastic\Fields\PropertyFieldDefinitions; use Wikibase\Repo\Store\EntityPerPage; use Wikibase\Repo\Validators\EntityConstraintProvider; diff --git a/repo/includes/PropertyInfoBuilder.php b/repo/includes/PropertyInfoBuilder.php index ddb95c1..4026efa 100644 --- a/repo/includes/PropertyInfoBuilder.php +++ b/repo/includes/PropertyInfoBuilder.php @@ -3,11 +3,11 @@ namespace Wikibase; use DataValues\StringValue; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\DataModel\Statement\StatementList; -use Wikibase\Lib\Store\PropertyInfoLookup; /** * Class to build the information about a property. diff --git a/repo/includes/Specials/SpecialListProperties.php b/repo/includes/Specials/SpecialListProperties.php index e5d5724..1304ef4 100644 --- a/repo/includes/Specials/SpecialListProperties.php +++ b/repo/includes/Specials/SpecialListProperties.php @@ -5,6 +5,7 @@ use DataTypes\DataTypeFactory; use HTMLForm; use Html; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Services\EntityId\EntityIdFormatter; use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup; @@ -12,7 +13,6 @@ use Wikibase\Lib\Store\EntityTitleLookup; use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup; use Wikibase\Lib\Store\PrefetchingTermLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; /** * Special page to list properties by data type diff --git a/repo/includes/Store/Sql/DatabaseSchemaUpdater.php b/repo/includes/Store/Sql/DatabaseSchemaUpdater.php index 041771b..57b62b9 100644 --- a/repo/includes/Store/Sql/DatabaseSchemaUpdater.php +++ b/repo/includes/Store/Sql/DatabaseSchemaUpdater.php @@ -6,10 +6,10 @@ use DatabaseUpdater; use HashBagOStuff; use MWException; +use Wikibase\DataAccess\Store\Sql\PropertyInfoTable; use Wikibase\RebuildTermsSearchKey; use Wikibase\Repo\Maintenance\RebuildEntityPerPage; use Wikibase\Store; -use Wikibase\Lib\Store\Sql\PropertyInfoTable; use Wikibase\PropertyInfoTableBuilder; use Wikibase\Lib\Reporting\ObservableMessageReporter; use Wikibase\Lib\Store\CachingEntityRevisionLookup; diff --git a/repo/includes/Store/Sql/PropertyInfoTableBuilder.php b/repo/includes/Store/Sql/PropertyInfoTableBuilder.php index 34a54b7..b1eb4cb 100644 --- a/repo/includes/Store/Sql/PropertyInfoTableBuilder.php +++ b/repo/includes/Store/Sql/PropertyInfoTableBuilder.php @@ -4,13 +4,13 @@ use MediaWiki\MediaWikiServices; use RuntimeException; +use Wikibase\DataAccess\Store\Sql\PropertyInfoTable; use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Services\Lookup\EntityLookup; use Wikibase\Lib\EntityIdComposer; use Wikibase\Lib\Reporting\MessageReporter; use Wikibase\Lib\Store\EntityNamespaceLookup; -use Wikibase\Lib\Store\Sql\PropertyInfoTable; /** * Utility class for rebuilding the wb_property_info table. diff --git a/repo/includes/Store/Sql/SqlStore.php b/repo/includes/Store/Sql/SqlStore.php index 592a940..71d0791 100644 --- a/repo/includes/Store/Sql/SqlStore.php +++ b/repo/includes/Store/Sql/SqlStore.php @@ -7,6 +7,9 @@ use ObjectCache; use Revision; use Wikibase\DataAccess\WikibaseServices; +use Wikibase\DataAccess\Store\CacheAwarePropertyInfoStore; +use Wikibase\DataAccess\Store\CachingPropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\DataModel\Entity\EntityIdParser; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\Property; @@ -17,8 +20,6 @@ use Wikibase\Lib\Changes\EntityChangeFactory; use Wikibase\Lib\EntityIdComposer; use Wikibase\Lib\Store\CachingEntityRevisionLookup; -use Wikibase\Lib\Store\CacheAwarePropertyInfoStore; -use Wikibase\Lib\Store\CachingPropertyInfoLookup; use Wikibase\Lib\Store\EntityChangeLookup; use Wikibase\Lib\Store\EntityContentDataCodec; use Wikibase\Lib\Store\EntityInfoBuilderFactory; @@ -26,11 +27,10 @@ use Wikibase\Lib\Store\EntityNamespaceLookup; use Wikibase\Lib\Store\EntityStore; use Wikibase\Lib\Store\EntityStoreWatcher; -use Wikibase\Lib\Store\PropertyInfoStore; -use Wikibase\Lib\Store\Sql\PropertyInfoTable; +use Wikibase\DataAccess\Store\PropertyInfoStore; +use Wikibase\DataAccess\Store\Sql\PropertyInfoTable; use Wikibase\Repo\Store\EntityTitleStoreLookup; use Wikibase\Lib\Store\LabelConflictFinder; -use Wikibase\Lib\Store\PropertyInfoLookup; use Wikibase\Lib\Store\RevisionBasedEntityLookup; use Wikibase\Lib\Store\SiteLinkStore; use Wikibase\Lib\Store\SiteLinkTable; diff --git a/repo/includes/Store/Store.php b/repo/includes/Store/Store.php index 67c7618..ddd02ea 100644 --- a/repo/includes/Store/Store.php +++ b/repo/includes/Store/Store.php @@ -2,6 +2,8 @@ namespace Wikibase; +use Wikibase\DataAccess\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoStore; use Wikibase\DataModel\Services\Entity\EntityPrefetcher; use Wikibase\DataModel\Services\Lookup\EntityLookup; use Wikibase\DataModel\Services\Lookup\EntityRedirectLookup; @@ -11,8 +13,6 @@ use Wikibase\Lib\Store\EntityStore; use Wikibase\Lib\Store\EntityStoreWatcher; use Wikibase\Lib\Store\LabelConflictFinder; -use Wikibase\Lib\Store\PropertyInfoLookup; -use Wikibase\Lib\Store\PropertyInfoStore; use Wikibase\Lib\Store\SiteLinkStore; use Wikibase\Repo\Store\ChangeStore; use Wikibase\Repo\Store\EntityPerPage; diff --git a/repo/maintenance/rebuildPropertyInfo.php b/repo/maintenance/rebuildPropertyInfo.php index 72cbb13..a6b7781 100644 --- a/repo/maintenance/rebuildPropertyInfo.php +++ b/repo/maintenance/rebuildPropertyInfo.php @@ -4,7 +4,7 @@ use LoggedUpdateMaintenance; use Wikibase\Lib\Reporting\ObservableMessageReporter; -use Wikibase\Lib\Store\Sql\PropertyInfoTable; +use Wikibase\DataAccess\Store\Sql\PropertyInfoTable; use Wikibase\Repo\WikibaseRepo; $basePath = getenv( 'MW_INSTALL_PATH' ) !== false ? getenv( 'MW_INSTALL_PATH' ) : __DIR__ . '/../../../..'; diff --git a/repo/tests/phpunit/includes/Specials/SpecialListPropertiesTest.php b/repo/tests/phpunit/includes/Specials/SpecialListPropertiesTest.php index f8363ec..b78561e 100644 --- a/repo/tests/phpunit/includes/Specials/SpecialListPropertiesTest.php +++ b/repo/tests/phpunit/includes/Specials/SpecialListPropertiesTest.php @@ -12,11 +12,11 @@ use Wikibase\Lib\LanguageNameLookup; use Wikibase\Lib\Store\EntityTitleLookup; use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\Repo\EntityIdHtmlLinkFormatterFactory; use Wikibase\Repo\Specials\SpecialListProperties; use Wikibase\Store\BufferingTermLookup; -use Wikibase\Lib\Tests\Store\MockPropertyInfoLookup; +use Wikibase\DataAccess\Tests\TestDoubles\MockPropertyInfoLookup; /** * @covers Wikibase\Repo\Specials\SpecialListProperties diff --git a/repo/tests/phpunit/includes/Store/Sql/PropertyInfoTableBuilderTest.php b/repo/tests/phpunit/includes/Store/Sql/PropertyInfoTableBuilderTest.php index 692b0c6..3c8977a 100644 --- a/repo/tests/phpunit/includes/Store/Sql/PropertyInfoTableBuilderTest.php +++ b/repo/tests/phpunit/includes/Store/Sql/PropertyInfoTableBuilderTest.php @@ -6,9 +6,9 @@ use Wikibase\DataModel\Entity\Property; use Wikibase\DataModel\Entity\PropertyId; use Wikibase\DataModel\Snak\PropertyValueSnak; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\PropertyInfoBuilder; -use Wikibase\Lib\Store\Sql\PropertyInfoTable; +use Wikibase\DataAccess\Store\Sql\PropertyInfoTable; use Wikibase\PropertyInfoTableBuilder; use Wikibase\Repo\WikibaseRepo; @@ -61,14 +61,14 @@ return $properties; } - private function resetPropertyInfoTable( PropertyInfoTable $table ) { + private function resetPropertyInfoTable(\Wikibase\DataAccess\Store\Sql\PropertyInfoTable $table ) { $dbw = $table->getWriteConnection(); $dbw->delete( 'wb_property_info', '*' ); } public function testRebuildPropertyInfo() { $wikibaseRepo = WikibaseRepo::getDefaultInstance(); - $table = new PropertyInfoTable( $wikibaseRepo->getEntityIdComposer() ); + $table = new \Wikibase\DataAccess\Store\Sql\PropertyInfoTable( $wikibaseRepo->getEntityIdComposer() ); $this->resetPropertyInfoTable( $table ); $properties = $this->initProperties(); diff --git a/repo/tests/phpunit/includes/Store/Sql/SqlStoreTest.php b/repo/tests/phpunit/includes/Store/Sql/SqlStoreTest.php index c73e8ab..6311520 100644 --- a/repo/tests/phpunit/includes/Store/Sql/SqlStoreTest.php +++ b/repo/tests/phpunit/includes/Store/Sql/SqlStoreTest.php @@ -18,10 +18,10 @@ use Wikibase\Lib\Store\EntityStoreWatcher; use Wikibase\Repo\Store\EntityTitleStoreLookup; use Wikibase\Lib\Store\LabelConflictFinder; -use Wikibase\Lib\Store\PropertyInfoLookup; +use Wikibase\DataAccess\Store\PropertyInfoLookup; use Wikibase\Lib\Store\SiteLinkStore; use Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor; -use Wikibase\Lib\Store\PropertyInfoStore; +use Wikibase\DataAccess\Store\PropertyInfoStore; use Wikibase\Repo\Store\EntityPerPage; use Wikibase\Repo\Store\SiteLinkConflictLookup; use Wikibase\Repo\Store\Sql\SqlChangeStore; -- To view, visit https://gerrit.wikimedia.org/r/353327 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I409267d2d6f014be17a1972ecc88f7bf27661026 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: WMDE-leszek <leszek.mani...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits