Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
# Wikibase DataModel release notes

## Version 7.0.0 (dev)

* Removed `FingerprintHolder`
## Version 7.0.0 (2017-03-15)

This release adds support for custom entity types to `EntityIdValue`, and thus changes the hashes of
snaks, qualifiers, and references.

* Changed the internal `serialize()` format of several `EntityId` related classes. In all cases
`unserialize()` still supports the previous format.
* Serialization of `SnakObject` (includes `PropertyNoValueSnak` and `PropertySomeValueSnak`)
does not use numeric IDs any more
* Serialization of `PropertyValueSnak` (includes `DerivedPropertyValueSnak`) does not use
numeric IDs any more
* Serialization of `EntityIdValue` does not use numeric IDs any more
* `EntityIdValue` can now serialize and unserialize `EntityId`s other than `ItemId` and
`PropertyId`
* Minimized serialization of `ItemId` and `PropertyId` to not include the entity type any more

#### Other breaking changes

* Removed `FingerprintHolder`. Use `TermList::clear` and `AliasGroupList::clear` instead. `Item` and
`Property` also still implement `setFingerprint`.
* Removed class aliases deprecated since 3.0:
* `Wikibase\DataModel\Claim\Claim`
* `Wikibase\DataModel\Claim\ClaimGuid`
* `Wikibase\DataModel\StatementListProvider`
* Added a `SnakList` constructor that is not compatible with the `ArrayList` constructor any more,
and does not accept null any more.
* Removed `HashArray::equals`, and `HashArray` does not implement `Comparable` any more
* Removed `HashArray::getHash`, and `HashArray` does not implement `Hashable` any more
* Removed `HashArray::rebuildIndices`
* Removed `HashArray::indicesAreUpToDate`
* Removed `HashArray::removeDuplicates`
* Removed `$acceptDuplicates` feature from `HashArray`

#### Additions

* Added `clear` to `TermList`, `AliasGroupList` and `StatementList`
* Added `newFromRepositoryAndNumber` to `ItemId` and `PropertyId`

#### Other changes

* Fixed `ReferenceList::addReference` sometimes moving existing references around
* Fixed exceptions in `DispatchingEntityIdParser` and `ItemIdParser` not forwarding the previous
exception

## Version 6.3.1 (2016-11-30)

* `ItemId::getNumericId` and `PropertyId::getNumericId` no longer throw exceptions for foreign ids
* `ItemId::getNumericId` and `PropertyId::getNumericId` no longer throw exceptions for foreign IDs

## Version 6.3.0 (2016-11-03)

Expand Down
2 changes: 1 addition & 1 deletion WikibaseDataModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
return;
}

define( 'WIKIBASE_DATAMODEL_VERSION', '6.3.0' );
define( 'WIKIBASE_DATAMODEL_VERSION', '7.0.0' );

if ( defined( 'MEDIAWIKI' ) && function_exists( 'wfLoadExtension' ) ) {
wfLoadExtension( 'WikibaseDataModel', __DIR__ . '/mediawiki-extension.json' );
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"wikimedia/assert": "~0.2.2"
},
"require-dev": {
"phpunit/phpunit": "~4.8",
"ockcyp/covers-validator": "~0.4.0",
"squizlabs/php_codesniffer": "~2.3",
"phpmd/phpmd": "~2.3"
"phpmd/phpmd": "~2.3",
"phpunit/phpunit": "~4.8",
"squizlabs/php_codesniffer": "~2.3"
},
"autoload": {
"files" : [
Expand Down
2 changes: 1 addition & 1 deletion mediawiki-extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Wikibase DataModel",
"version": "6.3.0",
"version": "7.0.0",
"author": [
"[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]",
"Thiemo Mättig"
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/EntityIdValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct( EntityId $entityId ) {
/**
* @see Serializable::serialize
*
* @since 0.5
* @since 7.0 serialization format changed in an incompatible way
*
* @return string
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Entity/ItemId.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public function getEntityType() {
/**
* @see Serializable::serialize
*
* @since 7.0 serialization format changed in an incompatible way
*
* @return string
*/
public function serialize() {
Expand Down Expand Up @@ -106,6 +108,8 @@ public static function newFromNumber( $numericId ) {
/**
* CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs.
*
* @since 7.0
*
* @param string $repositoryName
* @param int|float|string $numericId
*
Expand Down
4 changes: 4 additions & 0 deletions src/Entity/PropertyId.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public function getEntityType() {
/**
* @see Serializable::serialize
*
* @since 7.0 serialization format changed in an incompatible way
*
* @return string
*/
public function serialize() {
Expand Down Expand Up @@ -106,6 +108,8 @@ public static function newFromNumber( $numericId ) {
/**
* CAUTION: Use the full string serialization whenever you can and avoid using numeric IDs.
*
* @since 7.0
*
* @param string $repositoryName
* @param int|float|string $numericId
*
Expand Down
2 changes: 1 addition & 1 deletion src/Snak/PropertyValueSnak.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getDataValue() {
/**
* @see Serializable::serialize
*
* @since 7.0
* @since 7.0 serialization format changed in an incompatible way
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Snak/SnakObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function equals( $target ) {
/**
* @see Serializable::serialize
*
* @since 7.0
* @since 7.0 serialization format changed in an incompatible way
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Statement/StatementList.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function filter( StatementFilter $filter ) {
/**
* Removes all statements from this list.
*
* @since 6.0
* @since 7.0
*/
public function clear() {
$this->statements = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Term/AliasGroupList.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function toTextArray() {
/**
* Removes all alias groups from this list.
*
* @since 6.0
* @since 7.0
*/
public function clear() {
$this->groups = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Term/TermList.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function hasTerm( Term $term ) {
/**
* Removes all terms from this list.
*
* @since 6.0
* @since 7.0
*/
public function clear() {
$this->terms = [];
Expand Down