- PSR-14 is now supported.
- Classes and interfaces renamed to match PSR terminology.
- Buffered event emitter was added.
- Event emitting now respects the order in which the listeners were added in addition to priority.
- Emitter::emitBatch now uses a foreach instead of array map to allow better exception handling.
- EmitterAwareInterface: an interface to be EmitterInterface aware.
- EmitterAwareTrait: a default implementation to EmitterAwareInterface
- EmitterTrait: The EmitterAware interface was extracted from this, which it now uses.
- EventInterface: an interface is derived from the AbstractEvent class to allow more flexible type hinting and custom implementations. All the code expecting an AbstractEvent now expect an EventInterface implementation, however AbstractEvent covers the most use cases.
- Event::named: named construtor to create string based events
- CallbackListener::fromCallable: create a callback listener from a callable.
- ListenerAcceptorInterface: An interface (distilled from the EmitterInterface) to only focus on accepting listeners.
- ListenerProviderInterface: An interface to focus on providing the Emitter with new listeners.
- EmitterInterface::useListenerProvider: Allows you to use an implementation of the ListenerProviderInterface to add listeners.
- EmitterInterface::releaseGeneratedEvents: Eases the way events are released from GeneratorInterface implementations.
- All event typehints have been changed from AbstractEvent to EventInterface
- PriorityEmitter: this functionality is now part of the standard emitter.
- The Emitter now checks if propagation has been stopped before invoking the first listener.
- Renamed ListenerAbstract to AbstractListener
- Wildcard listeners: When specifying
*
as the event name to listen to it will listen to all events. Wildcard listeners will be invoked AFTER named event listeners.
- Various code style fixes.
- Corrected priority emitter sorting.
- Listener invocation is now responsible for retrieving the events attached to an event name. [internal]
- EmitterInterface: an interface is derived from the Emitter class to allow more flexible type hinting and custom implementations. All the code expecting an Emitter now expect an EmitterInterface implementation.