mediawiki-extensions-AbuseF.../includes
Daimona Eaytoy 904d9cddbb Represent Consequences with command objects
The consequence-taking logic is moved away from AbuseFilterRunner, to
dedicated classes. There's now one class per consequence, encapsulating
everything it needs to take the consequence.

Several interfaces allow customizing different types of consequences.
Every "special check" in AbuseFilter was generalized to use these
interfaces, rather than knowing how to handle each consequence.

Adding more consequences from other extensions will also be easier, and
it should happen via a hook (not a global), returning a class that
implements Consequence. The BCConsequence class was temporarily added
for legacy custom consequences.

A ConsequenceFactory class is added to instantiate consequences; this
would possibly benefit from using ObjectFactory, but it doesn't because
it would also reduce readability (although we might do that in the
future).

These classes are still not covered by unit tests, and this is left to
do for later. The new unit tests should mostly replace
AbuseFilterConsequencesTest. @covers tag were added to keep the status
quo (i.e. code that was considered covered while in AbuseFilterRunner
will still be considered covered), although we'll have to adjust them.

Change-Id: Ia1a9a8bbf55ddd875dfd5bbc55fcd612cff568ef
2020-11-25 17:35:36 +00:00
..
api Remove AbuseFilter::getFilter 2020-11-19 15:11:32 +00:00
Consequence Represent Consequences with command objects 2020-11-25 17:35:36 +00:00
Filter Introduce a service for saving filters 2020-11-20 22:33:21 +01:00
Hooks Add typehints to hook handlers 2020-10-28 11:37:07 +01:00
LogFormatter Move log formatters to a separate directory and namespace 2020-10-07 16:25:38 +02:00
pagers Merge "Divide AbuseFilterPermissionManager::canSeeLogDetails" 2020-11-04 10:32:46 +00:00
parser Handle DUNDEFINED in array offsets 2020-11-18 14:20:49 -08:00
ParserNS Introduce AbuseFilterParserFactory service 2020-10-31 21:19:00 +01:00
special Remove AbuseFilter::getFilter 2020-11-19 15:11:32 +00:00
VariableGenerator Use a WikiPage object when filtering edits on a non-existing Title 2020-11-18 20:13:46 +00:00
Views Introduce a service for saving filters 2020-11-20 22:33:21 +01:00
Watcher Create a base interface for watchers 2020-11-20 23:34:20 +01:00
AbuseFilter.php Introduce a service for saving filters 2020-11-20 22:33:21 +01:00
AbuseFilterChangesList.php Stop using the Revision class 2020-02-26 15:39:12 +00:00
AbuseFilterHooks.php Use a WikiPage object when filtering edits on a non-existing Title 2020-11-18 20:13:46 +00:00
AbuseFilterPermissionManager.php Introduce a FilterValidator 2020-11-18 01:41:31 +00:00
AbuseFilterPreAuthenticationProvider.php Factor out variables-related methods 2020-02-07 20:27:26 +00:00
AbuseFilterRunner.php Represent Consequences with command objects 2020-11-25 17:35:36 +00:00
AbuseFilterServices.php Represent Consequences with command objects 2020-11-25 17:35:36 +00:00
AbuseFilterVariableHolder.php Rewrite the VariableHolder code to translate deprecated variables 2020-09-29 15:06:14 +00:00
AFComputedVariable.php Remove exclusions for new PHPCS rules, bump PHPCS to 33.0.0 2020-11-03 19:26:11 +00:00
BlockAutopromoteStore.php Add a service to retrieve the filter user 2020-10-26 14:06:53 +01:00
CentralDBManager.php Add a FilterLookup service 2020-11-18 01:17:47 +00:00
CentralDBNotAvailableException.php Add a service to retrieve the central DB 2020-10-31 12:32:46 +00:00
ChangeTagger.php Inject ChangeTagsManager to ChangeTagger 2020-10-21 16:30:43 +02:00
ChangeTagsManager.php Add a service to retrieve the central DB 2020-10-31 12:32:46 +00:00
ConsequencesFactory.php Represent Consequences with command objects 2020-11-25 17:35:36 +00:00
FilterCompare.php Introduce a FilterCompare service 2020-11-18 11:52:44 +00:00
FilterImporter.php Add an interface for exporting/importing filters 2020-11-18 22:06:09 +00:00
FilterLookup.php Add an interface for exporting/importing filters 2020-11-18 22:06:09 +00:00
FilterProfiler.php Adjust code coverage 2020-11-19 22:40:26 +00:00
FilterStore.php Introduce a service for saving filters 2020-11-20 22:33:21 +01:00
FilterUser.php Add a service to retrieve the filter user 2020-10-26 14:06:53 +01:00
FilterValidator.php Introduce a FilterValidator 2020-11-18 01:41:31 +00:00
InvalidImportDataException.php Adjust code coverage 2020-11-19 22:40:26 +00:00
KeywordsManager.php Add tests for retrieving RC variables 2020-10-04 12:43:04 +00:00
ServiceWiring.php Represent Consequences with command objects 2020-11-25 17:35:36 +00:00
TableDiffFormatterFullContext.php Fix coding conventions exclusion rules 2018-04-20 08:40:18 +00:00