broadway/broadway-saga
Experimental Broadway component that adds saga support to your application, offering saga state and metadata management plus a manager for waking up and starting sagas. Proof-of-concept and highly experimental, so intended for early exploration rather than production use.
Bottom line: This is a proof-of-concept, explicitly labelled "highly experimental," and the repository is archived. A TPM should treat it as a reference architecture, not a dependency. The realistic leverage is design influence — its saga state/metadata model and its "manager that wakes and starts sagas" are worth copying into a small in-house Laravel package built on maintained primitives. Adopting broadway/broadway-saga directly into a production Laravel codebase should be rejected unless the application is already a committed Broadway event-sourcing shop, and even then the archive status is disqualifying without a funded fork.
Architecture fit
DomainMessage pipeline (the 0.9 breaking change moved saga handlers from raw events to DomainMessage). That means the app needs a Broadway CommandBus, event store, and event stream — a second persistence and dispatch stack living beside Eloquent, Laravel's queue, and Illuminate\Events.broadway/saga-state-mongodb in 0.4.0. There is no first-party relational/Eloquent state store, which is a real gap in a MySQL/Postgres Laravel estate.Integration feasibility
SagaState, a state repository, a saga-state factory, register saga types with the manager, then feed DomainMessages in.broadway/broadway ^2.3.1 and was last released in the PHP 7.x era (0.7.0 required PHP ≥ 7.1, 0.8.0 PHP ≥ 7.2). Modern Laravel (10/11/12) requires PHP 8.1+, and transitive PHP/Doctrine DBAL constraints will fight composer update; expect --ignore-platform-reqs hacks, which are a supply-chain smell.Technical risk
CommandBus, EventStore, and DomainMessage vocabulary; unwinding later means rewriting handlers and re-homing state.Key questions to put to the team
laravel-workflow, a Temporal PHP SDK, Symfony Workflow for state, or spatie/laravel-event-sourcing projectors — before taking on an archived PoC?Stack fit
Context/logging. That captures the value with none of the archive risk.Recommended path (red/yellow light): port the pattern, not the package
composer require resolving without platform overrides and one saga resuming from persisted state. Expect this to fail; the failure is the deliverable.SagaState (id, type, status, state payload, metadata, timestamps, version) and a SagaManager contract in our own namespace. Mirror the package's semantics so any future swap is mechanical.WakeSaga/AdvanceSaga jobs, Illuminate\Events subscriptions keyed by saga correlation ID, DB transaction around state transitions with optimistic-lock versioning.broadway/* dependency; keep the design doc and tests.Alternative path (green light): fork-and-pin
internal/broadway-saga, pin exact upstream SHA, add a Laravel service provider and config, and publish the Mongo state store requirement as an ADR. Assign a code owner and a re-review trigger on every PHP minor.Compatibility matrix
| Laravel capability | Compatibility | Note |
|---|---|---|
| Service providers / container | Manual | No auto-discovery; bind CommandBus and the saga manager yourself |
| Eloquent ORM | ❌ | Broadway persists via Doctrine DBAL; state store is a separate Mongo package |
Illuminate\Queue / Horizon |
⚠️ | Coexists, but Broadway workers are invisible to Horizon unless you instrument them |
Illuminate\Events |
✅ | Broadway events can be bridged; watch for double-dispatch |
| PHP 8.2–8.4 | ⚠️/❌ | Last constraints target PHP 7.x; verify or patch |
| Observability | ❌ | No OpenTelemetry/Sentry hooks; custom logging required |
Sequencing (if proceeding)
SagaManager interface) committed before any vendor code, so exit is cheap.Maintenance
Support
Scaling
retry_after and job timeouts. Set saga-level timeouts explicitly rather than inheriting queue defaults.Failure modes to design for, explicitly
Ramp-up
How can I help you explore Laravel packages today?