kphoen/doctrine-state-machine-bundle
Symfony bundle that integrates the Doctrine finite state machine library, letting you define state machines and transitions in configuration and expose them as container services for clean, testable workflow logic in your PHP applications.
pending → authorized → captured → refunded), content moderation (draft → review → published → archived), onboarding/KYC steps, ticket triage, subscription dunning. Any feature where a business analyst asks "what states can this be in, and who can move it?"symfony/workflow component (same ecosystem, actively maintained, supports state machines, guards, transition events, and Doctrine entity persistence out of the box) or a lightweight PHP 8.1 backed-enum + transition-method approach covers the same ground with no third-party dead weight.symfony/workflow, and keep the persisted status column stable so no data migration is needed.Adoption criteria — and it fails nearly all of them:
kphoen/doctrine-state-machine-bundle and you need to understand or patch its behavior in place.Look elsewhere — i.e., always for new work — because:
[DEPRECATED] by its maintainer. That is a hard stop, not a yellow flag.symfony/workflow, which offers the same entity-state-machine capability with guards, transition events, marking-store persistence, and visualization — with actual maintenance.Short version: we should not adopt this, and here's the cheap way to get what it promises.
Executives: the underlying need — giving records like orders or applications an explicit, auditable set of states and permitted moves between them — is legitimate and worth funding. This specific library is not. It was deprecated by its author, hasn't shipped a release since 2016, and has zero downstream users. Depending on it would mean owning a piece of abandoned infrastructure in the middle of a business-critical workflow, where a bug becomes our problem to fix with no upstream to escalate to.
Engineering: use Symfony's Workflow component for state-machine semantics on entities, or a backed enum plus explicit transition methods if the workflow is small. Either gets us guards, transition events for audit logging, and diagram generation, on a supported release cadence. Migration cost for anything already on the deprecated bundle is modest because the persisted status column can stay unchanged — only the transition logic moves.
Recommendation: close as "do not adopt," reuse the design pattern, and allocate the saved integration time to the workflow we actually need.
How can I help you explore Laravel packages today?