Page MenuHomePhabricator

Correctly reference the "Abuse Filter" extension in maintenance scripts
Closed, ResolvedPublic

Description

So we can avoid issues like:

mwscript extensions/AbuseFilter/maintenance/addMissingLoggingEntries.php --wiki=eswiki
The following extensions are required to be installed for this script to run: AbuseFilter. Please enable them and then try again.

or use Abuse Filter in the $this->requireExtension( 'AbuseFilter' ); of both maintenance scripts of the extension.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 9 2018, 9:50 PM
Huji added a comment.Feb 10 2018, 12:41 AM

I also vote for using the no-space version (i.e. 'AbuseFilter') universally.

Change 409481 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/extensions/AbuseFilter@master] Rename Abuse Filter to AbuseFilter in extension.json

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

You can use $this->requireExtension( 'Abuse Filter' ); to make it working.

When renaming please update use of ExtensionRegistry::isLoaded in ContentTranslation and Flow

https://codesearch.wmflabs.org/search/?q=%5B%22'%5DAbuse%20Filter%5B%22'%5D&i=nope&files=&repos=

Yes. I don't know what would be better @Umherirrender hence this bug. Usually I'd go with AbuseFilter but if that is going to break a lot of things... @Kghbln What do you think? Regards.

Huji added a comment.Feb 10 2018, 4:12 PM

@MarcoAurelio I started the patch the other way around, but coming to think of it, it is best if we just change two maintenance scripts and confine the changes to just one extension, than to change many extensions. So I revised my patch.

Huji renamed this task from Rename Abuse Filter to AbuseFilter in extension.json to Correctly reference the "Abuse Filter" extension in maintenance scripts.Feb 10 2018, 4:13 PM
Umherirrender closed this task as Resolved.Feb 10 2018, 4:50 PM
Umherirrender assigned this task to Huji.
Umherirrender triaged this task as Normal priority.