Page MenuHomePhabricator

[Task] Create ValueParserFactory integration test for the global wgValueParsers setting
Closed, DeclinedPublic

Description

In https://gerrit.wikimedia.org/r/#/c/223061/6/repo/Wikibase.php the wgValueParsers setting and the code consuming it (currently in the ParseValue constructor) was changed. Instead of a registering value parsers via "parser names" (a concept that does not exist anywhere except for this single place in the code base) they are now registered via their data type names.

Before:

  • wikibase-entityid
  • quantity
  • time
  • globecoordinate
  • null
  • monolingualtext

After:

  • wikibase-entityid is deprecated in favor of wikibase-item and wikibase-property.
  • quantity
  • time
  • globecoordinate is deprecated in favor of globe-coordinate.
  • monolingualtext
  • null is deprecated in favor of commonsMedia, string and url.

A new integration test should make sure that nobody removes the now deprecated keys because that would be a major breaking change to the wbparsevalue API module. This test can not be part of ParseValueTest because this unit test is now independent from the global setting.

Event Timeline

thiemowmde raised the priority of this task from to Low.
thiemowmde updated the task description. (Show Details)
JanZerebecki renamed this task from Create ValueParserFactory integration test for the global wgValueParsers setting to [Task] Create ValueParserFactory integration test for the global wgValueParsers setting.Sep 10 2015, 7:49 PM
JanZerebecki added a project: Technical-Debt.
JanZerebecki set Security to None.
JanZerebecki moved this task from incoming to ready to go on the Wikidata board.

@Lydia_Pintscher, is it worth spending time on a test that makes sure …action=wbparsevalue&parser=wikibase-entityid, …parser=globecoordinate, and …parser=null will work forever? I mean, even if somebody removes these three lines of configuration some day, the worst thing that will happen is that some third-party services relying on our parsers might start failing. Do we care? The parser=… parameter in question is marked as deprecated for almost 3 years. Services relying on it are outdated anyway.

We are currently not tracking what datatypes a.k.a. parsers are used from the wbparsevalue module. That might be required before removing anything.