Skip to content

Commit a8d6465

Browse files
committed
Merge pull request #603 from wmde/release500
Release 5.0.0
2 parents f4b0311 + c80cace commit a8d6465

6 files changed

Lines changed: 15 additions & 29 deletions

File tree

RELEASE-NOTES.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Wikibase DataModel release notes
22

3-
## Version 5.0.0 (alpha)
3+
## Version 5.0.0 (2016-02-15)
44

55
* Removed `Claims` class (deprecated since 1.0)
66
* Removed `getClaims` and `setClaims` methods from `Entity`, `Item` and `Property` (deprecated since 1.0)
@@ -16,9 +16,11 @@
1616
* Added `getIterator` method
1717
* Removed `ReferenceList::removeDuplicates`
1818
* `ReferenceList::addReference` now throws an `InvalidArgumentException` for negative indices
19-
* `EntityDocument` now implements `Comparable`
20-
* Added `equals` method
21-
* Added `copy` to `EntityDocument`
19+
* Added `EntityDocument::equals`, and `EntityDocument` now implements `Comparable`
20+
* Added `EntityDocument::copy`
21+
* Fixed `Property::clear` not clearing statements
22+
* `TermList` now skips and removes empty terms
23+
* Deprecated `ByPropertyIdArray`
2224

2325
## Version 4.4.0 (2016-01-20)
2426

WikibaseDataModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
88
*/
99

10-
define( 'WIKIBASE_DATAMODEL_VERSION', '5.0.0 alpha' );
10+
define( 'WIKIBASE_DATAMODEL_VERSION', '5.0.0' );
1111

1212
if ( defined( 'MEDIAWIKI' ) && function_exists( 'wfLoadExtension' ) ) {
1313
wfLoadExtension( 'WikibaseDataModel', __DIR__ . '/mediawiki-extension.json' );

mediawiki-extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Wikibase DataModel",
3-
"version": "5.0.0 alpha",
3+
"version": "5.0.0",
44
"author": [
55
"[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]",
66
"Thiemo Mättig"

src/ByPropertyIdArray.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
* o3 (p2) ---> move to index 0 -/ o1 (p1)
3838
*
3939
* @since 0.2
40+
* @deprecated since 5.0, use a DataModel Service instead
4041
*
4142
* @licence GNU GPL v2+
4243
* @author H. Snater < mediawiki@snater.com >

src/Term/TermList.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/**
1414
* Unordered list of Term objects.
1515
* If multiple terms with the same language code are provided, only the last one will be retained.
16+
* Empty terms are skipped and treated as non-existing.
1617
*
1718
* @since 0.7.3
1819
*
@@ -115,6 +116,11 @@ private function assertIsLanguageCode( $languageCode ) {
115116
}
116117
}
117118

119+
/**
120+
* Replaces non-empty or removes empty terms.
121+
*
122+
* @param Term $term
123+
*/
118124
public function setTerm( Term $term ) {
119125
if ( $term->getText() === '' ) {
120126
unset( $this->terms[$term->getLanguageCode()] );

tests/fixtures/HashableObject.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)