jenkins-bot has submitted this change and it was merged. Change subject: Use DM Serializetion in RB for sitelinks ......................................................................
Use DM Serializetion in RB for sitelinks Bug: T104180 Change-Id: I5b8db42240b8c5d3f0438db3e9d46c83c296376f --- M repo/includes/LinkedData/EntityDataSerializationService.php M repo/includes/WikibaseRepo.php M repo/includes/api/ApiHelperFactory.php M repo/includes/api/EditEntity.php M repo/includes/api/LinkTitles.php M repo/includes/api/ResultBuilder.php M repo/includes/api/SetSiteLink.php M repo/includes/specials/SpecialEntityData.php M repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php M repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php M repo/tests/phpunit/includes/api/ResultBuilderTest.php M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php 13 files changed, 259 insertions(+), 47 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/LinkedData/EntityDataSerializationService.php b/repo/includes/LinkedData/EntityDataSerializationService.php index 87972b6..c755cb3 100644 --- a/repo/includes/LinkedData/EntityDataSerializationService.php +++ b/repo/includes/LinkedData/EntityDataSerializationService.php @@ -11,6 +11,7 @@ use RequestContext; use SiteList; use Wikibase\RedirectRevision; +use SiteStore; use Wikibase\Repo\Api\ResultBuilder; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\SerializerFactory; @@ -112,14 +113,21 @@ private $rdfWriterFactory; /** + * @var SiteStore + */ + private $siteStore; + + /** * @param string $rdfBaseURI * @param string $rdfDataURI * @param EntityLookup $entityLookup * @param EntityTitleLookup $entityTitleLookup * @param LibSerializerFactory $libSerializerFactory * @param PropertyDataTypeLookup $propertyLookup + * @param EntityDataFormatProvider $entityDataFormatProvider * @param SiteList $sites * @param SerializerFactory $serializerFactory + * @param SiteStore $siteStore * * @since 0.4 */ @@ -132,7 +140,8 @@ PropertyDataTypeLookup $propertyLookup, SiteList $sites, EntityDataFormatProvider $entityDataFormatProvider, - SerializerFactory $serializerFactory + SerializerFactory $serializerFactory, + SiteStore $siteStore ) { $this->rdfBaseURI = $rdfBaseURI; $this->rdfDataURI = $rdfDataURI; @@ -143,6 +152,7 @@ $this->propertyLookup = $propertyLookup; $this->sites = $sites; $this->entityDataFormatProvider = $entityDataFormatProvider; + $this->siteStore = $siteStore; $this->rdfWriterFactory = new RdfWriterFactory(); } @@ -454,6 +464,7 @@ $this->entityTitleLookup, $this->libSerializerFactory, $this->serializerFactory, + $this->siteStore, false // Never index tags for this service as we dont output XML ); $resultBuilder->addEntityRevision( null, $entityRevision, $options ); diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php index 0f33a75..69e6601 100644 --- a/repo/includes/WikibaseRepo.php +++ b/repo/includes/WikibaseRepo.php @@ -1080,6 +1080,7 @@ $this->getExceptionLocalizer(), $this->getPropertyDataTypeLookup(), $this->getEntityFactory(), + $this->getSiteStore(), $this->getSummaryFormatter(), $this->getEntityRevisionLookup( 'uncached' ), $this->newEditEntityFactory( $context ) diff --git a/repo/includes/api/ApiHelperFactory.php b/repo/includes/api/ApiHelperFactory.php index 6ca4499..16a711e 100644 --- a/repo/includes/api/ApiHelperFactory.php +++ b/repo/includes/api/ApiHelperFactory.php @@ -4,6 +4,7 @@ use ApiBase; use DataValues\Serializers\DataValueSerializer; +use SiteStore; use Wikibase\DataModel\Entity\PropertyDataTypeLookup; use Wikibase\DataModel\SerializerFactory; use Wikibase\EditEntityFactory; @@ -61,11 +62,17 @@ */ private $editEntityFactory; + /** + * @var SiteStore + */ + private $siteStore; + public function __construct( EntityTitleLookup $titleLookup, ExceptionLocalizer $exceptionLocalizer, PropertyDataTypeLookup $dataTypeLookup, EntityFactory $entityFactory, + SiteStore $siteStore, SummaryFormatter $summaryFormatter, EntityRevisionLookup $entityRevisionLookup, EditEntityFactory $editEntityFactory @@ -74,6 +81,7 @@ $this->exceptionLocalizer = $exceptionLocalizer; $this->dataTypeLookup = $dataTypeLookup; $this->entityFactory = $entityFactory; + $this->siteStore = $siteStore; $this->summaryFormatter = $summaryFormatter; $this->entityRevisionLookup = $entityRevisionLookup; $this->editEntityFactory = $editEntityFactory; @@ -93,6 +101,7 @@ $this->titleLookup, $this->newLibSerializerFactory( $defaultOptions ), $this->newSerializerFactory(), + $this->siteStore, $api->getResult()->getIsRawMode() ); } diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php index 77d59dd..fbb9ab0 100644 --- a/repo/includes/api/EditEntity.php +++ b/repo/includes/api/EditEntity.php @@ -573,7 +573,7 @@ } if ( $entity instanceof Item ) { - $builder->addSiteLinks( $entity->getSiteLinkList()->toArray(), 'entity' ); + $builder->addSiteLinkList( $entity->getSiteLinkList(), 'entity' ); } $builder->addClaims( $entity->getClaims(), 'entity' ); diff --git a/repo/includes/api/LinkTitles.php b/repo/includes/api/LinkTitles.php index d05f308..474a40e 100644 --- a/repo/includes/api/LinkTitles.php +++ b/repo/includes/api/LinkTitles.php @@ -10,6 +10,7 @@ use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\SiteLink; +use Wikibase\DataModel\SiteLinkList; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Repo\SiteLinkTargetProvider; use Wikibase\Repo\WikibaseRepo; @@ -118,7 +119,7 @@ $fromId = $siteLinkStore->getItemIdForLink( $fromSite->getGlobalId(), $fromPage ); $toId = $siteLinkStore->getItemIdForLink( $toSite->getGlobalId(), $toPage ); - $return = array(); + $siteLinkList = new SiteLinkList(); $flags = 0; $item = null; @@ -135,10 +136,10 @@ $item = new Item(); $toLink = new SiteLink( $toSite->getGlobalId(), $toPage ); $item->addSiteLink( $toLink ); - $return[] = $toLink; + $siteLinkList->addSiteLink( $toLink ); $fromLink = new SiteLink( $fromSite->getGlobalId(), $fromPage ); $item->addSiteLink( $fromLink ); - $return[] = $fromLink; + $siteLinkList->addSiteLink( $fromLink ); $flags |= EDIT_NEW; $summary->setAction( 'create' ); @@ -149,7 +150,7 @@ $item = $itemRev->getEntity(); $fromLink = new SiteLink( $fromSite->getGlobalId(), $fromPage ); $item->addSiteLink( $fromLink ); - $return[] = $fromLink; + $siteLinkList->addSiteLink( $fromLink ); $summary->setAction( 'connect' ); } elseif ( $fromId !== null && $toId === null ) { // reuse from-site's item @@ -158,7 +159,7 @@ $item = $itemRev->getEntity(); $toLink = new SiteLink( $toSite->getGlobalId(), $toPage ); $item->addSiteLink( $toLink ); - $return[] = $toLink; + $siteLinkList->addSiteLink( $toLink ); $summary->setAction( 'connect' ); } elseif ( $fromId->equals( $toId ) ) { // no-op @@ -168,7 +169,7 @@ $this->errorReporter->dieError( 'No common item detected, unable to link titles', 'no-common-item' ); } - $this->resultBuilder->addSiteLinks( $return, 'entity' ); + $this->resultBuilder->addSiteLinkList( $siteLinkList, 'entity' ); $status = $this->getAttemptSaveStatus( $item, $summary, $flags ); $this->buildResult( $item, $status ); } diff --git a/repo/includes/api/ResultBuilder.php b/repo/includes/api/ResultBuilder.php index 054e610..ec34e6d 100644 --- a/repo/includes/api/ResultBuilder.php +++ b/repo/includes/api/ResultBuilder.php @@ -5,13 +5,14 @@ use ApiResult; use InvalidArgumentException; use Revision; +use SiteStore; use Status; use Wikibase\DataModel\Claim\Claim; use Wikibase\DataModel\Claim\Claims; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Reference; use Wikibase\DataModel\SerializerFactory; -use Wikibase\DataModel\Term\Term; +use Wikibase\DataModel\SiteLinkList; use Wikibase\DataModel\Term\TermList; use Wikibase\EntityRevision; use Wikibase\Lib\Serializers\EntitySerializer; @@ -56,9 +57,19 @@ private $entityTitleLookup; /** + * @var SiteStore + */ + private $siteStore; + + /** * @var SerializationOptions */ private $options; + + /** + * @var SerializationModifier + */ + private $modifier; /** * @var bool when special elements such as '_element' are needed by the formatter. @@ -70,6 +81,7 @@ * @param EntityTitleLookup $entityTitleLookup * @param LibSerializerFactory $libSerializerFactory * @param SerializerFactory $serializerFactory + * @param SiteStore $siteStore * @param bool $isRawMode when special elements such as '_element' are needed by the formatter. * * @throws InvalidArgumentException @@ -79,6 +91,7 @@ EntityTitleLookup $entityTitleLookup, LibSerializerFactory $libSerializerFactory, SerializerFactory $serializerFactory, + SiteStore $siteStore, $isRawMode ) { if ( !$result instanceof ApiResult ) { @@ -91,6 +104,8 @@ $this->serializerFactory = $serializerFactory; $this->missingEntityCounter = -1; $this->isRawMode = $isRawMode; + $this->siteStore = $siteStore; + $this->modifier = new SerializationModifier(); } /** @@ -471,35 +486,69 @@ * * @since 0.5 * - * @param array $siteLinks the site links to insert in the result, as SiteLink objects + * @todo use a SiteLinkListSerializer when created in DataModelSerialization here + * + * @param SiteLinkList $siteLinkList the site links to insert in the result * @param array|string $path where the data is located - * @param array|null $options + * @param bool $addUrl */ - public function addSiteLinks( array $siteLinks, $path, $options = null ) { - $serializerOptions = $this->getOptions(); + public function addSiteLinkList( SiteLinkList $siteLinkList, $path, $addUrl = false ) { + $serializer = $this->serializerFactory->newSiteLinkSerializer(); - if ( is_array( $options ) ) { - if ( in_array( EntitySerializer::SORT_ASC, $options ) ) { - $serializerOptions->setOption( EntitySerializer::OPT_SORT_ORDER, EntitySerializer::SORT_ASC ); - } elseif ( in_array( EntitySerializer::SORT_DESC, $options ) ) { - $serializerOptions->setOption( EntitySerializer::OPT_SORT_ORDER, EntitySerializer::SORT_DESC ); - } - - if ( in_array( 'url', $options ) ) { - $serializerOptions->addToOption( EntitySerializer::OPT_PARTS, "sitelinks/urls" ); - } - - if ( in_array( 'removed', $options ) ) { - $serializerOptions->addToOption( EntitySerializer::OPT_PARTS, "sitelinks/removed" ); - } + $values = array(); + foreach ( $siteLinkList->toArray() as $siteLink ) { + $values[$siteLink->getSiteId()] = $serializer->serialize( $siteLink ); } - $siteLinkSerializer = $this->libSerializerFactory->newSiteLinkSerializer( $serializerOptions ); - $values = $siteLinkSerializer->getSerialized( $siteLinks ); - - if ( $values !== array() ) { - $this->setList( $path, 'sitelinks', $values, 'sitelink' ); + if ( $addUrl ) { + $values = $this->getSiteLinkListArrayWithUrls( $values ); } + + if ( $this->isRawMode ) { + $values = $this->getRawModeSiteLinkListArray( $values ); + } + + $this->setList( $path, 'sitelinks', $values, 'sitelink' ); + } + + private function getSiteLinkListArrayWithUrls( array $array ) { + $siteStore = $this->siteStore; + $addUrlCallback = function( $array ) use ( $siteStore ) { + $site = $siteStore->getSite( $array['site'] ); + if ( $site !== null ) { + $array['url'] = $site->getPageUrl( $array['title'] ); + } + return $array; + }; + return $this->modifier->modifyUsingCallback( $array, '*', $addUrlCallback ); + } + + private function getRawModeSiteLinkListArray( array $array ) { + $addIndexedBadgesCallback = function ( $array ) { + ApiResult::setIndexedTagName( $array, 'badge' ); + return $array; + }; + $array = array_values( $array ); + return $this->modifier->modifyUsingCallback( $array, '*/badges', $addIndexedBadgesCallback ); + } + + /** + * Adds fake serialization to show a sitelink has been removed + * + * @since 0.5 + * + * @param SiteLinkList $siteLinkList + * @param array|string $path where the data is located + */ + public function addRemovedSiteLinks( SiteLinkList $siteLinkList, $path ) { + $serializer = $this->serializerFactory->newSiteLinkSerializer(); + $values = array(); + foreach ( $siteLinkList->toArray() as $siteLink ) { + $value = $serializer->serialize( $siteLink ); + $value['removed'] = ''; + $values[$siteLink->getSiteId()] = $value; + } + $this->setList( $path, 'sitelinks', $values, 'sitelink' ); } /** diff --git a/repo/includes/api/SetSiteLink.php b/repo/includes/api/SetSiteLink.php index 47182b3..5754d2d 100644 --- a/repo/includes/api/SetSiteLink.php +++ b/repo/includes/api/SetSiteLink.php @@ -7,6 +7,7 @@ use Wikibase\ChangeOp\SiteLinkChangeOpFactory; use Wikibase\DataModel\Entity\Entity; use Wikibase\DataModel\Entity\Item; +use Wikibase\DataModel\SiteLinkList; use Wikibase\Repo\WikibaseRepo; /** @@ -94,23 +95,27 @@ $item = $entity; $summary = $this->createSummary( $params ); $linksite = $this->stringNormalizer->trimToNFC( $params['linksite'] ); + $hasLinkWithSiteId = $item->getSiteLinkList()->hasLinkWithSiteId( $linksite ); + $resultBuilder = $this->getResultBuilder(); if ( $this->shouldRemove( $params ) ) { - if ( $item->hasLinkToSite( $linksite ) ) { - $link = $item->getSiteLink( $linksite ); - + if ( $hasLinkWithSiteId ) { $changeOp = $this->getChangeOp( $params ); + $siteLink = $item->getSiteLinkList()->getBySiteId( $linksite ); $this->applyChangeOp( $changeOp, $entity, $summary ); - - $this->getResultBuilder()->addSiteLinks( array( $link ), 'entity', array( 'removed' ) ); + $resultBuilder->addRemovedSiteLinks( new SiteLinkList( array( $siteLink ) ), 'entity' ); } } else { - if ( isset( $params['linktitle'] ) || $item->hasLinkToSite( $linksite ) ) { + if ( isset( $params['linktitle'] ) || $hasLinkWithSiteId ) { $changeOp = $this->getChangeOp( $params ); $this->applyChangeOp( $changeOp, $entity, $summary ); - $link = $item->getSiteLink( $linksite ); - $this->getResultBuilder()->addSiteLinks( array( $link ), 'entity', array( 'url' ) ); + $link = $item->getSiteLinkList()->getBySiteId( $linksite ); + $resultBuilder->addSiteLinkList( + new SiteLinkList( array( $link ) ), + 'entity', + true // always add the URL + ); } else { $this->errorReporter->dieMessage( 'no-such-sitelink', $params['linktitle'] ); } diff --git a/repo/includes/specials/SpecialEntityData.php b/repo/includes/specials/SpecialEntityData.php index 343593c..f949f9a 100644 --- a/repo/includes/specials/SpecialEntityData.php +++ b/repo/includes/specials/SpecialEntityData.php @@ -101,7 +101,8 @@ $wikibaseRepo->getPropertyDataTypeLookup(), $wikibaseRepo->getSiteStore()->getSites(), $entityDataFormatProvider, - $serializerFactory + $serializerFactory, + $wikibaseRepo->getSiteStore() ); $maxAge = $wikibaseRepo->getSettings()->getSetting( 'dataSquidMaxage' ); diff --git a/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php b/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php index abfb2e0..dd38ab4 100644 --- a/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php +++ b/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php @@ -102,7 +102,8 @@ $propertyLookup, new SiteList(), $entityDataFormatProvider, - $serializerFactory + $serializerFactory, + new MockSiteStore() ); $entityDataFormatProvider->setFormatWhiteList( diff --git a/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php b/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php index cfff98f..15021b8 100644 --- a/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php +++ b/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php @@ -111,7 +111,8 @@ $dataTypeLookup, new SiteList(), new EntityDataFormatProvider(), - $serializerFactory + $serializerFactory, + new MockSiteStore() ); return $service; diff --git a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php index 54dc142..c54886a 100644 --- a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php +++ b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php @@ -5,6 +5,7 @@ use Language; use Wikibase\Repo\Api\ApiHelperFactory; use Wikibase\Repo\WikibaseRepo; +use Wikibase\Test\MockSiteStore; /** * @covers Wikibase\Repo\Api\ApiHelperFactory @@ -34,6 +35,7 @@ $exceptionLocalizer, $dataTypeLookup, $entityFactory, + new MockSiteStore(), $summaryFormatter, $entityRevisionLookup, $editEntityFactory diff --git a/repo/tests/phpunit/includes/api/ResultBuilderTest.php b/repo/tests/phpunit/includes/api/ResultBuilderTest.php index 21d4f63..52a39d4 100644 --- a/repo/tests/phpunit/includes/api/ResultBuilderTest.php +++ b/repo/tests/phpunit/includes/api/ResultBuilderTest.php @@ -13,6 +13,7 @@ use Wikibase\DataModel\ReferenceList; use Wikibase\DataModel\SerializerFactory; use Wikibase\DataModel\SiteLink; +use Wikibase\DataModel\SiteLinkList; use Wikibase\DataModel\Snak\PropertySomeValueSnak; use Wikibase\DataModel\Snak\PropertyValueSnak; use Wikibase\DataModel\Snak\SnakList; @@ -22,6 +23,7 @@ use Wikibase\EntityRevision; use Wikibase\Lib\Serializers\SerializationOptions; use Wikibase\Lib\Serializers\LibSerializerFactory; +use Wikibase\Test\MockSiteStore; /** * @covers Wikibase\Repo\Api\ResultBuilder @@ -79,6 +81,7 @@ $mockEntityTitleLookup, $libSerializerFactory, $serializerFactory, + new MockSiteStore(), $indexedMode ); @@ -588,12 +591,126 @@ $this->assertEquals( $expected, $data ); } - public function testAddSiteLinks() { + public function provideAddSiteLinkList() { + return array( + array( + false, + array( + 'entities' => array( + 'Q1' => array( + 'sitelinks' => array( + 'enwiki' => array( + 'site' => 'enwiki', + 'title' => 'User:Addshore', + 'badges' => array(), + ), + 'dewikivoyage' => array( + 'site' => 'dewikivoyage', + 'title' => 'Berlin', + 'badges' => array(), + ), + ), + ), + ), + ), + ), + array( + true, + array( + 'entities' => array( + 'Q1' => array( + 'sitelinks' => array( + array( + 'site' => 'enwiki', + 'title' => 'User:Addshore', + 'badges' => array( '_element' => 'badge' ), + ), + array( + 'site' => 'dewikivoyage', + 'title' => 'Berlin', + 'badges' => array( '_element' => 'badge' ), + ), + '_element' => 'sitelink', + ), + ), + ), + ), + ), + ); + } + + /** + * @dataProvider provideAddSiteLinkList + */ + public function testAddSiteLinkList( $isRawMode, $expected ) { $result = $this->getDefaultResult(); - $siteLinks = array( + $siteLinkList = new SiteLinkList( + array( + new SiteLink( 'enwiki', 'User:Addshore' ), + new SiteLink( 'dewikivoyage', 'Berlin' ), + ) + ); + $path = array( 'entities', 'Q1' ); + + $resultBuilder = $this->getResultBuilder( $result, null, $isRawMode ); + $resultBuilder->addSiteLinkList( $siteLinkList, $path ); + + $data = $result->getResultData(); + $this->removeElementsWithKeysRecursively( $data, array( '_type' ) ); + $this->assertEquals( $expected, $data ); + } + + public function testAddRemovedSiteLinks() { + $result = $this->getDefaultResult(); + $siteLinkList = new SiteLinkList( array( new SiteLink( 'enwiki', 'User:Addshore' ), new SiteLink( 'dewikivoyage', 'Berlin' ), + ) ); + $path = array( 'entities', 'Q1' ); + $expected = array( + 'entities' => array( + 'Q1' => array( + 'sitelinks' => array( + 'enwiki' => array( + 'site' => 'enwiki', + 'title' => 'User:Addshore', + 'removed' => '', + 'badges' => array(), + ), + 'dewikivoyage' => array( + 'site' => 'dewikivoyage', + 'title' => 'Berlin', + 'removed' => '', + 'badges' => array(), + ), + ), + ), + ), ); + + $resultBuilder = $this->getResultBuilder( $result ); + $resultBuilder->addRemovedSiteLinks( $siteLinkList, $path ); + + $data = $result->getResultData( null, array( + 'BC' => array(), + 'Types' => array(), + 'Strip' => 'all', + ) ); + $this->assertEquals( $expected, $data ); + } + + public function testAddAndRemoveSiteLinks() { + $result = $this->getDefaultResult(); + $siteLinkListAdd = new SiteLinkList( + array( + new SiteLink( 'enwiki', 'User:Addshore' ), + new SiteLink( 'dewikivoyage', 'Berlin' ), + ) + ); + $siteLinkListRemove = new SiteLinkList( array( + new SiteLink( 'ptwiki', 'Port' ), + new SiteLink( 'dewiki', 'Gin' ), + ) ); $path = array( 'entities', 'Q1' ); $expected = array( 'entities' => array( @@ -609,13 +726,26 @@ 'title' => 'Berlin', 'badges' => array(), ), + 'ptwiki' => array( + 'site' => 'ptwiki', + 'title' => 'Port', + 'removed' => '', + 'badges' => array(), + ), + 'dewiki' => array( + 'site' => 'dewiki', + 'title' => 'Gin', + 'removed' => '', + 'badges' => array(), + ), ), ), ), ); $resultBuilder = $this->getResultBuilder( $result ); - $resultBuilder->addSiteLinks( $siteLinks, $path ); + $resultBuilder->addSiteLinkList( $siteLinkListAdd, $path ); + $resultBuilder->addRemovedSiteLinks( $siteLinkListRemove, $path ); $data = $result->getResultData(); $this->removeElementsWithKeysRecursively( $data, array( '_type' ) ); diff --git a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php index e9a4518..5178800 100644 --- a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php +++ b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php @@ -86,7 +86,8 @@ $dataTypeLookup, new SiteList(), $entityDataFormatProvider, - $serializerFactory + $serializerFactory, + new MockSiteStore() ); $maxAge = 60*60; -- To view, visit https://gerrit.wikimedia.org/r/222612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5b8db42240b8c5d3f0438db3e9d46c83c296376f Gerrit-PatchSet: 19 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Bene <benestar.wikime...@gmail.com> Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits