ez-php / events
Event dispatcher module for the ez-php framework — lightweight publish/subscribe event system
0.2.0
2026-03-15 03:47 UTC
Requires
- php: ^8.5
- ez-php/framework: 0.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^13.0
README
Event dispatcher module for the ez-php framework — lightweight publish/subscribe event system.
Requirements
- PHP 8.5+
- ez-php/framework ^1.0
Installation
composer require ez-php/events
Setup
Register the service provider:
$app->register(\EzPhp\Events\EventServiceProvider::class);
Usage
$dispatcher = $app->make(\EzPhp\Events\EventDispatcher::class); // Listen $dispatcher->listen('user.registered', function (Event $event) { // handle event }); // Dispatch $dispatcher->dispatch(new UserRegistered($user));
License
MIT — Andreas Uretschnig