Download the PHP package memran/marwa-event without Composer
On this page you can find all versions of the php package memran/marwa-event. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download memran/marwa-event
More information about memran/marwa-event
Files in memran/marwa-event
Download memran/marwa-event
More information about memran/marwa-event
Files in memran/marwa-event
Vendor memran
Package marwa-event
Short Description Blazing-fast, PSR-14 compliant event dispatcher with Laravel-style ergonomics (no globals).
License MIT
Package marwa-event
Short Description Blazing-fast, PSR-14 compliant event dispatcher with Laravel-style ergonomics (no globals).
License MIT
Please rate this library. Is it a good library?
Informations about the package marwa-event
Marwa Event
Blazing-fast, PSR‑14–compliant event dispatch library with Laravel‑style ergonomics (no global helpers).
Performance-first, container-friendly, and simple to test.
Features
- ✅ PSR‑14 compliant: Uses
ListenerProviderInterface
andEventDispatcherInterface
- ⚡ Fast: Priority queues via
SplPriorityQueue
, no reflection on the hot path - 🧠 Smart listener resolution:
callable
,Class@method
,['Class','method']
, or invokable class — lazy-resolved - 🧩 Container-aware: Optional PSR‑11 container for listener instantiation
- 🧵 Stoppable events: Base
StoppableEvent
provided - 🧪 Testable: Clean, SOLID design with PHPUnit examples
Install
For local development with this repo:
Quick Start
Subscribers
Register:
Architecture
Contracts/StoppableEvent
— base class implementingStoppableEventInterface
withstopPropagation()
Contracts/Subscriber
— map events to methods with optional prioritiesResolver/ListenerResolver
— converts listener notations into callables (container-aware)Core/ListenerProvider
— per-event priority queues + cached type graph for parent/interfacesCore/EventDispatcher
— minimal synchronous dispatcher, optional exception swallowingBus/EventBus
— thin facade-like API:listen()
,subscribe()
,dispatch()
,forget()
API
Listener formats
callable
—function (MyEvent $e) {}
"Class@method"
["Class", "method"]
"Class"
— invokable class
Testing
Example Test
Production Notes
- High priority values run first (max-heap)
- All event type matches are cached after the first dispatch
- Use PSR‑11 container to enable dependency-injected listeners
Versioning & Compatibility
- PHP
>= 8.1
- PSR‑14, PSR‑11 (optional)
License
MIT © Mohammad Emran.
All versions of marwa-event with dependencies
PHP Build Version
Package Version
The package memran/marwa-event contains the following files
Loading the files please wait ....