- Added
ByPropertyIdArray::getIndex - Added
ByPropertyIdArray::removeAtIndex - Added
ByPropertyIdArray::removeObject - Added
ByPropertyIdArray::moveToIndex
ByPropertyIdArray::buildIndexByPropertyIdArray::getByPropertyIdByPropertyIdArray::getFlatArrayIndexOfObjectByPropertyIdArray::getPropertyIds
- The
Propertyconstructor now accepts an optionalStatementListparameter - Added
Property::getStatementsandProperty::setStatements - Added
PropertyIdProviderinterface - Added
ByPropertyIdGrouper - Added
BestStatementsFinder - Added
EntityPatcherandEntityPatcherStrategy - Added
StatementList::getAllSnaksto use instead ofEntity::getAllSnaks - The
Statementconstructor now also accepts aClaimparameter - Added
Statement::setClaim - The
Referenceconstructor now accepts aSnakarray - Added
ReferenceList::addNewReference
Changes in the Entity hierarchy:
- Changed the constructor signature of
Item - Changed the constructor signature of
Property - Removed
Entity::setClaims(Item::setClaimshas been retained) - Removed
Entity::stub - Removed
Property::newEmpty - Removed
Entity::getIdFromClaimGuid Entity::removeLabelno longer accepts an array of language codesEntity::removeDescriptionno longer accepts an array of language codesEntityno longer implementsSerializable- Protected method
Entity::patchSpecificFieldsno longer has a second parameter Entity::getFingerprintis now returned by reference
Removal of toArray and newFromArray:
- Removed
Entity::toArray,Item::newFromArrayandProperty::newFromArray - Removed
Claim::toArrayandStatement::toArray - Removed
Claim::newFromArrayandStatement::newFromArray - Removed
ReferenceList::toArrayandReferenceList::newFromArray - Removed
toArrayfrom theReferencesinterface - Removed
SiteLink::toArrayandSiteLink::newFromArray - Removed
toArrayfrom theSnakandSnaksinterfaces - Removed
PropertyValueSnak::toArray - Removed
SnakList::toArrayandSnakList::newFromArray - Removed
SnakObject::toArrayandSnakObject::newFromArray - Removed
SnakObject::newFromType
Other breaking changes:
Itemnow has an array ofStatementrather than an array ofClaimPropertyno longer has an array ofClaimClaimandStatementno longer implementSerializable- Protected method
Entity::entityToDiffArraygot renamed toEntity::getDiffArray - Removed
Fingerprint::getAliases - Removed
EntityId::newFromPrefixedId - The constructor of
EntityIdis no longer public Claims::getDiffno longer takes a second optional parameterClaims::getDiffnow throws anUnexpectedValueExceptionrather than anInvalidArgumentException- Removed these class aliases deprecated since 0.4:
ItemObject,ReferenceObject,ClaimObject,StatementObject HashArrayandSnakListno longer take an optional parameter ingetHash- Calling
clearon anItemwill now cause its statements to be removed SiteLinkList::addNewSiteLinkno longer returns aSiteLinkListinstance- Removed the global variable
evilDataValueMap - Removed
ClaimAggregateinterface, which is thus no longer implemented byEntity HashableObjectStorage::getValueHashno longer accepts a first optional parameterMapHasherandMapValueHasherare now package private- Removed
Claims::getDiff
- Added
ClaimList - Added
StatementList - Added
StatementListDiffer - Added
PropertyDataTypeLookupand trivial implementationInMemoryDataTypeLookup - Added
PropertyNotFoundException - Added
ItemDifferandPropertyDiffer - Added
EntityDifferandEntityDifferStrategy - Added
Statement::getClaim - Added
Item::getStatements - Added
Item::setStatements
- Deprecated
Entity(but not the derivatives) - Deprecated
Claims - Deprecated
Entity::setId - Deprecated
Entity::newClaim - Deprecated
Entity::getAllSnaks - Deprecated
Entity::getDiffin favour ofEntityDifferand more specific differs - Deprecated
Item::getClaimsin favour ofItem::getStatements - Deprecated
Item::setClaimsin favour ofItem::setStatements - Deprecated
Item::hasClaimsin favour ofItem::getStatements()->count - Deprecated
Item::addClaimin favour ofItem::getStatements()->add*
- Undeprecated passing an integer to
Item::setIdandProperty::setId - The FQN of
Statementis nowWikibase\DataModel\Statement\Statement. The old FQN is deprecated.
- Fixed error caused by redeclaration of getType in
Entity, after it already got defined inEntityDocument
- Changed the signatures of
setLabel,setDescriptionandsetAliasGroupinFingerprint - Added
hasLabel,hasDescriptionandhasAliasGrouptoFingerprint
- Added
EntityDocumentinterface, which is implemented byEntity - Added
LegacyIdInterpreter - Undeprecated
Entity::isEmpty - Undeprecated
Entity::clear
- Fixed fatal error when calling
Item::getSiteLinkListon anItemright after constructing it
Item::removeSiteLinkno longer takes an optional second parameter and no longer returns a boolean- Shallow clones of
Itemwill now share the same list of site links SiteLinkListis now mutable
AliasGroupList::hasGroupForLanguageAliasGroupList::setAliasesForLanguageSiteLinkList::addSiteLinkSiteLinkList::addNewSiteLinkSiteLinkList::removeLinkWithSiteIdSiteLinkList::isEmptySiteLinkList::removeLinkWithSiteIdItem::getSiteLinkListItem::setSiteLinkListTermList::setTextForLanguage
Item::addSiteLinkItem::removeSiteLinkItem::getSiteLinksItem::getSiteLinkItem::hasLinkToSiteItem::hasSiteLinks
- An empty
TermListcan now be constructed with no constructor arguments - An empty
AliasGroupListcan now be constructed with no constructor arguments
- Made these classes implement
Comparable:TermListAliasGroupListFingerprintSiteLinkSiteLinkListClaimClaimsStatement
- Added methods to
Fingerprint:getLabelsetLabelremoveLabelsetLabelsgetDescriptionsetDescriptionremoveDescriptionsetDescriptionsgetAliasGroupsetAliasGroupremoveAliasGroupsetAliasGroupsgetAliasGroupsisEmpty
- Added
ItemIdSet
Entity::clear(to be removed in 1.0)Entity::isEmpty(to be removed in 1.0)Entity::stub(to be removed in 1.0)Fingerprint::getAliases(in favour ofFingerprint::getAliasGroups)
- This library no longer uses the MediaWiki i18n system when MediaWiki is loaded. No description will be shown as part of its entry on Special:Version.
- Added
Wikibase\DataModel\Termnamespace with these constructs:- Term\AliasGroup
- Term\AliasGroupList
- Term\Fingerprint
- Term\FingerprintProvider
- Term\Term
- Term\TermList
- Added
Entity::getFingerprint - Added
Entity::setFingerprint
- Deprecated
Property::newEmpty - Deprecated old fingerprint related methods in
Entity:- setLabel
- setDescription
- removeLabel
- removeDescription
- getAliases
- getAllAliases
- setAliases
- addAliases
- removeAliases
- getDescriptions
- getLabels
- getDescription
- getLabel
- setLabels
- setDescriptions
- setAllAliases
- Deprecated
SnakList::newFromArray - Deprecated
Statement::newFromArray - Deprecated
Claim::newFromArray - Deprecated
ReferenceList::newFromArray
- Added Claims::getByRanks
- Removed DataValues Geo, DataValues Time and DataValues Number from the dependency list. They where no longer needed.
- Added TypedSnak value object
- Added SiteLinkList value object
- Added Claims::getBestClaims
- Added Claims::getByRank
- The PHPUnit bootstrap file now works again on Windows
- Changed class loading from PSR-0 to PSR-4
- Deprecated SiteLink::toArray(), SiteLink::newFromArray(), SiteLink::getBadgesFromArray()
- Removed PropertySnak interface
- Removed Claims::getObjectType
- Wikibase DataModel now uses the "new" DataValues components. This means binding to other code has decreased and several design issues have been tackled.
- Wikibase DataModel is now PSR-0 compliant.
- All classes and interfaces not yet in the Wikibase\DataModel namespace got moved. The old names remain as aliases, and should be considered as deprecated.
- SimpleSiteLink was renamed to SiteLink. The old name remains as deprecated alias.
- Item::addSimpleSiteLink and Item::getSimpleSiteLinks where renamed to Item::adSiteLink and Item::getSiteLinks. The old names remains as deprecated aliases.
- Entity::getTerms was removed, as it returned objects of type Term, which is defined by a component Wikibase DataModel does not depend upon.
Note that this list is incomplete. In particular, not all breaking changes are listed.
- Added ItemId and PropertyId classes.
- Added BasicEntityIdParser that allows for parsing of serializations of entity ids defined by Wikibase DataModel.
- Added ClaimGuid and ClaimGuidParser.
- EntityId no longer is a DataValue. A new EntityIdValue was added to function as a DataValue representing the identity of an entity.
- ObjectComparer has been removed from the public namespace.
- SnakFactory has been moved out of this component.
- Constructing an EntityId (rather then one of its derivatives) is now deprecated.
- Wikibase\EntityId has been renamed to Wikibase\DataModel\Entity\EntityId. The old name is deprecated.
Initial release as Wikibase DataModel component.
Initial release as part of Wikibase.