Page MenuHomePhabricator

Librarise Libs/JsonSchemaValidation or replace
Closed, DeclinedPublic

Description

Either the Libs/JsonSchemaValidation inside EventLogging should be moved out to a library, or if possible, one of the existing json schema libraries in MediaWiki-Vendor (opis/json-schema or justinrainbow/json-schema) should be used instead.

It seems various of the classes in Libs/JsonSchemaValidation have ancestry back in MediaWiki-extensions-JsonData; if we Librarize this code, we can use Composer to include the classes into both (and MediaWiki-Vendor for WMF production), rather than having duplicate code.

It's unclear if opis/json-schema or justinrainbow/json-schema can replace this code in either case, but at least factoring it out into a library would be a good step in the right direction... See also T293710: Remove opis/json-schema from MW vendor now that it's no longer used, everyone's on justinrainbow/json-schema

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Noting a few of these classes are used outside of EventLogging.

And there's the MediaWiki-extensions-JsonData which has numerous similarly named classes... See also T303132: Archive the JsonData extension

If someone has a better idea if opis/json-schema or justinrainbow/json-schema (preferably the latter) can replace the code, rather than factoring it out.. That'd be useful to know

WMF is trying to stop using on wiki schemas for EventLogging. From our perspective, we can and should remove any support in EventLogging for on wiki JSONSchemas. However there may be 3rd party wikis that use on wiki JSONSchemas via EventLogging, so I'm not sure if we can just do this.

In either case, removing JSONSChema support from EventLogging extension will be blocked until T259163: Migrate legacy metawiki schemas to Event Platform is totally finished anyway.

Aklapper added a subscriber: Ottomata.

@Ottomata: Removing task assignee as this open task has been assigned for more than two years - see the email sent to all task assignees on 2024-04-15.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!

I'm going to be bold and decline this task. Feel free to reopen if incorrect.