kirschbaum-development/laravel-actions
A Laravel package for organizing reusable action classes that encapsulate business logic, keeping controllers, jobs, and listeners thin and testable. It offers a structured way to define and invoke actions throughout your application.
What the package is. An opinionated implementation of the "action" pattern: one class encapsulates a single unit of business logic and can be invoked across Laravel contexts — HTTP controller, queued job, event listener, artisan command — without duplicating the class per entry point. Now at v0.2.3 (still pre-1.0).
Architecture fit
lorisleiva/laravel-actions solves the same problem with far greater adoption. Running both is an architectural smell, not a feature.Integration feasibility
composer.json constraints against the app's Laravel and PHP versions before committing.Technical risk
__call dispatch defeats IDE navigation and static analysis. This is the most relevant change in the release for us: the spike's exit criteria hinge on PHPStan/Larastan cleanliness, and typed signatures on the package surface make that materially more achievable. Caveat: typing the package's own surface does not automatically type our action classes — we still need Larastan rules and likely stubs/generics for the dispatch entry points.Key questions
lorisleiva/laravel-actions, and are the interfaces interchangeable?illuminate/* constraints or pinned? Is a 1.0 with a compatibility promise planned?Stack fit. Designed for Laravel's container and queue subsystem. Fits if the codebase is Laravel-native with no multi-framework constraint and the team is on a currently supported major.
Migration path
Compatibility. Pin the version explicitly (0.2.3, not a caret range) in composer.json and add a conflict guard against lorisleiva/laravel-actions. Because typing tightened in a patch, re-run the full suite and Larastan after every bump while pre-1.0. Confirm it doesn't collide with existing base-controller or FormRequest conventions.
Sequencing. Spike → static-analysis config → conventions → module-by-module. Never a big-bang rewrite; the benefit is boilerplate reduction, which accrues incrementally by nature.
Maintenance. MIT plus a small surface area means we can vendor or fork at low cost — but the obligation becomes ours. v0.2.3 shows active investment in code quality, which modestly lowers the "abandoned mid-major" probability, but a single release from a single maintainer is not evidence of a support commitment. Budget a recurring review at each Laravel major upgrade, plus a diff review on each 0.x bump; if the package lags, we are pinned.
Support. GitHub issues only, no vendor SLA. The escalation path is "read the source." Acceptable for a small internal utility; not acceptable on the critical path of revenue flows.
Scaling. Action classes are stateless and container-resolved; runtime overhead is negligible at any realistic request or queue volume. Stricter type declarations have no runtime cost. The scaling constraint here is cognitive, not computational — the pattern must stay consistent as headcount grows.
Failure modes to instrument
Ramp-up. Low for engineers already fluent in Laravel: roughly half a day plus the convention doc. Better type declarations slightly reduce the "what does this trait actually do" tax. The hidden cost remains reviewer discipline — without it, the pattern degrades into an inconsistent third way of doing things.
TPM recommendation. v0.2.3 improves the one axis the spike was designed to measure and is a genuine positive maintenance signal, but it does not change the adoption picture: seven stars, zero dependents, single maintainer, pre-1.0. Hold the prior position — green-light only the timeboxed spike, pin the exact version, and require PHPStan/Larastan cleanliness plus unambiguous queue semantics before any wider standardization. If the spike is inconclusive, adopt the pattern without the package — the pattern is free, the dependency is not.
How can I help you explore Laravel packages today?