Skip to content

[FEAT] Auto-generated Bus Events based on Lifecycle Hook Stages #107

Description

@kon14

Is your feature request related to a problem? Please describe.

Bus events are currently broadcasted explicitly.
While we obviously can't always avoid this, we should make sure that certain key event types are always emitted in a predetermined and consistent way.

That should not only help us avoid bugs due to unmaintained module-specific code, but also create a solid foundation for third party modules being capable of assuming a specific event is going to be available for them to subscribe to.

Describe the solution you'd like

For instance, we could be emitting a namespaced event during each (or some) module lifecycle step.
That way we can not only safely assume that events are actually emitted for (almost) every single module, but also that the event name itself is also properly formatted (eg using the target "step" name as well as the module name).

The problem with relying on lifecycle hooks for this is that any third party modules making direct use of ConduitServiceModule (instead of ManagedModule and ModuleManager) are not going to take advantage of this.

Which isn't really a big deal as long as our own official modules either make use of ManagedModule or explicitly emit these events too.
This last bit is required in order for third party modules safely assuming that the events are consistently there across official modules.

Describe alternatives you've considered

We could alternatively publish configuration related events through Config.
That should also cover direct inheritors of ConduitServiceModule at the expense of being extremely limited in the amount of event types we can automate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions