Jeroen De Dauw has submitted this change and it was merged.

Change subject: Replace deprecated getPrefixedId in Repo
......................................................................


Replace deprecated getPrefixedId in Repo

Change-Id: I6b59524a81a37f198d1f60c7ade446395cb6f5fe
---
M repo/Wikibase.hooks.php
M repo/includes/ChangeOp/ChangeOpClaimRemove.php
M repo/includes/ChangeOp/ChangeOpMainSnak.php
M repo/includes/ChangeOp/ChangeOpQualifier.php
M repo/includes/ChangeOp/ChangeOpQualifierRemove.php
M repo/includes/ChangeOp/ChangeOpReference.php
M repo/includes/ChangeOp/ChangeOpReferenceRemove.php
M repo/includes/ChangeOp/ChangeOpSiteLink.php
M repo/includes/ChangeOp/ChangeOpStatementRank.php
M repo/includes/ClaimSummaryBuilder.php
M repo/includes/UpdateRepoOnMoveJob.php
M repo/includes/api/ModifyEntity.php
M repo/includes/api/SearchEntities.php
M repo/includes/specials/SpecialSetSiteLink.php
M repo/includes/store/sql/PropertyInfoTableBuilder.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimRemoveTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpMainSnakTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpQualifierTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceRemoveTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
M repo/tests/phpunit/includes/ClaimHtmlGeneratorTest.php
M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
M repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
M repo/tests/phpunit/includes/EntityViewTest.php
M repo/tests/phpunit/includes/Hook/OutputPageJsConfigHookHandlerTest.php
M repo/tests/phpunit/includes/SummaryFormatterTest.php
M repo/tests/phpunit/includes/View/ClaimsViewTest.php
M repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php
M repo/tests/phpunit/includes/api/GetClaimsTest.php
M repo/tests/phpunit/includes/api/SetReferenceTest.php
M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
32 files changed, 55 insertions(+), 54 deletions(-)

Approvals:
  Bene: Looks good to me, but someone else must approve
  Jeroen De Dauw: Looks good to me, approved



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index a08e42b..a1140ce 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -652,9 +652,9 @@
                                $entityType = preg_replace( '/^wikibase-/i', 
'', $entityContent->getEntity()->getType() );
 
                                // add class to body so it's clear this is a wb 
item:
-                               $bodyAttrs['class'] .= " wb-entitypage 
wb-{$entityType}page";
+                               $bodyAttrs['class'] .= ' wb-entitypage wb-' . 
$entityType . 'page';
                                // add another class with the ID of the item:
