New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

cboxdk/laravel-operations

Durable, multi-step operations for Laravel — a strict state machine with per-step progress, idempotent retries, and a stall sweep.
1,667 1

Larablocks Analysis

cboxdk/laravel-operations works with Laravel 12 and 13 (latest release v0.1.0, Jul 15, 2026).

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Jul 15, 2026)
  • 1,176 downloads a month (needs 10,000)
  • 1 GitHub star (needs 100)

State

Maintained
  • Last stable release: Jul 15, 2026.
  • 1 release in the last 12 months.
  • First released: Jul 15, 2026.
  • Monthly downloads: 1,176.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 29, 2026.

Install
composer require cboxdk/laravel-operations
Latest Version:v0.1.0
PHP:^8.4
Laravel:12 · 13
License:MIT
Last Updated:Jul 15, 2026
Links: GitHub  ·  Packagist
Maintainer: cboxdk

Cbox Operations

Durable, multi-step operations for Laravel — the operations engine behind long-running background work. Track a deploy, a provisioning run, or an import as a first-class record with a strict state machine, per-step progress, idempotent retries, and a stall sweep — instead of a black-box job.

use Cbox\Operations\Contracts\Operations;
use Cbox\Operations\DataObjects\{StartOperation, AdvanceStep, CompleteOperation};

$operations = app(Operations::class);

$op = $operations->start(new StartOperation(
    kind: 'deploy',
    targetType: 'workload',
    targetId: 'wl_123',
    steps: ['build', 'release', 'route'],
    expiresAt: now()->addMinutes(15),   // stalls after this → swept to failed
));

$operations->advanceStep(new AdvanceStep($op->id, 'build'));   // build done, release starts
$operations->advanceStep(new AdvanceStep($op->id, 'release'));
$operations->advanceStep(new AdvanceStep($op->id, 'route'));
$operations->complete(new CompleteOperation($op->id));

Every change dispatches an OperationUpdated event, so a client can watch progress live without polling. Re-running a step or a completion is a safe no-op (at-least-once workers never double-apply).

Why

Background work that spans several steps usually collapses to a single job with no visible progress and no way to tell "stuck" from "slow". Cbox Operations gives that work an auditable status (pending → running → completed | failed), per-step timing, and a deadline so a crashed worker self-heals into a terminal failed rather than a stuck running forever.

Install

composer require cboxdk/laravel-operations
php artisan migrate

Schedule the stall sweep so past-deadline operations self-heal:

Schedule::command('operations:sweep-stalled')->everyMinute();

Design

  • Contracts-first. Depend on Cbox\Operations\Contracts\Operations, never the concrete manager — so you can decorate it and tests can swap the bundled fake.

  • Deny-by-default state machine. Illegal transitions throw; terminal states never move.

  • Tenancy-agnostic. tenant_id is an optional column the package simply persists — bring your own scoping.

  • Broadcast-agnostic. OperationUpdated is a plain event; wire it to your own transport if you want live UI.

  • Dogfooded testing. Ship InteractsWithOperations + FakeOperations and use them in your own suite:

    $ops = $this->fakeOperations();
    $this->deploy('wl_123');
    $ops->assertStarted('deploy');
    

Documentation

Full docs live in /docs: quickstart, architecture, the state machine, cookbook recipes, extension points, and the security/scope notes.

License

MIT © Cbox

Alternatives to cboxdk/laravel-operations

discovery-ukraine/saga-lara-flow

Simple workflow management engine with an integrated Saga pattern using Laravel...

32,243 66
juststeveking/workflow-engine

Durable, resumable workflows for the long-running Laravel processes that spend m...

3,211 8
padosoft/laravel-flow

DX-first workflow / saga / compensation engine for Laravel with native dry-run,...

39,150 5
kpconnell/laravel-jobwarden

A database-backed alternative to Horizon & Laravel Queues — durable jobs, sophis...

2,525 66
moffhub/flow

Database-driven state machine and workflow engine for Laravel. Multi-step approv...

1,384 0

Version History

Version Released PHP Laravel License
v0.1.0 ^8.4 ^12.0 || ^13.0 MIT