Page MenuHomePhabricator

[Task] Allow central datatype registry to also manage callbacks per value type.
Closed, ResolvedPublic

Description

In many places, like when creating formatters, we fall back to handling based on the value type if no specific handling is defined for a data type. Factory callbacks for value types are currently hard coded. To ensure consistency with the registered data types, improve locality of the factory code, and allow new value types to be registered dynamically, factory callbacks for value types should be defined the same way as data types, namely in $wgWBRepoDataTypes and $wgWBClientDataTypes.

The two global arrays should be changed to use the convention already implemented in some places that allow handlers per datatype as well as fallbacks to value types: data types use the "PT:" prefix, value types use the "VT" prefix.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

daniel created this task.Nov 12 2015, 9:00 PM
daniel claimed this task.
daniel raised the priority of this task from to Normal.
daniel updated the task description. (Show Details)
daniel added subscribers: Ricordisamoa, gerritbot, daniel and 2 others.
thiemowmde closed this task as Resolved.Dec 17 2015, 11:38 AM
thiemowmde added a subscriber: thiemowmde.

@daniel, I believe this is done via https://gerrit.wikimedia.org/r/253321, which is tracked in the parent T118499: [Task] Define RDF mappings per value type instead of this subtask. Please reopen if I'm wrong.

@thiemowmde you are right, this is done now, thanks!