mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 21:44:12 +08:00
b41d9fb0e7
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. |
||
---|---|---|
.. | ||
Content | ||
Middleware | ||
AdminServiceProvider.php | ||
routes.php |