Provide a Taggable interface
authorPiotr Miazga <piotr@polishdeveloper.pl>
Thu, 28 Feb 2019 17:24:10 +0000 (18:24 +0100)
committerPiotr Miazga <piotr@polishdeveloper.pl>
Mon, 18 Mar 2019 22:10:06 +0000 (23:10 +0100)
commitfd24be4fc537497531f1b1dad9c8bb7b6fb81ff0
treec338e5818dc653caf617c41803cceb711975125b
parent5612194879bd4f5c7d3e7c75d42b08bf91b84428
Provide a Taggable interface

The Taggable interface defines how to tag objects in MediaWiki.
For now there are only two Taggable objects:
 - RecentChange
 - ManualLogEntries

This interface should be used in places where we want to optionally
tag things, for example:
 We want to tag all mobile web actions with 'web mobile edit'.

With that interface, we will be able to expect a Taggable object,
and call `addTags()` when we need to, without having a special check
to verify is it RecentChange, or is it ManualLogEntry. We will only
expect a Taggable object.

Additionally, added @deprecated note to ManualLogEntries::setTags()
as each call to this method will override all previous tags. This
action can be harmfull to parts of code that conditionally add tags.
If object was tagged in some way, we should preserve those tags.

If there are any special cases, where we want to override all tags,
we should provide `resetTags()` method.

Bug: T215675
Change-Id: Ia4c019db8ca6f37ce0f86bf7d134d6f1713daf56
RELEASE-NOTES-1.33
autoload.php
includes/changes/RecentChange.php
includes/changetags/Taggable.php [new file with mode: 0644]
includes/logging/LogEntry.php