Skip to content

Commit b28fae3

Browse files
committed
Merge pull request #656 from wmde/release60
Release 6.0.0
2 parents a0c98b0 + d19b180 commit b28fae3

9 files changed

Lines changed: 32 additions & 10 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ the git repository and take care of loading yourself.
3030
To add this package as a local, per-project dependency to your project, simply add a
3131
dependency on `wikibase/data-model` to your project's `composer.json` file.
3232
Here is a minimal example of a `composer.json` file that just defines a dependency on
33-
Wikibase DataModel 5.x:
33+
Wikibase DataModel 6.x:
3434

3535
```js
3636
{
3737
"require": {
38-
"wikibase/data-model": "~5.0"
38+
"wikibase/data-model": "~6.0"
3939
}
4040
}
4141
```

RELEASE-NOTES.md

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

3-
## Version 6.0.0 (dev)
3+
## Version 6.0.0 (2016-03-10)
4+
5+
This release removes the long deprecated Entity base class in favor of much more narrow interfaces.
46

57
* Removed `Entity` class (deprecated since 1.0)
8+
* `StatementListProvider`, `LabelsProvider`, `DescriptionsProvider`, `AliasesProvider` and
9+
`FingerprintProvider` now give the guarantee to return objects by reference
610
* `Item` and `Property` no longer extend `Entity`
711
* Removed `getLabel`, `getDescription`, `getAliases`, `getAllAliases`,
812
`setLabels`, `setDescriptions`, `addAliases`, `setAllAliases`,
@@ -12,7 +16,7 @@
1216
* `Item::getDescriptions` and `Property::getDescriptions` now return a `TermList`
1317
* Added `Item::getAliasGroups` and `Property::getAliasGroups`
1418
* `TermList` and `AliasGroupList` no longer throw an `InvalidArgumentException` for invalid language codes.
15-
* `getByLangauge` now throws an `OutOfBoundsException`.
19+
* `getByLangauge` throws an `OutOfBoundsException` instead.
1620
* `removeByLanguage` does nothing for invalid values.
1721
* `hasTermForLanguage` and `hasGroupForLangauge` return false instead.
1822

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.1.0' );
10+
define( 'WIKIBASE_DATAMODEL_VERSION', '6.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.1.0",
3+
"version": "6.0.0",
44
"author": [
55
"[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]",
66
"Thiemo Mättig"

src/Statement/StatementListProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
namespace Wikibase\DataModel\Statement;
44

55
/**
6-
* Interface for classes that contain a StatementList.
6+
* Common interface for classes (typically Entities) that contain a StatementList. Implementations
7+
* must guarantee this returns the original, mutable object by reference.
78
*
89
* @since 2.2.0
910
*
@@ -13,6 +14,8 @@
1314
interface StatementListProvider {
1415

1516
/**
17+
* This is guaranteed to return the original, mutable object by reference.
18+
*
1619
* @return StatementList
1720
*/
1821
public function getStatements();

src/Term/AliasesProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace Wikibase\DataModel\Term;
44

55
/**
6+
* Common interface for classes (typically Entities) that contain an AliasGroupList. Implementations
7+
* must guarantee this returns the original, mutable object by reference.
8+
*
69
* @since 4.1
710
*
811
* @licence GNU GPL v2+
@@ -11,7 +14,7 @@
1114
interface AliasesProvider {
1215

1316
/**
14-
* It is not guaranteed that this method returns the original object.
17+
* This is guaranteed to return the original, mutable object by reference.
1518
*
1619
* @return AliasGroupList
1720
*/

src/Term/DescriptionsProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
namespace Wikibase\DataModel\Term;
44

55
/**
6+
* Common interface for classes (typically Entities) that contain a TermList, representing
7+
* descriptions. Implementations must guarantee this returns the original, mutable object by
8+
* reference.
9+
*
610
* @since 4.1
711
*
812
* @licence GNU GPL v2+
@@ -11,7 +15,7 @@
1115
interface DescriptionsProvider {
1216

1317
/**
14-
* It is not guaranteed that this method returns the original object.
18+
* This is guaranteed to return the original, mutable object by reference.
1519
*
1620
* @return TermList
1721
*/

src/Term/FingerprintProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace Wikibase\DataModel\Term;
44

55
/**
6+
* Common interface for classes (typically Entities) that contain a Fingerprint. Implementations
7+
* must guarantee this returns the original, mutable object by reference.
8+
*
69
* @since 0.7.3
710
*
811
* @licence GNU GPL v2+
@@ -11,6 +14,8 @@
1114
interface FingerprintProvider {
1215

1316
/**
17+
* This is guaranteed to return the original, mutable object by reference.
18+
*
1419
* @return Fingerprint
1520
*/
1621
public function getFingerprint();

src/Term/LabelsProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
namespace Wikibase\DataModel\Term;
44

55
/**
6+
* Common interface for classes (typically Entities) that contain a TermList, representing labels.
7+
* Implementations must guarantee this returns the original, mutable object by reference.
8+
*
69
* @since 4.1
710
*
811
* @licence GNU GPL v2+
@@ -11,7 +14,7 @@
1114
interface LabelsProvider {
1215

1316
/**
14-
* It is not guaranteed that this method returns the original object.
17+
* This is guaranteed to return the original, mutable object by reference.
1518
*
1619
* @return TermList
1720
*/

0 commit comments

Comments
 (0)