Page MenuHomePhabricator

QueryAbuseFilters: Support formatversion=2
Closed, ResolvedPublicFeature

Description

This API module currently hardcodes boolean values as empty strings, e.g.:

$entry['enabled'] = '';

These should be replaced with actual boolean values, so that the empty string is returned in formatversion=1 and true is returned in formatversion=2:

$entry['enabled'] = true;

Additionally, since this would be a minor breaking change, we could also return an array instead of an imploded string for the actions property:

$entry['actions'] = $filter->getActionsNames();

As long as we notify users of the change via User-notice, I think this is worthwhile from the perspective of making the API module more future-proof.

Event Timeline

Dragoniez changed the subtype of this task from "Task" to "Feature Request".Aug 24 2026, 3:08 PM

Change #1337180 had a related patch set uploaded (by Dragoniez; author: Dragoniez):

[mediawiki/extensions/AbuseFilter@master] QueryAbuseFilters: Support formatversion=2

https://gerrit.wikimedia.org/r/1337180

Change #1337180 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] QueryAbuseFilters: Support formatversion=2

https://gerrit.wikimedia.org/r/1337180

I will move User-notice to the parent task because there are cross-task changes that need to be announced. Thanks!