michael-rubel/laravel-helpful-traits
A collection of reusable traits for Laravel that cuts boilerplate across models, controllers, form requests, and more. Drop-in traits add common behaviors like UUIDs, slugs, query scopes, caching, and response helpers, keeping your code concise, consistent, and aligned with Laravel conventions.
Verdict: Adopt the pattern, reject the package. Unchanged by 2.0.1. The security posture it enforces is correct and worth having; the artifact itself is still not a viable dependency (archived, 0 dependents, 13 stars, first release since 2023-01-19). Vendor ~30–50 lines into an application-owned base FormRequest, reading the logic from the 2.0.1 tag rather than 2.0.0.
What 2.0.1 changes
Architecture fit
Illuminate\Foundation\Http\FormRequest. It routes $request->key, $request->input(), $request->all(), and ArrayAccess offsetGet through $request->safe() so unvalidated payload keys are unreachable from controllers.__get, offsetGet) on Request. Laravel's Request / ValidatedInput surface has moved across 10.x → 11 → 12.Integration feasibility
BaseFormRequest that overrides offsetGet, __get, input, all, only, except to delegate to $this->safe(), with explicit escapes for route parameters, headers, files, and session lookups.Technical risk
| Risk | Severity | Note |
|---|---|---|
| Archived, no maintainer | High | 2.0.1 is a drive-by contribution, not evidence of resumed maintenance; no path to security fixes |
| 0 dependents / 13 stars | High | Effectively unexercised in production; no ecosystem signal |
| Framework drift (11/12) | High | 2.0.1 pins Laravel 10 support only; ValidatedInput remains the load-bearing, unpatched surface for 11/12 |
| Latent incompatibility | High | 2.0.0 shipped without Laravel 10 support and sat broken for ~2 years — the package cannot be trusted to track framework changes |
| Hidden behavior change | Medium | $request->x becomes a silent null for unvalidated keys — fail-closed but debug-hostile |
| Trait collision | Medium | Any other base class or package touching offsetGet wins silently by load order |
| Score 0.0325 | — | Consistent with "abandoned micro-utility" |
Key questions
null bug in production rather than a loud failure.X-Request-Id, pagination, files, headers? Those must not be masked.validated() convention deliver most of the value with no runtime magic.Stack fit
Migration path
App\Http\Requests\BaseFormRequest.Compatibility
validated(), safe(), authorize(), and prepareForValidation().$request->merge() after validation, FormRequest reuse in jobs/console commands, and packages that expect $request->all() to include unvalidated keys (query builders, API resources, some audit loggers).Request binding, which middleware and auth depend on.ValidatedInput before enabling; nothing upstream will do that for us.Sequencing
$request->input(/$request->all() in controllers so the guarantee outlives the trait.Maintenance
Support
Scaling
Failure modes
null for a key lacking a validation rule; surfaces in production unless tests assert on those fields.offsetGet/__get.ValidatedInput assumptions with no upstream to fix them — the same failure that left 2.0.0 unusable on Laravel 10 for two years.Ramp-up
$request->x no longer means "raw input" inside FormRequests. Budget a short design note and a code-review checklist item.How can I help you explore Laravel packages today?