Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/81549
Change subject: Update PropertyValueSnak to use PropertyId
......................................................................
Update PropertyValueSnak to use PropertyId
Change-Id: Iacfa10bd6c57448016f933c7e9d17b6428d31434
---
M DataModel/Snak/PropertyValueSnak.php
1 file changed, 8 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseDataModel
refs/changes/49/81549/1
diff --git a/DataModel/Snak/PropertyValueSnak.php
b/DataModel/Snak/PropertyValueSnak.php
index 2e5a886..8399a23 100644
--- a/DataModel/Snak/PropertyValueSnak.php
+++ b/DataModel/Snak/PropertyValueSnak.php
@@ -4,6 +4,7 @@
use DataValues\UnDeserializableValue;
use DataValues\DataValue;
+use Wikibase\DataModel\Entity\PropertyId;
/**
* Class representing a property value snak.
@@ -28,9 +29,12 @@
protected $dataValue;
/**
+ * Support for passing in an EntityId instance that is not a PropertyId
instance has
+ * been deprecated since 0.5.
+ *
* @since 0.1
*
- * @param EntityId|integer $propertyId
+ * @param PropertyId|EntityId|integer $propertyId
* @param DataValue $dataValue
*/
public function __construct( $propertyId, DataValue $dataValue ) {
@@ -73,7 +77,7 @@
list( $propertyId, $dataValue ) = unserialize( $serialized );
$this->__construct(
- new EntityId( Property::ENTITY_TYPE, $propertyId ),
+ PropertyId::newFromNumber( $propertyId ),
$dataValue
);
}
@@ -113,4 +117,5 @@
public function getType() {
return 'value';
}
-}
\ No newline at end of file
+
+}
--
To view, visit https://gerrit.wikimedia.org/r/81549
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacfa10bd6c57448016f933c7e9d17b6428d31434
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseDataModel
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits