We need an event dispatcher that compiles into the container so it's fast to react to events even if there are a lot of subscribers. I imagine one method on the compiled container per event returning a list of services and their methods. Obviously, events will fire without methods but then again we can just use $container->get('event.subscribers.compiled.'. $event_name, NULL_ON_INVALID_REFERENCE)
instead of the default EXCEPTION_ON_INVALID_REFERENCE.
↧
Write a compiling dispatcher
↧