-                               $bodyAttrs['class'] .= " 
wb-{$entityType}page-{$entityContent->getEntityId()->getPrefixedId()}";
+                               $bodyAttrs['class'] .= ' wb-' . $entityType . 
'page-' . $entityContent->getEntityId()->getSerialization();
 
                                if ( $sk->getRequest()->getCheck( 'diff' ) ) {
                                        $bodyAttrs['class'] .= ' wb-diffpage';
diff --git a/repo/includes/ChangeOp/ChangeOpClaimRemove.php 
b/repo/includes/ChangeOp/ChangeOpClaimRemove.php
index 82758e2..6084a14 100644
--- a/repo/includes/ChangeOp/ChangeOpClaimRemove.php
+++ b/repo/includes/ChangeOp/ChangeOpClaimRemove.php
@@ -88,7 +88,7 @@
         */
        protected function getClaimSummaryArgs( Snak $mainSnak ) {
                $propertyId = $mainSnak->getPropertyId();
-               return array( array( $propertyId->getPrefixedId() => $mainSnak 
) );
+               return array( array( $propertyId->getSerialization() => 
$mainSnak ) );
        }
 
        /**
diff --git a/repo/includes/ChangeOp/ChangeOpMainSnak.php 
b/repo/includes/ChangeOp/ChangeOpMainSnak.php
index 5d7a536..9687a1a 100644
--- a/repo/includes/ChangeOp/ChangeOpMainSnak.php
+++ b/repo/includes/ChangeOp/ChangeOpMainSnak.php
@@ -146,7 +146,7 @@
         */
        protected function getClaimSummaryArgs( Snak $mainSnak ) {
                $propertyId = $mainSnak->getPropertyId();
-               return array( array( $propertyId->getPrefixedId() => $mainSnak 
) );
+               return array( array( $propertyId->getSerialization() => 
$mainSnak ) );
        }
 
        /**
diff --git a/repo/includes/ChangeOp/ChangeOpQualifier.php 
b/repo/includes/ChangeOp/ChangeOpQualifier.php
index 0341bb6..31c663f 100644
--- a/repo/includes/ChangeOp/ChangeOpQualifier.php
+++ b/repo/includes/ChangeOp/ChangeOpQualifier.php
@@ -111,7 +111,7 @@
         */
        protected function addQualifier( Snaks $qualifiers, Summary $summary = 
null ) {
                if ( $qualifiers->hasSnak( $this->snak ) ) {
-                       throw new ChangeOpException( "Claim has already a 
qualifier with hash {$this->snak->getHash()}" );
+                       throw new ChangeOpException( 'Claim has already a 
qualifier with hash ' . $this->snak->getHash() );
                }
                $qualifiers->addSnak( $this->snak );
                //TODO: add the mainsnak as autocomment-arg & change messages
@@ -131,7 +131,7 @@
                        throw new ChangeOpException( "Qualifier with hash 
$this->snakHash does not exist" );
                }
                if ( $qualifiers->hasSnak( $this->snak ) ) {
-                       throw new ChangeOpException( "Claim has already a 
qualifier with hash {$this->snak->getHash()}" );
+                       throw new ChangeOpException( 'Claim has already a 
qualifier with hash ' . $this->snak->getHash() );
                }
                $qualifiers->removeSnakHash( $this->snakHash );
                $qualifiers->addSnak( $this->snak );
@@ -147,7 +147,7 @@
         */
        protected function getSnakSummaryArgs( Snak $snak ) {
                $propertyId = $snak->getPropertyId();
-               return array( array( $propertyId->getPrefixedId() => $snak ) );
+               return array( array( $propertyId->getSerialization() => $snak ) 
);
        }
 
        /**
@@ -164,4 +164,5 @@
        public function validate( Entity $entity ) {
                return $this->snakValidator->validate( $this->snak );
        }
+
 }
diff --git a/repo/includes/ChangeOp/ChangeOpQualifierRemove.php 
b/repo/includes/ChangeOp/ChangeOpQualifierRemove.php
index ec3e621..e359331 100644
--- a/repo/includes/ChangeOp/ChangeOpQualifierRemove.php
+++ b/repo/includes/ChangeOp/ChangeOpQualifierRemove.php
@@ -99,7 +99,7 @@
         */
        protected function getSnakSummaryArgs( Snak $snak ) {
                $propertyId = $snak->getPropertyId();
-               return array( array( $propertyId->getPrefixedId() => $snak ) );
+               return array( array( $propertyId->getSerialization() => $snak ) 
);
        }
 
        /**
diff --git a/repo/includes/ChangeOp/ChangeOpReference.php 
b/repo/includes/ChangeOp/ChangeOpReference.php
index d624482..d910a05 100644
--- a/repo/includes/ChangeOp/ChangeOpReference.php
+++ b/repo/includes/ChangeOp/ChangeOpReference.php
@@ -168,8 +168,8 @@
                }
 
                if ( $references->hasReference( $this->reference ) && 
$this->index === $currentIndex ) {
-                       throw new ChangeOpException( "Claim has already a 
reference with hash "
-                       . "{$this->reference->getHash()} and index 
($currentIndex) is not changed" );
+                       throw new ChangeOpException( 'Claim has already a 
reference with hash '
+                       . $this->reference->getHash() . ' and index (' . 
$currentIndex . ') is not changed' );
                }
                $references->removeReferenceHash( $this->referenceHash );
                $references->addReference( $this->reference, $this->index );
@@ -185,7 +185,7 @@
        protected function getSnakSummaryArgs( Snak $snak ) {
                $propertyId = $snak->getPropertyId();
 
-               return array( array( $propertyId->getPrefixedId() => $snak ) );
+               return array( array( $propertyId->getSerialization() => $snak ) 
);
        }
 
        /**
@@ -202,4 +202,5 @@
        public function validate( Entity $entity ) {
                return $this->snakValidator->validateReference( 
$this->reference );
        }
+
 }
diff --git a/repo/includes/ChangeOp/ChangeOpReferenceRemove.php 
b/repo/includes/ChangeOp/ChangeOpReferenceRemove.php
index 00c3eb9..12bb111 100644
--- a/repo/includes/ChangeOp/ChangeOpReferenceRemove.php
+++ b/repo/includes/ChangeOp/ChangeOpReferenceRemove.php
@@ -111,7 +111,7 @@
        protected function getSnakSummaryArgs( Snak $snak ) {
                $propertyId = $snak->getPropertyId();
 
-               return array( array( $propertyId->getPrefixedId() => $snak ) );
+               return array( array( $propertyId->getSerialization() => $snak ) 
);
        }
 
        /**
diff --git a/repo/includes/ChangeOp/ChangeOpSiteLink.php 
b/repo/includes/ChangeOp/ChangeOpSiteLink.php
index 8cfec7f..0cbe137 100644
--- a/repo/includes/ChangeOp/ChangeOpSiteLink.php
+++ b/repo/includes/ChangeOp/ChangeOpSiteLink.php
@@ -89,7 +89,7 @@
                                throw new InvalidArgumentException( '$badge 
needs to be an ItemId' );
                        }
 
-                       if ( !array_key_exists( $badge->getPrefixedId(), 
$badgeItems ) ) {
+                       if ( !array_key_exists( $badge->getSerialization(), 
$badgeItems ) ) {
                                throw new InvalidArgumentException( 'Only items 
specified in the config can be badges' );
                        }
                }
diff --git a/repo/includes/ChangeOp/ChangeOpStatementRank.php 
b/repo/includes/ChangeOp/ChangeOpStatementRank.php
index 2f9654d..b180f41 100644
--- a/repo/includes/ChangeOp/ChangeOpStatementRank.php
+++ b/repo/includes/ChangeOp/ChangeOpStatementRank.php
@@ -98,7 +98,7 @@
        protected function getSnakSummaryArgs( Snak $snak ) {
                $propertyId = $snak->getPropertyId();
 
-               return array( array( $propertyId->getPrefixedId() => $snak ) );
+               return array( array( $propertyId->getSerialization() => $snak ) 
);
        }
 
        /**
diff --git a/repo/includes/ClaimSummaryBuilder.php 
b/repo/includes/ClaimSummaryBuilder.php
index 04c56b1..470f6a2 100644
--- a/repo/includes/ClaimSummaryBuilder.php
+++ b/repo/includes/ClaimSummaryBuilder.php
@@ -113,7 +113,7 @@
                foreach( $guids as $guid ) {
                        if ( $claims->hasClaimWithGuid( $guid ) ) {
                                $snak = $claims->getClaimWithGuid( $guid 
)->getMainSnak();
-                               $key = $snak->getPropertyId()->getPrefixedId();
+                               $key = 
$snak->getPropertyId()->getSerialization();
 
                                if ( !array_key_exists( $key, $pairs ) ) {
                                        $pairs[$key] = array();
diff --git a/repo/includes/UpdateRepoOnMoveJob.php 
b/repo/includes/UpdateRepoOnMoveJob.php
index 55bb0ef..dc690d6 100644
--- a/repo/includes/UpdateRepoOnMoveJob.php
+++ b/repo/includes/UpdateRepoOnMoveJob.php
@@ -161,7 +161,7 @@
 
                if ( $entityRevision === null ) {
                        wfDebugLog( __CLASS__, __FUNCTION__ . ": EntityRevision 
not found for "
-                               . $itemId->getPrefixedId() );
+                               . $itemId->getSerialization() );
 
                        wfProfileOut( __METHOD__ );
                        return false;
diff --git a/repo/includes/api/ModifyEntity.php 
b/repo/includes/api/ModifyEntity.php
index 7008013..df45e68 100644
--- a/repo/includes/api/ModifyEntity.php
+++ b/repo/includes/api/ModifyEntity.php
@@ -21,7 +21,6 @@
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\StringNormalizer;
 use Wikibase\Summary;
-use WikiPage;
 
 /**
  * Base class for API modules modifying a single entity identified based on id 
xor a combination of site and page title.
@@ -203,7 +202,7 @@
                                continue;
                        }
 
-                       if ( !array_key_exists( $badgeId->getPrefixedId(), 
$this->badgeItems ) ) {
+                       if ( !array_key_exists( $badgeId->getSerialization(), 
$this->badgeItems ) ) {
                                $this->dieError( 'Badges: item "' . 
$badgeSerialization . '" is not a badge',
                                        'not-badge' );
                        }
diff --git a/repo/includes/api/SearchEntities.php 
b/repo/includes/api/SearchEntities.php
index ead8946..bca192b 100644
--- a/repo/includes/api/SearchEntities.php
+++ b/repo/includes/api/SearchEntities.php
@@ -214,7 +214,7 @@
                        $key = $id->getSerialization();
                        $title = $this->titleLookup->getTitleForId( $id );
                        $entries[ $key ] = array(
-                               'id' => $id->getPrefixedId(),
+                               'id' => $id->getSerialization(),
                                'url' => $title->getFullUrl()
                        );
                }
diff --git a/repo/includes/specials/SpecialSetSiteLink.php 
b/repo/includes/specials/SpecialSetSiteLink.php
index d2eadb3..eebedbe 100644
--- a/repo/includes/specials/SpecialSetSiteLink.php
+++ b/repo/includes/specials/SpecialSetSiteLink.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Repo\Specials;
 
 use Html;
+use InvalidArgumentException;
 use OutOfBoundsException;
 use Status;
 use Wikibase\ChangeOp\ChangeOpException;
@@ -10,7 +11,6 @@
 use Wikibase\CopyrightMessageBuilder;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\Repo\WikibaseRepo;
@@ -105,7 +105,7 @@
 
                // check if id belongs to an item
                if ( $this->entityRevision !== null && !( 
$this->entityRevision->getEntity() instanceof Item ) ) {
-                       $this->showErrorHTML( $this->msg( 
'wikibase-setsitelink-not-item', 
$this->entityRevision->getEntity()->getId()->getPrefixedId() )->parse() );
+                       $this->showErrorHTML( $this->msg( 
'wikibase-setsitelink-not-item', 
$this->entityRevision->getEntity()->getId()->getSerialization() )->parse() );
                        $this->entityRevision = null;
                }
 
@@ -365,7 +365,7 @@
         *
         * @since 0.4
         *
-        * @param Item|null $entity
+        * @param Item|null $item
         * @param string $siteId
         *
         * @throws OutOfBoundsException
@@ -384,7 +384,7 @@
         *
         * @since 0.5
         *
-        * @param Item|null $entity
+        * @param Item|null $item
         * @param string $siteId
         *
         * @throws OutOfBoundsException
@@ -397,7 +397,7 @@
 
                $badges = array();
                foreach ( $item->getSitelink( $siteId )->getBadges() as $badge 
) {
-                       $badges[] = $badge->getPrefixedId();
+                       $badges[] = $badge->getSerialization();
                }
                return $badges;
        }
@@ -423,8 +423,8 @@
                                return false;
                        }
 
-                       if ( !array_key_exists( $badgeId->getPrefixedId(), 
$this->badgeItems ) ) {
-                               $status->fatal( 
'wikibase-setsitelink-not-badge', $badgeId->getPrefixedId() );
+                       if ( !array_key_exists( $badgeId->getSerialization(), 
$this->badgeItems ) ) {
+                               $status->fatal( 
'wikibase-setsitelink-not-badge', $badgeId->getSerialization() );
                                return false;
                        }
 
diff --git a/repo/includes/store/sql/PropertyInfoTableBuilder.php 
b/repo/includes/store/sql/PropertyInfoTableBuilder.php
index d5825e7..95c4402 100644
--- a/repo/includes/store/sql/PropertyInfoTableBuilder.php
+++ b/repo/includes/store/sql/PropertyInfoTableBuilder.php
@@ -2,8 +2,9 @@
 
 namespace Wikibase;
 
-use Wikibase\Lib\Reporting\MessageReporter;
+use RuntimeException;
 use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\Lib\Reporting\MessageReporter;
 use Wikibase\Lib\Store\EntityLookup;
 
 /**
@@ -250,8 +251,7 @@
         * The property is loaded in full using the EntityLookup
         * provide to the constructor.
         *
-        * @see Wikibase\PropertyInfoUpdate
-        * @throws \RuntimeException
+        * @throws RuntimeException
         *
         * @since 0.4
         *
@@ -261,8 +261,8 @@
                $property = $this->entityLookup->getEntity( $id );
 
                if( !$property instanceof Property ) {
-                       throw new \RuntimeException(
-                               "EntityLookup didn't return a Property for id " 
. $id->getPrefixedId()
+                       throw new RuntimeException(
+                               'EntityLookup did not return a Property for id 
' . $id->getSerialization()
                        );
                }
 
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimRemoveTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimRemoveTest.php
index b4ee3f1..4026582 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimRemoveTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimRemoveTest.php
@@ -79,7 +79,7 @@
                $item->setId( new ItemId( $itemIdString ) );
 
                $claim = $item->newClaim( $snak );
-               $claim->setGuid( $item->getId()->getPrefixedId() . 
'$D8404CDA-25E4-4334-AG93-A3290BCD9C0P' );
+               $claim->setGuid( $item->getId()->getSerialization() . 
'$D8404CDA-25E4-4334-AG93-A3290BCD9C0P' );
                $claims = new Claims();
                $claims->addClaim( $claim );
                $item->setClaims( $claims );
@@ -87,4 +87,4 @@
                return $item;
        }
 
-}
\ No newline at end of file
+}
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
index 9a0f78f..2d5a89f 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
@@ -212,7 +212,7 @@
                //TODO: once we stop allowing user-generated GUIDs for new 
claims, test this below.
                // apply change to an unknown claim
                /*
-               $wrongClaimId = $item->getId()->getPrefixedId() . 
'$DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF';
+               $wrongClaimId = $item->getId()->getSerialization() . 
'$DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF';
                $badClaim = clone $newClaim;
                $badClaim->setGuid( $wrongClaimId );
                $args['unknown claim'] = array ( $item, new ChangeOpClaim( 
$badClaim, $guidGenerator ) );
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpMainSnakTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpMainSnakTest.php
index 18d5455..e600cbd 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpMainSnakTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpMainSnakTest.php
@@ -146,7 +146,7 @@
                $args['wrong entity'] = array ( $wrongItem, 
$this->newChangeOpMainSnak( $claimGuid, $newSnak ) );
 
                // apply change to an unknown claim
-               $wrongClaimId = $item->getId()->getPrefixedId() . 
'$DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF';
+               $wrongClaimId = $item->getId()->getSerialization() . 
'$DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF';
                $args['unknown claim'] = array ( $item, 
$this->newChangeOpMainSnak( $wrongClaimId, $newSnak ) );
 
                // update an existing claim with wrong main snak property
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpQualifierTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpQualifierTest.php
index b8e41b0..7ec5649 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpQualifierTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpQualifierTest.php
@@ -149,7 +149,7 @@
                $item->setId( 123 );
 
                $claim = $item->newClaim( $snak );
-               $claim->setGuid( $item->getId()->getPrefixedId() . 
'$D8404CDA-25E4-4334-AG03-A3290BCD9CQP' );
+               $claim->setGuid( $item->getId()->getSerialization() . 
'$D8404CDA-25E4-4334-AG03-A3290BCD9CQP' );
                $claims = new Claims();
                $claims->addClaim( $claim );
                $item->setClaims( $claims );
diff --git 
a/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceRemoveTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceRemoveTest.php
index 9246041..325f58c 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceRemoveTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceRemoveTest.php
@@ -104,7 +104,7 @@
                $item->setId( new ItemId( $itemIdString ) );
 
                $claim = $item->newClaim( $snak );
-               $claim->setGuid( $item->getId()->getPrefixedId() . 
'$D8494TYA-25E4-4334-AG03-A3290BCT9CQP' );
+               $claim->setGuid( $item->getId()->getSerialization() . 
'$D8494TYA-25E4-4334-AG03-A3290BCT9CQP' );
                $claims = new Claims();
                $claims->addClaim( $claim );
                $item->setClaims( $claims );
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
index 8f54b41..1bc21b1 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpReferenceTest.php
@@ -243,7 +243,7 @@
                $item->setId( 123 );
 
                $claim = $item->newClaim( $snak );
-               $claim->setGuid( $item->getId()->getPrefixedId() . 
'$D8494TYA-25E4-4334-AG03-A3290BCT9CQP' );
+               $claim->setGuid( $item->getId()->getSerialization() . 
'$D8494TYA-25E4-4334-AG03-A3290BCT9CQP' );
                $claims = new Claims();
                $claims->addClaim( $claim );
                $item->setClaims( $claims );
diff --git a/repo/tests/phpunit/includes/ClaimHtmlGeneratorTest.php 
b/repo/tests/phpunit/includes/ClaimHtmlGeneratorTest.php
index f21483a..2265013 100644
--- a/repo/tests/phpunit/includes/ClaimHtmlGeneratorTest.php
+++ b/repo/tests/phpunit/includes/ClaimHtmlGeneratorTest.php
@@ -58,7 +58,7 @@
         * @return Title
         */
        public function getTitleForId( EntityId $id ) {
-               $name = $id->getEntityType() . ':' . $id->getPrefixedId();
+               $name = $id->getEntityType() . ':' . $id->getSerialization();
                return Title::makeTitle( NS_MAIN, $name );
        }
 
diff --git a/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php 
b/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
index d9dc02d..533ecfd 100644
--- a/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
+++ b/repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
@@ -58,7 +58,7 @@
                foreach ( $ids as $id ) {
                        $entity = $this->makeEntity( $id );
 
-                       $key = $id->getPrefixedId();
+                       $key = $id->getSerialization();
                        $entities[$key] = $entity;
                }
 
@@ -107,7 +107,7 @@
                                                return null;
                                        }
 
-                                       $key = $id->getPrefixedId();
+                                       $key = $id->getSerialization();
                                        return $entities[$key];
                                }
                        ) );
@@ -321,7 +321,7 @@
                }
 
                $expectedIds = array_map( function( EntityId $id ) {
-                       return $id->getPrefixedId();
+                       return $id->getSerialization();
                }, $ids );
 
                sort( $actualIds );
diff --git a/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php 
b/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
index 66fcfd3..db4f62b 100644
--- a/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
+++ b/repo/tests/phpunit/includes/EntityParserOutputGeneratorTest.php
@@ -104,7 +104,7 @@
                $entityTitleLookup->expects( $this->any() )
                        ->method( 'getTitleForId' )
                        ->will( $this->returnCallback( function( EntityId $id ) 
{
-                               $name = $id->getEntityType() . ':' . 
$id->getPrefixedId();
+                               $name = $id->getEntityType() . ':' . 
$id->getSerialization();
                                return Title::makeTitle( NS_MAIN, $name );
                        } ) );
 
diff --git a/repo/tests/phpunit/includes/EntityViewTest.php 
b/repo/tests/phpunit/includes/EntityViewTest.php
index f269dc4..5335614 100644
--- a/repo/tests/phpunit/includes/EntityViewTest.php
+++ b/repo/tests/phpunit/includes/EntityViewTest.php
@@ -55,7 +55,7 @@
        }
 
        public function getTitleForId( EntityId $id ) {
-               $name = $id->getEntityType() . ':' . $id->getPrefixedId();
+               $name = $id->getEntityType() . ':' . $id->getSerialization();
                return Title::makeTitle( NS_MAIN, $name );
        }
 
diff --git 
a/repo/tests/phpunit/includes/Hook/OutputPageJsConfigHookHandlerTest.php 
b/repo/tests/phpunit/includes/Hook/OutputPageJsConfigHookHandlerTest.php
index a42659f..dbec07c 100644
--- a/repo/tests/phpunit/includes/Hook/OutputPageJsConfigHookHandlerTest.php
+++ b/repo/tests/phpunit/includes/Hook/OutputPageJsConfigHookHandlerTest.php
@@ -79,7 +79,7 @@
         * @return Title
         */
        public function getTitleForId( EntityId $entityId ) {
-               $name = $entityId->getEntityType() . ':' . 
$entityId->getPrefixedId();
+               $name = $entityId->getEntityType() . ':' . 
$entityId->getSerialization();
                return Title::makeTitle( NS_MAIN, $name );
        }
 
diff --git a/repo/tests/phpunit/includes/SummaryFormatterTest.php 
b/repo/tests/phpunit/includes/SummaryFormatterTest.php
index b9a25e7..65cb095 100644
--- a/repo/tests/phpunit/includes/SummaryFormatterTest.php
+++ b/repo/tests/phpunit/includes/SummaryFormatterTest.php
@@ -39,7 +39,7 @@
                        $id = $id->getEntityId();
                }
 
