Skip to content

Releases: wmde/WikibaseDataModel

6.2.0

18 Oct 15:41
Compare
Choose a tag to compare
  • Raised minimum PHP version to 5.5
  • Added basic support for foreign EntityIds
    • Added isForeign, getRepository and getLocalPart to EntityId
    • The constructor of EntityId was made public
    • Added static EntityId::splitSerialization and EntityId::joinSerialization
    • getNumericId throws an exception for foreign EntityIds
    • Added documentation for foreign EntityIds

6.1.0

19 Jul 12:37
Compare
Choose a tag to compare
  • Added optional index parameter to Statement::addStatement.
  • Added Int32EntityId interface.
    • ItemId and PropertyId now implement Int32EntityId.
    • ItemId and PropertyId construction now fails for numbers larger than 2147483647.
  • Added an id element containing the full ID string to the EntityIdValue::getArrayValue
    serialization.
  • Fixed ByPropertyIdArray iterating the properties of non-traversable objects.

6.0.1

27 Apr 08:43
Compare
Choose a tag to compare

Fixed ItemId and PropertyId not rejecting strings with a newline at the end.

6.0.0

10 Mar 17:51
Compare
Choose a tag to compare

This release removes the long deprecated Entity base class in favor of much more narrow interfaces.

Breaking changes

  • Removed Entity class (deprecated since 1.0)
  • Item and Property no longer extend Entity
    • Removed getLabel, getDescription, getAliases, getAllAliases,
      setLabels, setDescriptions, addAliases, setAllAliases,
      removeLabel, removeDescription and removeAliases methods
  • Item::getLabels and Property::getLabels now return a TermList
  • Item::getDescriptions and Property::getDescriptions now return a TermList
  • Removed clear methods from Item and Property
  • StatementListProvider, LabelsProvider, DescriptionsProvider, AliasesProvider and
    FingerprintProvider now give the guarantee to return objects by reference
  • TermList and AliasGroupList no longer throw an InvalidArgumentException for invalid language codes.
    • getByLanguage throws an OutOfBoundsException instead.
    • removeByLanguage does nothing for invalid values.
    • hasTermForLanguage and hasGroupForLanguage return false instead.

Additions

  • Item and Property now implement LabelsProvider, DescriptionsProvider and AliasesProvider
  • Added Item::getAliasGroups and Property::getAliasGroups

5.1.0

08 Mar 15:46
Compare
Choose a tag to compare

This release significantly reduces the memory footprint when entities are cloned.

  • Item::copy and Property::copy do not clone immutable objects any more
  • Deprecated FingerprintHolder and StatementListHolder

5.0.2

23 Feb 09:44
Compare
Choose a tag to compare

Fixed regression in ReferenceList::addReference and the constructor possibly adding too many objects

5.0.1

18 Feb 16:54
Compare
Choose a tag to compare
  • Fixed regression in ReferenceList::removeReferenceHash possibly removing too many objects
  • ReferenceList::unserialize no longer calls the constructor

5.0.0

15 Feb 16:53
Compare
Choose a tag to compare
  • Removed Claims class (deprecated since 1.0)
  • Removed getClaims and setClaims methods from Entity, Item and Property (deprecated since 1.0)
  • Removed HashableObjectStorage class (deprecated since 4.4)
  • ReferenceList no longer derives from SplObjectStorage
    • Removed addAll, attach, contains, detach, getHash, getInfo, removeAll,
      removeAllExcept and setInfo methods
  • ReferenceList no longer implements ArrayAccess
    • Removed offsetExists, offsetGet, offsetSet and offsetUnset methods
  • ReferenceList no longer implements Iterator
    • Removed current, key, next, rewind and valid methods
  • ReferenceList now implements IteratorAggregate
    • Added getIterator method
  • Removed ReferenceList::removeDuplicates
  • ReferenceList::addReference now throws an InvalidArgumentException for negative indices
  • Added EntityDocument::equals, and EntityDocument now implements Comparable
  • Added EntityDocument::copy
  • Fixed Property::clear not clearing statements
  • TermList now skips and removes empty terms
  • Deprecated ByPropertyIdArray

4.4.0

20 Jan 15:18
Compare
Choose a tag to compare
  • Added ItemIdParser
  • Added ReferenceList::isEmpty
  • Added ReferencedStatementFilter::FILTER_TYPE constant
  • Added EntityRedirect::__toString
  • Deprecated HashableObjectStorage
  • SnakRole enum is not an interface any more but a private class

4.2.0

26 Aug 19:04
Compare
Choose a tag to compare
  • Added EntityRedirect
  • Added EntityIdParser and EntityIdParsingException
  • Added BasicEntityIdParser
  • Added DispatchingEntityIdParser
  • Removed no longer needed dependency on diff/diff