xcentric/simple-workflow-bundle
A lightweight workflow bundle for PHP applications that adds simple state management and transitions to your models or services. Define workflows, guard transitions, and track state changes with minimal configuration and no heavy dependencies.
ServiceProvider, no auto-discovery, no config/ publishing, no facade. composer require xcentric/simple-workflow-bundle in a Laravel app will pull in Symfony DI/FrameworkBundle constraints (circa 2019, so likely Symfony 4.x era) and register nothing the Laravel container understands. The 0-star/0-dependent/no-release-since-2019 signals should be treated as a hard stop before you add it to composer.json.dulejankovic/simple-workflow. Read that repo's README and source before anything else — the workflow/state-machine semantics live there. In the bundle, the interesting files are:
SimpleWorkflowBundle.php — what, if anything, is registered/bootedDependencyInjection/Configuration.php and ...Extension.php — the config tree (this tells you the shape of a workflow definition)Resources/config/services.* — service IDs and constructor arguments
Those three tell you 90% of what the bundle does. If the extension is trivial, the bundle adds little over the library.symfony/workflow directly (the maintained Symfony component, works standalone in Laravel with a thin wrapper). Recommended.dulejankovic/simple-workflow library and wire it manually into a service provider — smaller surface, no Symfony bundle machinery.draft -> pending_payment -> paid -> shipped -> refunded, with a guard (only shipping if paid) and a side effect (send email on paid). If your need is this simple, you don't need this package; if it's more complex (parallel states, sub-workflows, marking stores), you need symfony/workflow, not this.places/states, transitions, and optional guards. In Laravel, model this as a config/workflows.php array and a small WorkflowManager that resolves a definition by name and applies transitions. Keep transitions pure (validate then apply) so they're testable without the framework.$workflow->apply($order, 'ship'); // throws if guard fails
This keeps the state column (status) the single source of truth and makes auditing trivial.workflow.transition.before/after style events (Transitioning, Transitioned) and hang side effects (mail, ledger entries, webhook dispatch) off listeners. This is the pattern that survives a library swap.(subject_type, subject_id, from, to, transition, actor_id, created_at). Don't rely on the package for this; do it in your Transitioned listener. This is the part that's hard to retrofit and cheap to build up front.TransitionGuard classes resolved from the container, referenced by class-string in config.apply() service — never mutates status directly. Otherwise you'll have two code paths and the audit trail lies.composer update, and no fixes for anything you find. Check composer why-not output before assuming it installs on a current Laravel skeleton. A 0-dependent package also means no one has hit your edge cases for you.php artisan vendor:publish, no config caching story, no container bindings, no Octane safety guarantees. Anything stateful in the library (e.g. a registry cached per request) needs scrutiny under long-running workers.simple_workflow: root key, is validated by a TreeBuilder, and is cached by the Symfony kernel. Translating that to Laravel means dropping the tree builder and losing its validation — replicate validation yourself or malformed definitions fail at runtime, mid-transition.from, to, guard, actor) or you'll be grepping opaque library exceptions.How can I help you explore Laravel packages today?