Page MenuHomePhabricator

Use Wikibase/DataModel 3.0
Closed, ResolvedPublic


Use data model version 3.0. This is intended for tracking issues blocking the use of 3.0, as well as tracking tasks that are blocked on the use of 3.0.

Breaking changes

Tick checkboxes if the breaking change has been adapted in Wikibase.

The concept of Claim is no longer modelled:

  • The Claim class itself has been removed, though Claim is now a temporary alias for Statement
  • Claim::RANK_TRUTH have been removed
  • Statement no longer takes a Claim in its constructor
  • Statement::setClaim and Statement::getClaim have been removed
  • Removed ClaimList
  • Removed ClaimListAccess
  • Removed addClaim, hasClaims and newClaim from all entity classes

Phasing out of Claims:

  • Claims::addClaim no longer supports setting an index
  • Removed Claims::getBestClaims, use StatementList::getBestStatements instead
  • Removed Claims::getByRank and Claims::getByRanks, use StatementList::getByRank instead
  • Removed Claims::getMainSnaks, use StatementList::getMainSnaks instead
  • Removed Claims::getClaimsForProperty, use StatementList::getWithPropertyId instead
  • Removed Claims::getHashes
  • Removed Claims::getGuids
  • Removed Claims::equals (and Claims no longer implements Comparable)
  • Removed Claims::getHash (and Claims no longer implements Hashable)
  • Removed Claims::hasClaim
  • Removed Claims::isEmpty, use StatementList::isEmpty instead
  • Removed Claims::indexOf, use StatementList::getFirstStatementWithGuid or StatementByGuidMap instead
  • Removed Claims::removeClaim

Other breaking changes:

  • Removed Snaks interface, use SnakList instead
  • Removed previously deprecated Entity::getAllSnaks, use StatementList::getAllSnaks instead
  • Removed previously deprecated EntityId::getPrefixedId, use EntityId::getSerialization instead
  • Removed previously deprecated Property::newEmpty, use Property::newFromType or new Property() instead
  • Renamed StatementList::getWithPropertyId to StatementList::getByPropertyId
  • Renamed StatementList::getWithRank to StatementList::getByRank
  • Added EntityDocument::setId
  • Entity::setLabel and Entity::setDescription no longer return anything
  • Reference and ReferenceLists no longer can be instantiated with null

Event Timeline

daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel added a subscriber: daniel.
Lydia_Pintscher set Security to None.

@Bene all subtasks of this have been resoved. Are there more? If so, can you please add them?

The actual switch is done, but we may want to use this ticket to track clean-ups (removal of now deprecated stuff, most notably the Claim alias). The checkboxes in the tickets description should be updated when doing this. Most of them can already by marked as "done" because I did the required changes weeks ago.

I find it odd we had a ticket for this. We never had that before, and are not doing it for other components either AFAIK. After all, what needed doing was one small commit that took perhaps 30 minutes to create, was not widely disruptive and did not need a very high degree of coordination.

The actual switch @JeroenDeDauw refers to was done in An about 100 lines patch, mostly search & replace. Technically we can close this ticket as resolved. But as noted above I would like to have a place where we can track related code clean ups (for example replacement of deprecated code in Wikibase.git). Tracking is not needed to track volunteers time but to track reviewers time, you know?

Change 219022 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Replace Claim alias with Statement

thiemowmde removed a project: Patch-For-Review.
thiemowmde added a project: Patch-For-Review.
thiemowmde removed a subscriber: gerritbot.

So much about "there are no conflicts in Phabricator". WTF.

Change 219037 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Replace Claim alias in StatementGroupListView

It is odd to work on a "tracking" ticket. And it does actually not track anything anymore. Can you please add the remaining todo's as subtasks of this task?
In general I find it useful to have the work that needs to be done in order to use a new component (especially DataModel) tracked on Phabricator. IIRC we had quite some problems with using 2.0 so having the adaption to breaking changes tracked makes sense.

Change 219037 merged by Jeroen De Dauw:
Replace Claim alias in StatementGroupListView

Change 219022 merged by jenkins-bot:
Replace Claim alias with Statement

Addshore claimed this task.
Danny_B renamed this task from Use Wikibase/DataModel 3.0 (tracking) to Use Wikibase/DataModel 3.0.Jul 29 2016, 4:17 PM
Danny_B removed a project: Tracking-Neverending.