Plugins responding to the ProjectServiceBeforeActivation
event can forbid the change from inactive -> active
of a certain service if they wish to. However, the name of this event is very misleading, as it is also dispatched when going from active -> inactive
. Most of the time, plugins forbid activating a service because another mutually-exclusive service is already being used. It is the case for Mediawiki "legacy" and Mediawiki standalone, and also the case for Program Management and Backlog.
Forbiding active -> inactive
can lead to some inter-blocking situations. For example, when both Program and Backlog services are active due to being inherited from a template that has both of them active, none of them can be inactivated and the project admin becoms stuck with both forever.
Given that the only thing we wish to prevent is inactive -> active
, we should stop dispatching this event in the active -> inactive
transition. Its name would be correct, and it does not lead to inter-blocking situations.