The EditFilterMergedContent hook (used e.g. by AbuseFilter, ConfirmEdit, SpamBlacklist and several others) has a problematic signature and it should be replaced with a new hook with the following changes applied (at least):
- There shouldn't be a $context parameter, as that drags in too many dependencies.
- It should pass the WikiPage being edited (note, long-term we may want to use PageIdentity here instead, unsure if it's already a good time to do that)
- It should probably pass a PreparedUpdate too (see T242249, T242249#7485554, T286140 and T288639 for context)
- It should pass a StatusValue, not a Status
- It should have a $slot parameter, since Wikibase (and perhaps others) already pass it (T288885)
- It should use Authority, not User
- It should have a single, clear-defined way to add errors. Currently, the code which checks the hook result is awful because the result can change depending on whether the hook returned false, whether the Status is OK/good, and whether the status' value is set to something. Also, it shouldn't need to add the 'hookaborted' fallback message.