[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Temporarily add class alias for EntityRevision

2017-08-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370949 )

Change subject: Temporarily add class alias for EntityRevision
..


Temporarily add class alias for EntityRevision

Apparently there are serialized instances of EntityRevision
using the old FQN in cache.

The alias could be removed after all caches are only using
new namespace.

Bug: T172616
Change-Id: I3839fff8d8bf21391e50a3f6dfd964ab5e4a4edd
---
M 
client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M data-access/src/DispatchingServiceFactory.php
M data-access/src/RepositoryServiceContainer.php
M data-access/tests/phpunit/DispatchingServiceFactoryTest.php
M data-access/tests/phpunit/RepositoryServiceContainerTest.php
M lib/WikibaseLib.php
M lib/includes/Store/Sql/PrefetchingWikiPageEntityMetaDataAccessor.php
M lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php
M lib/tests/phpunit/EntityRevisionLookupTest.php
M lib/tests/phpunit/MockRepository.php
M lib/tests/phpunit/MockRepositoryTest.php
M lib/tests/phpunit/Store/CachingEntityRevisionLookupTest.php
M lib/tests/phpunit/Store/DispatchingEntityRevisionLookupTest.php
M lib/tests/phpunit/Store/EntityRevisionTest.php
M lib/tests/phpunit/Store/PrefetchingWikiPageEntityMetaDataAccessorTest.php
M repo/Wikibase.hooks.php
M repo/includes/Api/EntityLoadingHelper.php
M repo/includes/Api/GetEntities.php
M repo/includes/Api/MergeItems.php
M repo/includes/Api/ResultBuilder.php
M repo/includes/Content/EntityContent.php
M repo/includes/EditEntity.php
M repo/includes/Hooks/OutputPageBeforeHTMLHookHandler.php
M repo/includes/LinkedData/EntityDataRequestHandler.php
M repo/includes/LinkedData/EntityDataSerializationService.php
M repo/includes/Specials/SpecialMergeItems.php
M repo/includes/Specials/SpecialModifyEntity.php
M repo/includes/Store/DispatchingEntityStoreWatcher.php
M repo/includes/Store/Sql/WikiPageEntityStore.php
M repo/tests/phpunit/includes/Actions/ActionTestCase.php
M repo/tests/phpunit/includes/Api/ApiFormatTestCase.php
M repo/tests/phpunit/includes/Api/EntityLoadingHelperTest.php
M repo/tests/phpunit/includes/Api/ResultBuilderTest.php
M repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
M repo/tests/phpunit/includes/Hooks/OutputPageBeforeHTMLHookHandlerTest.php
M repo/tests/phpunit/includes/ItemMoveTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php
M repo/tests/phpunit/includes/PropertyDataTypeChangerTest.php
M repo/tests/phpunit/includes/Store/Sql/WikiPageEntityMetaDataLookupTest.php
M repo/tests/phpunit/includes/Store/WikiPageEntityRevisionLookupTest.php
41 files changed, 139 insertions(+), 134 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
 
b/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
index 8b1349d..dc5b87a 100644
--- 
a/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
@@ -17,7 +17,7 @@
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\DataModel\Snak\Snak;
-use Wikibase\Lib\Store\EntityRevision;
+use Wikibase\Lib\Store\EntityRevision as TheEntityRevision;
 use Wikibase\Lib\SnakFormatter;
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Lib\Store\RevisionBasedEntityLookup;
@@ -231,7 +231,7 @@
->will( $this->returnCallback( function( EntityId 
$entityId ) {
switch ( $entityId->getSerialization() ) {
case 'Q42':
-   return new EntityRevision( new 
Item( new ItemId( 'Q42' ) ) );
+   return new TheEntityRevision( 
new Item( new ItemId( 'Q42' ) ) );
case 'Q43':
throw new 
RevisionedUnresolvedRedirectException(
$entityId,
diff --git a/data-access/src/DispatchingServiceFactory.php 
b/data-access/src/DispatchingServiceFactory.php
index c3ef487..825ac17 100644
--- a/data-access/src/DispatchingServiceFactory.php
+++ b/data-access/src/DispatchingServiceFactory.php
@@ -8,7 +8,7 @@
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityRedirect;
 use Wikibase\DataModel\Services\Term\TermBuffer;
-use Wikibase\Lib\Store\EntityRevision;
+use Wikibase\Lib\Store\EntityRevision as TheEntityRevision;
 use Wikibase\Lib\Interactors\TermSearchInteractorFactory;
 use Wikibase\Lib\RepositoryDefinitions;
 use Wikibase\Lib\Store\EntityInfoBuilderFactory;
@@ -88,9 +88,9

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Temporarily add class alias for EntityRevision

2017-08-09 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370949 )

Change subject: Temporarily add class alias for EntityRevision
..

Temporarily add class alias for EntityRevision

Apparently there are serialized instances of EntityRevision
using the old FQN in cache.

The alias could be removed after all caches are only using
new namespace.

Bug: T172616
Change-Id: I3839fff8d8bf21391e50a3f6dfd964ab5e4a4edd
---
M lib/includes/Store/EntityRevision.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/49/370949/1

diff --git a/lib/includes/Store/EntityRevision.php 
b/lib/includes/Store/EntityRevision.php
index fdc3950..3835421 100644
--- a/lib/includes/Store/EntityRevision.php
+++ b/lib/includes/Store/EntityRevision.php
@@ -75,3 +75,5 @@
}
 
 }
+
+class_alias( 'Wikibase\EntityRevision', EntityRevision::class );
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/370949
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3839fff8d8bf21391e50a3f6dfd964ab5e4a4edd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits