| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Drop opis/json-schema, no longer needed | mediawiki/vendor | master | +7 -27 K |
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Jdforrester-WMF | T293710 Remove opis/json-schema from MW vendor now that it's no longer used, everyone's on justinrainbow/json-schema | |||
| Declined | None | T306059 Migrate Metrics Platform PHP library from justinrainbow/json-schema to opis/json-schema | |||
| Declined | None | T388380 Migrate Community Configuration PHP library from justinrainbow/json-schema to opis/json-schema |
Event Timeline
Before we can remove it from MediaWiki-Vendor various usages need removing. Sub tasks need creating, so will do that later.
Marking stalled because it's going to be a while before this can be done itself
There is also a third in require-dev of MediaWiki-Vendor of swaggest/json-schema... Which seems to be CirrusSearch related according to rMWVDf15ef20aab65: Add CirrusSearch dev dependency to require-dev.
Looks like it was removed in rECIR251c19585235: Don't validate request event schema from CirrusSearch, so we should do that too from MediaWiki-Vendor
opis/json-schema isn't a drop in replacement for justinrainbow/json-schema:
opis/json-schema works with Plain Ol' PHP Objects (POPOs) out of the box whereas justinrainbow/json-schema works with POPOs and ordered dictionaries (and transparently marshalls between the two). opis/json-schema also (helpfully!) throws a number of exceptions when passed invalid JSON Schemas.
Further, opis/json-schema supports JSON Schema draft-06 onwards whereas justinrainbow/json-schema supports draft-03/04.
To migrate each usage of justinrainbow/json-schema, we'll need to:
- Migrate the schema from draft $foo to at least draft-06
- Ensure that the schema and data are passed in as POPOs
- Ensure that exceptions are being handled appropriately
Since no Wikimedia Project is using opis/json-schema anymore (code-search), should we decline this task?
It seems we have all found our way to justinrainbow/json-schema (code-search).
Either way around is fine, but I understood that the justinrainbow version was less good even if you and others could work around it.
Unless a new strong practical argument pops up in favor of opis/json-schema, it seems that the cost of switching would far outweigh the benefit of doing so. Especially as v6 of justinrainbow/json-schema seems to have better i18n support.
We talked internally, and I'm about to decline our subtask T388380. There are several more important construction sites in CommunityConfiguration than fiddling with the schema, like T371028, T367516, T370534 (T410459). I hope we will somehow find the time to get to them soonish, but I doubt that -unless anything changes- we ever get to switching the schema library.
So my vote would be for declining this task.
Change #1230400 had a related patch set uploaded (by Jforrester; author: Jforrester):
[mediawiki/vendor@master] Drop opis/json-schema, no longer needed
Change #1230400 merged by jenkins-bot:
[mediawiki/vendor@master] Drop opis/json-schema, no longer needed