Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Workflow Extensions Bundle Laravel Package

littlerocket/workflow-extensions-bundle

A Symfony bundle that extends the Workflow component with practical helpers for building and managing state machines in PHP applications. It reduces boilerplate, simplifies workflow configuration, and helps keep complex state transitions easier to organize and maintain.

View on GitHub
Deep Wiki
Context7

Getting Started

First, read composer.json before you read the README. The -bundle suffix and the description ("Bundle for extended workflow management and automation") point at a Symfony bundle, not a Laravel package. Check three keys:

  1. type — symfony-bundle confirms it needs Symfony's DI container and a Kernel, which Laravel does not provide.
  2. extra.laravel.providers / extra.laravel.aliases — if these are absent, composer require gives you zero auto-discovery. Nothing registers, nothing publishes, and the README's service names won't resolve in app().
  3. require — look for symfony/framework-bundle, symfony/dependency-injection, and symfony/workflow. If symfony/workflow is present, that's the real payload; the bundle is the wiring around it.
composer require littlerocket/workflow-extensions-bundle
composer show -a littlerocket/workflow-extensions-bundle   # confirm the version actually resolves

Where to look, in order:

  • src/DependencyInjection/*Extension.php — the load() method and its TreeBuilder are the only authoritative list of config keys. READMEs for 0-star packages drift; the config tree does not.
  • src/Resources/config/services.* — the service definitions and their tags. This tells you exactly which objects the bundle expects to exist and what it wires them to.
  • tests/ — with 0 dependents and a single release, the test suite is your best evidence of intended behavior and your template for the first integration test.

First use case worth trying: a single linear lifecycle on one model — an Order moving draft → submitted → approved → fulfilled, with one guard on approve. Register only that one definition, get a transition working end-to-end through your persistence layer, and confirm the state survives a page reload. Everything else in this package is an extension of that loop; if the loop doesn't work in your stack, no amount of extra features will.

Implementation Patterns

If the package turns out to be Laravel-native (unlikely, but verify): publish the config, keep workflow definitions in a dedicated config/workflows.php, and resolve the registry from the container rather than instantiating anything directly. Wrap state changes in a small application-level service (WorkflowService::apply($model, $transition)) so controllers never touch the workflow API directly — that seam is what makes the package swappable later.

If it's a Symfony bundle (the probable case), you have three viable patterns:

Bridge via a service provider. Symfony's Workflow component itself has no framework dependency — Registry, DefinitionBuilder, MethodMarkingStore, and the guard/transition events are plain PHP. Write a WorkflowServiceProvider that constructs the registry by hand and reuses the bundle's extension classes where they're framework-free. This gets you 80% of the value without the framework.

Run it out-of-process. If the bundle does something substantial (automation, scheduling, audit), expose it over HTTP from a small Symfony app and call it from Laravel via Http:: or a queued job. Cheap to operate, but you now own two deployables.

Use the underlying component directly. composer require symfony/workflow and copy the specific patterns you liked from the bundle's source. Given the release history you're not inheriting much maintenance burden this way, and you skip the DI-container mismatch entirely.

Integration tips that apply regardless:

  • Persist the marking yourself. Symfony's marking stores assume the subject object is saved by the caller. In Eloquent terms, that means a workflow_marking JSON column (or a state string), a transaction around transition-and-save, and a lockForUpdate() if two requests can race the same subject.
  • Map events to Laravel listeners. If the bundle dispatches on a Symfony EventDispatcherInterface, write a thin adapter that forwards to Event::dispatch() so the rest of your app stays in Laravel idioms.
  • Automation belongs on the queue. Any "on transition, do X" hook should dispatch a job keyed by subject ID and transition name, not run inline. It keeps the transition cheap and gives you retries.
  • Test the guards, not just the happy path. Assert that a disabled transition raises the package's exception type and that your controller turns it into a 422.

Gotchas and Tips

Bundle ≠ package. The single biggest trap: no extra.laravel, therefore no config/workflow-extensions.php magically appearing, no php artisan vendor:publish finding anything, and no facade. If you see Class "..." not found immediately after install, this is why — not a broken install.

Treat it as unproven code. Zero stars, zero dependents, and a single release means: no Stack Overflow answers, no blog posts, no downstream project that already hit your bug. Pin the exact version ("littlerocket/workflow-extensions-bundle": "1.0.0", not ^1.0), read the source of anything you call, and be prepared to fork. Budget for ownership, not adoption.

Verify the release date resolves. The listed release date is in the future relative to typical package metadata. Run composer show -a and confirm the tag exists on Packagist and in the repo's tags before you plan around it. If it's a dev tag, you'll need minimum-stability adjustments that affect your whole dependency graph — isolate that decision.

Config caching. If you build workflow definitions dynamically (from DB, from a service provider's register(), from anything computed), php artisan config:cache and route:cache can freeze a stale registry. Prefer static definitions in a config file, or register definitions in boot() with an explicit cache-busting key.

Guard failures are exceptions, not booleans. A guard returning false typically throws (Symfony throws NotEnabledTransitionException with a transition/blocks map). Catch it at the boundary — a listener or middleware — and map it to a user-facing validation error. Letting it bubble produces 500s that look like bugs to users.

Debugging without framework tooling. You don't get debug:container or debug:workflow in Laravel. Use app()->make(Registry::class) in tinker, dump getDefinition() and getMarking() for a real subject, and confirm the places and transitions you think are registered actually are. Nine times out of ten the definition is fine and the marking store is reading the wrong property.

Extension points, in order of safety: event listeners first (no coupling to internals), custom guards second (small, testable classes), subclassing package services last. Subclassing a 0-star package's internals is how you end up unable to take the next release.

Watch the marking column type. If the marking store writes an array of places, a string column will silently store "Array" or fail depending on your driver. Use json in MySQL/Postgres, and assert the round-trip in a test before writing any feature code on top of it.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect