In order for PagedMovedEvent to replace PageMoveCompleteHook implementations, it should carry reason data, and provide getters to expose it.
References
In order for PagedMovedEvent to replace PageMoveCompleteHook implementations, it should carry reason data, and provide getters to expose it.
References
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| PageMovedEvent: add move reason information. | mediawiki/core | master | +20 -4 |
Here I'm thinking of adding
getReason(): string|null
Does the naming track with you? IIRC we discussed about overlap between reasons and comments, but I don't remember which one is the idiomatic/modern terminology for this case.
Thanks.
This is a requirement for T393890: EventBus: replace PageMoveCompleteHook with PageMovedEvent
Yes, except that it should not be nullable. The reason can be empty, but not null. Just do it the same way as it's done on PageDeletedEvent.
IIRC we discussed about overlap between reasons and comments, but I don't remember which one is the idiomatic/modern terminology for this case.
It's worse... "edit summaries" and "edit comments" are the same. User actions (delete, undelete, move, etc) often have a "reason", which is called a "comment" in the log entry. And then events can also have a "cause", which is not controlled by the user, just constants used in the code.
Anyway. It's called a "reason" on MovePage and on PageDeletedEvent, so I think we should be consistent with that.
Change #1146059 had a related patch set uploaded (by Gmodena; author: Gmodena):
[mediawiki/core@master] PageMovedEvent: add move reason information.
Change #1146059 merged by jenkins-bot:
[mediawiki/core@master] PageMovedEvent: add move reason information.