Page MenuHomePhabricator

Hard-deprecate use of disabled variables
Closed, ResolvedPublic

Description

We have three disabled variables. Two of them, old_text and old_html, were disabled in 2009 (!) with rEABFce47bca4a8fde0a0e99f8241b93a1b1955ffa028. A pretty error message was added with rEABF79ec4ebf8b40925ea0d1f1220e2d877b901781ea last year, but any filter using them was already broken.
The last one, minor_edit, was removed with r296268 in 2016, and disabled with rEABF921db0397e21ab75c18fdc452d417bd3537b5c25 last year.

AbuseFilterVariableHolder has:

$this->logger->warning(
	"Disabled variable $varName requested. Please fix the filter as this will be removed soon."
);

Now it's time to make the warning state that those variables are deprecated for real since 1.34, and also add the filter ID to the message. Since 1.35, that should throw an exception (which BTW, will be swallowed when parsing a filter).

Note that there are several uses in production (logstash), but we don't know for what filters.

Event Timeline

Change 539545 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Hard-deprecate requesting disabled variables

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

Change 539545 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Hard-deprecate requesting disabled variables

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

Change 540864 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Remove disabled variables deprecation

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

Change 540864 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Remove disabled variables deprecation

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