bengor-user/simple-bus-bridge
Adapter bridge integrating BenGorUser with Matthias Noback’s SimpleBus, wiring user command/event handling into the SimpleBus message bus. Install via Composer; fully tested with PHPSpec and documented in the core BenGorUser User library.
Event::dispatch()) by wrapping events in SimpleBus messages.AppServiceProvider may need extensions.return_type_declaration or typed_properties adjustments).Registered, PasswordReset) to identify candidates for SimpleBus.Event::dispatch()) and SimpleBus ($bus->dispatch()).// config/app.php
'providers' => [
SimpleBusBridgeServiceProvider::class, // Hypothetical; may need custom binding
];
$this->app->singleton(SimpleBus\MessageBus::class, function ($app) {
return new SimpleBus\MessageBus([
new SimpleBus\Message\Dispatcher\CallableMessageDispatcher(),
// Add handlers for User events
]);
});
BenGorUser/User events are compatible with SimpleBus message contracts.create_function, each).BenGorUser/User and SimpleBus for breaking changes.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| SimpleBus handler crashes | User events lost/duplicated | Implement retry logic (e.g., dead-letter queues). |
| PHP version incompatibility | Package fails to load | Use composer.json overrides or fork. |
| Laravel event listener conflicts | Duplicate event processing | Use unique event namespaces. |
| Database connection issues | Async handlers fail silently | Add health checks and alerts. |
| SimpleBus bus not initialized | Events silently dropped | Validate bus binding in service provider. |
How can I help you explore Laravel packages today?