Download the PHP package monkeyscloud/monkeyslegion-events without Composer
On this page you can find all versions of the php package monkeyscloud/monkeyslegion-events. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download monkeyscloud/monkeyslegion-events
More information about monkeyscloud/monkeyslegion-events
Files in monkeyscloud/monkeyslegion-events
Download monkeyscloud/monkeyslegion-events
More information about monkeyscloud/monkeyslegion-events
Files in monkeyscloud/monkeyslegion-events
Vendor monkeyscloud
Package monkeyslegion-events
Short Description High-performance PSR-14 event dispatcher with typed interceptors, attribute-based listeners, event sourcing, and dispatch metrics for the MonkeysLegion framework.
License MIT
Package monkeyslegion-events
Short Description High-performance PSR-14 event dispatcher with typed interceptors, attribute-based listeners, event sourcing, and dispatch metrics for the MonkeysLegion framework.
License MIT
Please rate this library. Is it a good library?
Informations about the package monkeyslegion-events
MonkeysLegion Events v2
High-performance PSR-14 event dispatcher with typed interceptors, attribute-based listeners, event sourcing, circuit breakers, and dispatch metrics for the MonkeysLegion framework.
Installation
Features
| Feature | Description |
|---|---|
| PSR-14 Compliant | Full EventDispatcherInterface + StoppableEventInterface |
| 5 PHP Attributes | #[Listener], #[Subscriber], #[ListenWhen], #[BeforeEvent], #[AfterEvent] |
| Priority + FIFO | Higher priority runs first; equal priority preserves registration order |
| One-Shot Listeners | once() — auto-removed after first invocation |
| Wildcard Listeners | Pattern matching: User* catches UserCreated, UserDeleted, etc. |
| Event Subscribers | Multi-event handler classes (Laravel + Symfony parity) |
| Stoppable Events | $event->stopPropagation() halts the listener chain |
| Interceptor Pipeline | NOVEL — Before/After hooks (AOP-style) |
| Conditional Listeners | NOVEL — #[ListenWhen] with guard method |
| Circuit Breaker | NOVEL — Auto-disable failing listeners after N failures |
| Event Store/Replay | NOVEL — Record & replay events for testing/debugging |
| Dispatch Metrics | NOVEL — Per-event timing and count tracking |
| Correlation IDs | NOVEL — Hex-based event tracing across request scope |
| Safe Mode | Catch listener exceptions instead of crashing |
| Batch Dispatch | Dispatch multiple events in sequence |
| ShouldQueue Marker | Flag listeners for async/queue processing |
| ShouldBroadcast | Flag events for WebSocket/SSE broadcasting |
| PHP 8.4 Native | Property hooks, backed enums, asymmetric visibility |
Quick Start
Attribute-Based Listeners
Conditional Listeners (Novel)
Interceptor Pipeline (Novel)
AOP-style before/after hooks that wrap the regular listener chain:
Global Interceptors
Event Subscribers
Wildcard Listeners
Stoppable Events
Event Store & Replay (Novel)
Dispatch Result & Metrics
Circuit Breaker (Novel)
Listeners that fail repeatedly are auto-disabled:
Safe Mode
Async/Queue Markers
Correlation Tracking
PHP 8.4 Features Used
| Feature | Where |
|---|---|
| Property Hooks | Event::$isPropagationStopped, Event::$name, EventMetrics, ListenerProvider::$count, EventStore::$size, EventDispatcher::$totalDispatches |
| Asymmetric Visibility | Event::$timestamp, Event::$correlationId, ListenerDescriptor |
| Backed Enum | EventType (Before/On/After) |
readonly classes |
DispatchResult, all Attributes |
match expressions |
EventType::label() |
new in initializers |
Event::$timestamp, ListenerDescriptor::$registeredAt |
| PHP 8 Attributes | 5 attributes across Attribute/ namespace |
Changelog
2.0.0 — Complete Rebuild
BREAKING CHANGE: Full API redesign from v1.
- Architecture: Replaced minimal PSR-14 shim with full interceptor-pipeline dispatcher
- 5 Attributes:
#[Listener],#[Subscriber],#[ListenWhen],#[BeforeEvent],#[AfterEvent] - Contracts:
ShouldQueue,ShouldBroadcast,EventSubscriberInterface - Interceptors:
InterceptorInterface,LoggingInterceptor,TimingInterceptor - Event Store: In-memory record & replay for testing/debugging/event sourcing
- Novel Features: Conditional listeners, circuit breaker, wildcard matching, correlation tracking, dispatch metrics, batch dispatch, safe mode
- PHP 8.4: Property hooks, backed enums, asymmetric visibility,
newin initializers - Tests: 59 tests, 119 assertions
Requirements
- PHP 8.4+
psr/event-dispatcher^1.0
Optional
psr/log^3.0 — ForLoggingInterceptor
License
MIT
All versions of monkeyslegion-events with dependencies
PHP Build Version
Package Version
The package monkeyscloud/monkeyslegion-events contains the following files
Loading the files please wait ...