-
-
Notifications
You must be signed in to change notification settings - Fork 834
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
ed02eed
commit b41d9fb
Showing
4 changed files
with
80 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters