Page MenuHomePhabricator

Emit a PageProtectionChangedEvent when page protection expires
Open, MediumPublicFeature

Description

PageProtectionChangedEvent should inform listeners about all changes to page protection status, but it is currently not being triggered when a temporary protection expires.

Considerations:

  • Expiry may not be noticed immediately be the system, it can be discovered "passively" when checking the protection status at some later time. So these events cannot be expected to be emitted at the nominal time of expiry, but "eventually", some time later.

Event Timeline

"Garbage collection" of expired page restrictions seems to be done by WikiPage::doUpdateRestrictions() calling Title::purgeExpiredRestrictions(), ie. it will be called whenever someone modifies page protection settings (for any page). For a large wiki, that happens a lot so you can assume purging will happen within hours of expiry. For small wikis, it could be delayed arbitrarily.

(I'm a bit surprised we don't use a periodic maintenance script for this.)

aaron changed the subtype of this task from "Task" to "Feature Request".Oct 14 2025, 4:37 PM
Atieno triaged this task as Medium priority.