mll-lab/laravel-utils
A compact set of practical utilities for Laravel applications, providing reusable helpers and conveniences that cut boilerplate and simplify common development tasks. Easy to install and integrate into existing Laravel projects. Lightweight, dependable building blocks for everyday Laravel developmen...
Package: mll-lab/laravel-utils — v10.14.0 (released 2026-07-14)
Change under review: New feature — "forbid string-keyed collection operations via PHPStan rules" (#41).
Architecture fit. This is a low-footprint Laravel utility package (helpers, collection/query conveniences, and now static-analysis rules). It sits at the periphery of the architecture — it does not own domain logic, routing, persistence, or auth — so adopting it does not constrain long-term design decisions. The v10.14.0 change reinforces that positioning: it is developer tooling, not runtime code. The new PHPStan rules are an opinionated quality gate that discourages string-keyed Collection access (e.g. $c['foo']) in favour of typed/property access, which pushes consumers toward generics-annotated collections that Larastan/PHPStan can actually verify. For teams already running Larastan, this is a natural extension of an existing practice rather than a new architectural commitment.
Integration feasibility. High. The change is additive and, per semver on a 10.x line, non-breaking: no runtime behaviour changes, no public API removal, no config publishing required for existing consumers who do not want the rule. Realistic effort to adopt:
phpstan/phpstan + larastan/larastan in require-dev.phpstan.neon / phpstan.neon.dist.The main unknowns are mechanical: whether the rules ship as a ready-made ruleset (includes:) or must be registered rule-by-rule, and what PHPStan/Larastan version band is supported.
Technical risk. Low at runtime (zero production surface), moderate at the CI/delivery layer:
Arr helpers, JSON payloads), which creates pressure to suppress rather than fix.Key questions for the maintainer/vendor:
composer.json?Collection/Eloquent\Collection usage?Stack fit. Assumes Laravel 10/11-era conventions and PHP 8.1+. It coexists with first-party tooling (Pint, PHPStan/Larastan, Pest/PHPUnit) without conflicting mandates, since it adds analysis rules rather than replacing a linter or formatter. Teams not running static analysis get nothing from v10.14.0 — for them this release is a no-op, which is acceptable but worth stating explicitly in the upgrade note.
Migration path.
mll-lab/laravel-utils to ^10.14 in isolation; confirm no transitive resolution changes.phpstan.neon in a separate PR from the version bump.Compatibility. No database, config, or published-asset changes; no cache clears or queue restarts. Downstream impact is limited to developer machines and CI runners. If the project pins PHPStan via a shared CI image, that image needs the new package version baked in — a coordination item, not a code change.
Sequencing.
Do not bundle this with a framework upgrade; static-analysis noise during a Laravel major bump makes real regressions harder to spot.
Maintenance. Routine — dependency bumps on a normal cadence, with the caveat that PHPStan/Larastan/rule versions form a three-way compatibility triangle. Budget a small recurring task each time the analysis stack moves. Because the rules are dev-only, they never reach production and cannot cause runtime incidents.
Support. Open-source, small-maintainer package (MLL) with no commercial SLA. Responsiveness on rule-specific issues is the weak point: a false positive that blocks CI has no vendor escalation path, so the team needs an internal owner for the static-analysis configuration and a documented suppression procedure. That owner is the single most important operational control here.
Scaling. Negligible runtime scaling impact. CI cost grows with codebase size and PHPStan level, typically seconds-to-low-minutes; parallelise or cache the analysis result if the pipeline is already near its budget. The rule constrains how collections are accessed, which modestly improves type inference across large codebases — a mild long-term maintainability gain.
Failure modes.
array) rather than fix access patterns — watch for this anti-pattern in review.Ramp-up. Low. Roughly half a day for an engineer familiar with PHPStan to wire the ruleset and baseline; negligible for anyone already fluent in Larastan generics. The real onboarding cost is cultural — teams must understand why string-keyed collection access is discouraged, or they will suppress the rule rather than adopt the pattern. A short internal note with one good/bad example is sufficient.
Recommendation. Adopt the version bump; treat the new PHPStan rules as an independent, opt-in initiative with a phased non-blocking → blocking rollout and a named owner. Value is real but incremental, and entirely contingent on the team already investing in static analysis.
How can I help you explore Laravel packages today?