[MediaWiki-commits] [Gerrit] Replace deprecated getPrefixedId in Client and Lib - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Replace deprecated getPrefixedId in Client and Lib .. Replace deprecated getPrefixedId in Client and Lib In case you wonder, the removed method is unused and broken anyway. Change-Id: I6fa896855890d4195663a946a9a67356ee47a3f6 --- M client/includes/ChangeHandler.php M client/includes/LangLinkHandler.php M lib/includes/changes/EntityChangeFactory.php M lib/includes/formatters/EntityIdHtmlLinkFormatter.php M lib/includes/formatters/EntityIdLabelFormatter.php M lib/includes/serializers/ByPropertyListSerializer.php M lib/includes/serializers/ClaimSerializer.php M lib/includes/serializers/EntitySerializer.php M lib/includes/serializers/ReferenceSerializer.php M lib/includes/serializers/SnakSerializer.php M lib/includes/store/sql/SiteLinkTable.php M lib/includes/store/sql/SqlEntityInfoBuilder.php M lib/includes/store/sql/TermSqlIndex.php M lib/tests/phpunit/ChangesTableTest.php M lib/tests/phpunit/MockRepository.php M lib/tests/phpunit/MockRepositoryTest.php M lib/tests/phpunit/changes/EntityChangeTest.php M lib/tests/phpunit/formatters/EntityIdLinkFormatterTest.php M lib/tests/phpunit/formatters/EntityIdTitleFormatterTest.php M lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php 21 files changed, 41 insertions(+), 70 deletions(-) Approvals: Bene: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/ChangeHandler.php b/client/includes/ChangeHandler.php index 9601647..4fc108c 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/ChangeHandler.php @@ -211,7 +211,7 @@ $groups = array(); foreach ( $changes as $change ) { - $id = $change->getEntityId()->getPrefixedId(); + $id = $change->getEntityId()->getSerialization(); if ( !isset( $groups[$id] ) ) { $groups[$id] = array(); @@ -466,8 +466,6 @@ return 0; } - - // == /** * Handle the provided changes. diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index 1da6aa2..cc93b8b 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -120,8 +120,8 @@ $itemId = $this->getItemIdForTitle( $title ); if ( $itemId !== null ) { - wfDebugLog( __CLASS__, __FUNCTION__ . ": Item ID for " . $title->getFullText() - . " is " . $itemId->getPrefixedId() ); + wfDebugLog( __CLASS__, __FUNCTION__ . ': Item ID for ' . $title->getFullText() + . ' is ' . $itemId->getSerialization() ); //NOTE: SiteLinks we could get from $this->siteLinkLookup do not contain badges, // so we have to fetch the links from the Item. diff --git a/lib/includes/changes/EntityChangeFactory.php b/lib/includes/changes/EntityChangeFactory.php index ec39d86..7f24474 100644 --- a/lib/includes/changes/EntityChangeFactory.php +++ b/lib/includes/changes/EntityChangeFactory.php @@ -49,7 +49,6 @@ $this->entityFactory = $entityFactory; } - /** * @since 0.5 * @@ -76,7 +75,7 @@ ); if ( !$instance->hasField( 'object_id' ) ) { - $instance->setField( 'object_id', $entityId->getPrefixedId() ); + $instance->setField( 'object_id', $entityId->getSerialization() ); } if ( !$instance->hasField( 'info' ) ) { diff --git a/lib/includes/formatters/EntityIdHtmlLinkFormatter.php b/lib/includes/formatters/EntityIdHtmlLinkFormatter.php index a3a6b0f..b813795 100644 --- a/lib/includes/formatters/EntityIdHtmlLinkFormatter.php +++ b/lib/includes/formatters/EntityIdHtmlLinkFormatter.php @@ -47,14 +47,14 @@ if ( isset( $this->entityTitleLookup ) ) { $title = $this->entityTitleLookup->getTitleForId( $entityId ); } else { - $title = Title::newFromText( $entityId->getPrefixedId() ); + $title = Title::newFromText( $entityId->getSerialization() ); } $attributes = array( 'title' => $title->getPrefixedText(), 'href' => $title->getLocalURL() ); - $label = $entityId->getPrefixedId(); + $label = $entityId->getSerialization(); if ( $this->getOption( self::OPT_LOOKUP_LABEL ) ) { try { diff --git a/lib/includes/formatters/Ent
[MediaWiki-commits] [Gerrit] Replace deprecated getPrefixedId in Client and Lib - change (mediawiki...Wikibase)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/166383 Change subject: Replace deprecated getPrefixedId in Client and Lib .. Replace deprecated getPrefixedId in Client and Lib In case you wonder, the removed method is unused and broken anyway. Change-Id: I6fa896855890d4195663a946a9a67356ee47a3f6 --- M client/includes/ChangeHandler.php M client/includes/LangLinkHandler.php M lib/includes/changes/EntityChangeFactory.php M lib/includes/formatters/EntityIdHtmlLinkFormatter.php M lib/includes/formatters/EntityIdLabelFormatter.php M lib/includes/serializers/ByPropertyListSerializer.php M lib/includes/serializers/ClaimSerializer.php M lib/includes/serializers/EntitySerializer.php M lib/includes/serializers/ReferenceSerializer.php M lib/includes/serializers/SnakSerializer.php M lib/includes/store/sql/SiteLinkTable.php M lib/includes/store/sql/SqlEntityInfoBuilder.php M lib/includes/store/sql/TermSqlIndex.php M lib/tests/phpunit/ChangesTableTest.php M lib/tests/phpunit/MockRepository.php M lib/tests/phpunit/MockRepositoryTest.php M lib/tests/phpunit/changes/EntityChangeTest.php M lib/tests/phpunit/formatters/EntityIdLinkFormatterTest.php M lib/tests/phpunit/formatters/EntityIdTitleFormatterTest.php M lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php 21 files changed, 41 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/83/166383/1 diff --git a/client/includes/ChangeHandler.php b/client/includes/ChangeHandler.php index 9601647..4fc108c 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/ChangeHandler.php @@ -211,7 +211,7 @@ $groups = array(); foreach ( $changes as $change ) { - $id = $change->getEntityId()->getPrefixedId(); + $id = $change->getEntityId()->getSerialization(); if ( !isset( $groups[$id] ) ) { $groups[$id] = array(); @@ -466,8 +466,6 @@ return 0; } - - // == /** * Handle the provided changes. diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index 1da6aa2..cc93b8b 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -120,8 +120,8 @@ $itemId = $this->getItemIdForTitle( $title ); if ( $itemId !== null ) { - wfDebugLog( __CLASS__, __FUNCTION__ . ": Item ID for " . $title->getFullText() - . " is " . $itemId->getPrefixedId() ); + wfDebugLog( __CLASS__, __FUNCTION__ . ': Item ID for ' . $title->getFullText() + . ' is ' . $itemId->getSerialization() ); //NOTE: SiteLinks we could get from $this->siteLinkLookup do not contain badges, // so we have to fetch the links from the Item. diff --git a/lib/includes/changes/EntityChangeFactory.php b/lib/includes/changes/EntityChangeFactory.php index ec39d86..7f24474 100644 --- a/lib/includes/changes/EntityChangeFactory.php +++ b/lib/includes/changes/EntityChangeFactory.php @@ -49,7 +49,6 @@ $this->entityFactory = $entityFactory; } - /** * @since 0.5 * @@ -76,7 +75,7 @@ ); if ( !$instance->hasField( 'object_id' ) ) { - $instance->setField( 'object_id', $entityId->getPrefixedId() ); + $instance->setField( 'object_id', $entityId->getSerialization() ); } if ( !$instance->hasField( 'info' ) ) { diff --git a/lib/includes/formatters/EntityIdHtmlLinkFormatter.php b/lib/includes/formatters/EntityIdHtmlLinkFormatter.php index a3a6b0f..b813795 100644 --- a/lib/includes/formatters/EntityIdHtmlLinkFormatter.php +++ b/lib/includes/formatters/EntityIdHtmlLinkFormatter.php @@ -47,14 +47,14 @@ if ( isset( $this->entityTitleLookup ) ) { $title = $this->entityTitleLookup->getTitleForId( $entityId ); } else { - $title = Title::newFromText( $entityId->getPrefixedId() ); + $title = Title::newFromText( $entityId->getSerialization() ); } $attributes = array( 'title' => $title->getPrefixedText(), 'href' => $title->getLocalURL() ); - $label = $entityId->getPrefixedId(); + $label = $entityId->getSerialization(); if ( $this->getOption( self::OPT_LOOKUP_LABEL ) ) {