bengor-file/simple-bus-bridge
Adapter bridge that integrates BenGorFile's File library with Matthias Noback's SimpleBus, enabling File commands/events to be dispatched through SimpleBus. Install via Composer and run tests with PHPSpec.
simplebus/simple-bus), which is a lightweight messaging library. Laravel does not natively support SimpleBus, so this would introduce a new dependency stack (SimpleBus + File library).// Example: Register SimpleBus in Laravel
$this->app->bind('SimpleBus\Message\Bus\Bus', function ($app) {
return new SimpleBus\Message\Bus\Bus(
new SimpleBus\Message\Bus\Plugin\RouterPlugin(
new SimpleBus\Message\Bus\Plugin\FirstPlugin(),
new SimpleBus\Message\DispatchingRouter()
)
);
});
composer require bengor-file/simple-bus-bridge simplebus/simple-bus bengor-file/file
// Listen for SimpleBus messages and emit Laravel events
event(new FileProcessed($filePath));
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Disk failure (File library) | Lost messages/data | Use redundant storage (e.g., S3 + local). |
| SimpleBus message corruption | Silent failures | Add checksum validation for messages. |
| PHP 5.5 deprecations | Breaking changes in Laravel 10+ | ** |
How can I help you explore Laravel packages today?