Simple forum software for building great communities.
Go to file
Franz Liedke d97f7136df Inject dependencies when firing events, not before
The event subscriber approach means that dependencies have to be
injected (and thus instantiated, along with all *their* dependencies) at
the time of registering event listeners - even when events are never
fired within a request's lifecycle.

This is unnecessary and causes more classes than necessary to be loaded.

In this case, we can explicitly register event listeners that will
resolve their dependencies when the event is fired, not before.

Refs #1578.
2018-12-13 02:01:50 +01:00
framework/core Inject dependencies when firing events, not before 2018-12-13 02:01:50 +01:00