jenkins-bot has submitted this change and it was merged. Change subject: Get rid of deprecated method usage ......................................................................
Get rid of deprecated method usage Change-Id: Iabc862dac48ac6182a8df6abe3d3f9fe6b50cc11 --- M lib/tests/phpunit/EntityLookupTest.php M repo/includes/api/ModifyEntity.php 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/tests/phpunit/EntityLookupTest.php b/lib/tests/phpunit/EntityLookupTest.php index ae51e6b..2b78946 100644 --- a/lib/tests/phpunit/EntityLookupTest.php +++ b/lib/tests/phpunit/EntityLookupTest.php @@ -138,13 +138,13 @@ $entity = $lookup->getEntity( $id, $revision ); if ( $shouldExist == true ) { - $this->assertNotNull( $entity, "ID " . $id->getPrefixedId() ); - $this->assertEquals( $id->getPrefixedId(), $entity->getPrefixedId() ); + $this->assertNotNull( $entity, "ID " . $id->__toString() ); + $this->assertEquals( $id->__toString(), $entity->getId()->__toString() ); $has = $lookup->hasEntity( $id ); $this->assertTrue( $has, 'hasEntity' ); } else { - $this->assertNull( $entity, "ID " . $id->getPrefixedId() ); + $this->assertNull( $entity, "ID " . $id->__toString() ); if ( $revision == 0 ) { $has = $lookup->hasEntity( $id ); diff --git a/repo/includes/api/ModifyEntity.php b/repo/includes/api/ModifyEntity.php index d2e7319..3c5d299 100644 --- a/repo/includes/api/ModifyEntity.php +++ b/repo/includes/api/ModifyEntity.php @@ -240,9 +240,12 @@ } protected function addToOutput( EntityContent $entityContent, Status $status ) { + $formatter = WikibaseRepo::getDefaultInstance()->getEntityIdFormatter(); + $this->getResult()->addValue( 'entity', - 'id', $entityContent->getEntity()->getPrefixedId() + 'id', + $formatter->format( $entityContent->getEntity()->getId() ) ); $this->getResult()->addValue( -- To view, visit https://gerrit.wikimedia.org/r/78801 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iabc862dac48ac6182a8df6abe3d3f9fe6b50cc11 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits