In most pub/sub implementations I've seen, publishing an event when there are no subscribers fails silently. In the current implementation, I would have to wrap try/catch logic around all of my calls to $pub. I propose that $pub simply returns without an exception when there are no registered events. I believe this has two benefits:
- It simplifies the code that consumers have to write; no need for try/catch logic
- It promotes loose coupling; consumers don't have to worry about the state of the rest of the application.
I wanted to see if this idea has support before I create a pull request?