-               return '[[' . $id->getEntityType() . ':' . $id->getPrefixedId() 
. ']]';
+               return '[[' . $id->getEntityType() . ':' . 
$id->getSerialization() . ']]';
        }
 
        /**
diff --git a/repo/tests/phpunit/includes/View/ClaimsViewTest.php 
b/repo/tests/phpunit/includes/View/ClaimsViewTest.php
index 8d49988..87bbb3f 100644
--- a/repo/tests/phpunit/includes/View/ClaimsViewTest.php
+++ b/repo/tests/phpunit/includes/View/ClaimsViewTest.php
@@ -33,7 +33,7 @@
 class ClaimsViewTest extends \MediaWikiLangTestCase {
 
        public function getTitleForId( EntityId $id ) {
-               $name = $id->getEntityType() . ':' . $id->getPrefixedId();
+               $name = $id->getEntityType() . ':' . $id->getSerialization();
                return Title::makeTitle( NS_MAIN, $name );
        }
 
diff --git a/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php 
b/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php
index 0c92696..426e322 100644
--- a/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php
+++ b/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php
@@ -112,7 +112,7 @@
         * @return Title
         */
        public function getTitleForId( EntityId $id ) {
-               $name = $id->getEntityType() . ':' . $id->getPrefixedId();
+               $name = $id->getEntityType() . ':' . $id->getSerialization();
                return Title::makeTitle( NS_MAIN, $name );
        }
 
