karriere/state
A Laravel state machine for Eloquent models. Define states and transitions, guard changes, fire events, and keep a history of every transition—ideal for orders, payments, approvals, and other workflow-driven records.
psr/cache v3) and adds no capability — it does not move the build-vs-buy math in either direction.Adopt (as a dependency or, more likely, a fork/reference) when:
session()->put() calls across controllers.illuminate/support and illuminate/session v10, PHP 8.1, and psr/cache v1/v2. If our apps are still on Laravel 10 or PHP 8.1, "adopting" means pinning a stale tag on an unsupported branch — which is a worse outcome than the in-house option below.Look elsewhere — or write it yourself — when:
NOASSERTION means legal review is a prerequisite, not a formality. For a 17-star package with zero dependents and a single maintainer org, the cost of a license opinion likely exceeds the cost of reimplementation. This is the single biggest blocker, and v3.3.0 does not touch it.For executives (one paragraph): We have a recurring pattern — users abandon multi-step flows (applications, onboarding, checkout) and cannot pick up where they left off, which costs us completed conversions. This package is a small, Laravel-native library that stores "where the user is" in cache or session so we can offer resume-later. It is not strategic technology and it is not a moat; it is roughly a few hundred lines of glue. The recommendation is therefore not to adopt it as a dependency, but to use it as a validated reference design and implement the pattern in-house in one sprint. That removes license ambiguity, supply-chain exposure (zero dependents, 17 stars, single maintainer), and the risk of a cache flush silently deleting user drafts. The newly published v3.3.0 is a maintenance release — framework and PHP version-floor changes, no new functionality — and does not change this recommendation. Expected upside is measured in funnel completion, not in engineering leverage — so we should fund it as a funnel experiment with a target metric, not as a platform investment.
For engineering (the ask): Spike the pattern, not the package. Concretely: (0) confirm our Laravel and PHP versions first — the current release requires Laravel 11+ and PHP 8.2+, so on Laravel 10 we would be pinning an unsupported tag, which is itself an argument for owning ~300 lines; (1) a FlowState contract with session and cache implementations; (2) cache keys namespaced flow:{type}:{user_id} with TTL sourced from a config value that Product owns; (3) a database fallback for flows where losing state is unacceptable; (4) explicit purge hooks on account deletion and flow completion. Track resume-rate, step-drop-off, and recovered-completion as the success metrics. If the license resolves cleanly and we later want a stopgap, this repo is a reasonable read for prior art — but treat it as a sketch, not a foundation.
How can I help you explore Laravel packages today?