diff --git a/repo/tests/phpunit/includes/api/GetClaimsTest.php 
b/repo/tests/phpunit/includes/api/GetClaimsTest.php
index b298eed..f69213b 100644
--- a/repo/tests/phpunit/includes/api/GetClaimsTest.php
+++ b/repo/tests/phpunit/includes/api/GetClaimsTest.php
@@ -70,7 +70,7 @@
                $statements[3] = $item->newClaim( new PropertyValueSnak( 
$property, new StringValue( 'o_O' ) ) );
 
                foreach ( $statements as $key => $statement ) {
-                       $statement->setGuid( $item->getId()->getPrefixedId() . 
'$D8404CDA-56A1-4334-AF13-A3290BCD9CL' . $key );
+                       $statement->setGuid( $item->getId()->getSerialization() 
. '$D8404CDA-56A1-4334-AF13-A3290BCD9CL' . $key );
                        $item->addClaim( $statement );
                }
        }
diff --git a/repo/tests/phpunit/includes/api/SetReferenceTest.php 
b/repo/tests/phpunit/includes/api/SetReferenceTest.php
index 98434d6..69c4aff 100644
--- a/repo/tests/phpunit/includes/api/SetReferenceTest.php
+++ b/repo/tests/phpunit/includes/api/SetReferenceTest.php
@@ -70,7 +70,7 @@
                $store->saveEntity( $item, '', $GLOBALS['wgUser'], EDIT_NEW );
 
                $statement = $item->newClaim( new PropertyNoValueSnak( 
self::$propertyIds[0] ) );
-               $statement->setGuid( $item->getId()->getPrefixedId() . 
'$D8505CDA-25E4-4334-AG93-A3290BCD9C0P' );
+               $statement->setGuid( $item->getId()->getSerialization() . 
'$D8505CDA-25E4-4334-AG93-A3290BCD9C0P' );
 
                $reference = new Reference( new SnakList(
                        array( new PropertySomeValueSnak( 100 ) )
@@ -140,7 +140,7 @@
                // Create a statement to act upon:
                $statement = $item->newClaim( new PropertyNoValueSnak( 
self::$propertyIds[0] ) );
                $statement->setGuid(
-                       $item->getId()->getPrefixedId() . 
'$D8505CDA-25E4-4334-AG93-A3290BCD9C0P'
+                       $item->getId()->getSerialization() . 
'$D8505CDA-25E4-4334-AG93-A3290BCD9C0P'
                );
 
                $item->addClaim( $statement );
@@ -162,7 +162,7 @@
                // Create a statement to act upon:
                $statement = $item->newClaim( new PropertyNoValueSnak( 
self::$propertyIds[0] ) );
                $statement->setGuid(
-                       $item->getId()->getPrefixedId() . 
'$D8505CDA-25E4-4334-AG93-A3290BCD9C0P'
+                       $item->getId()->getSerialization() . 
'$D8505CDA-25E4-4334-AG93-A3290BCD9C0P'
                );
 
                // Pre-fill statement with three references:
diff --git a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 
b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
index c0a15ae..c476149 100644
--- a/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
+++ b/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
@@ -17,8 +17,8 @@
 use Wikibase\Lib\Store\StorageException;
 use Wikibase\Lib\Store\WikiPageEntityRevisionLookup;
 use Wikibase\Repo\Content\EntityContentFactory;
-use Wikibase\Repo\Store\WikiPageEntityStore;
 use Wikibase\Repo\Store\SQL\EntityPerPageTable;
+use Wikibase\Repo\Store\WikiPageEntityStore;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\SqlIdGenerator;
 
@@ -412,7 +412,7 @@
                $this->assertTrue(
                        $status->isOK(),
                        'create with EDIT_NEW flag for ' .
-                       $entity->getId()->getPrefixedId()
+                       $entity->getId()->getSerialization()
                );
 
                // ok, the item exists now in the database.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b59524a81a37f198d1f60c7ade446395cb6f5fe
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Bene <benestar.wikime...@gmail.com>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to