Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Utils

Laravel Utils Laravel Package

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...

View on GitHub
Deep Wiki
Context7

Shared Laravel utilities of MLL

Frequently asked questions about Laravel Utils
How do I install mll-lab/laravel-utils in a Laravel project?
Install it with Composer by requiring mll-lab/laravel-utils at a version compatible with your Laravel release, for example ^10.14. The package is a lightweight utility library, so there is typically no service provider registration, config publishing, or migration step needed for the helpers to work. If you plan to use the static-analysis rules introduced in 10.14.0, also add phpstan/phpstan and larastan/larastan to require-dev.
Which Laravel and PHP versions does mll-lab/laravel-utils support?
The 10.x line targets modern Laravel conventions and assumes PHP 8.1 or newer, matching Laravel 10 and 11 era applications. Always confirm the exact PHP and illuminate/support constraints in the package composer.json before bumping, since those constraints define the real support matrix. If you are still on an older Laravel or PHP version, check for a matching older major of the package.
What does the new PHPStan rule for string-keyed collections do in v10.14.0?
Version 10.14.0 adds PHPStan rules that forbid string-keyed collection operations such as $collection['foo'], pushing you toward typed property or method access instead. The intent is to keep collections generic-annotated so Larastan and PHPStan can actually verify element types rather than falling back to mixed. It is developer tooling only and does not change any runtime behaviour of your application.
Are the PHPStan rules opt-in, or are they applied automatically?
They are static-analysis rules, so they only run when you register them in your phpstan.neon or phpstan.neon.dist configuration and execute PHPStan. Simply upgrading the package should not change analysis results unless the rules are wired into your ruleset. Check the package documentation to see whether the rules ship as an includable ruleset via includes: or must be registered rule by rule.
Is upgrading mll-lab/laravel-utils to 10.14.0 a breaking change?
No. The change is additive and non-breaking within the 10.x semver line: there is no public API removal, no runtime behaviour change, and no config or asset publishing required. The only impact is potential new PHPStan violations if you choose to enable the new rules. Bump the dependency in isolation first and confirm your Composer resolution stays stable.
Which PHPStan and Larastan versions work with these collection rules?
The rules need a PHPStan and Larastan combination that supports generic collection annotations, which in practice means a reasonably current Larastan release. Verify whether the supported version band is declared in the package composer.json before adopting, since static-analysis tooling tends to be tightly coupled. A Larastan minor bump can change inferred types and flip rule results, so keep PHPStan, Larastan, and this package moving together.
How do I deal with false positives or existing violations from the new rules?
Run PHPStan once with the rules enabled, generate a baseline for pre-existing violations, and ratchet to blocking in CI once the count is stable. For legitimately dynamic keys such as config-driven arrays, Arr helpers, or decoded JSON payloads, prefer targeted suppression by rule identifier or inline ignore comments over blanket exclusion. Avoid enabling the rules as blocking in the same pull request as the dependency bump, since that tends to stall the pipeline and encourage a rushed baseline.
Does mll-lab/laravel-utils add runtime overhead or affect production?
The package is a low-footprint utility library of helpers and conveniences, and the 10.14.0 change adds no runtime code at all. There is zero production surface from the PHPStan rules because they execute only during static analysis on developer machines and CI runners. It does not own domain logic, routing, persistence, or auth, so it will not constrain your application architecture.
How do I test the new PHPStan rules in my CI pipeline?
Add the rules to phpstan.neon in a separate pull request from the version bump, then scope them to new or changed files before widening coverage. Run PHPStan in CI as you already do and treat the rule identifiers as blocking once the violation count is stable. If your CI uses a pinned image with PHPStan pre-installed, rebuild that image so it contains the new package version.
Is mll-lab/laravel-utils actively maintained, and what are the alternatives?
The package is published by MLL Lab with a versioned 10.x line and recent releases, so it is maintained, though the static-analysis rules are new and worth watching for how actively they get curated. Because it is a grab-bag of helpers rather than a framework, most functionality has no direct drop-in alternative; teams often replace individual helpers with first-party Laravel features or their own app-level utilities. For the collection rules specifically, the closest alternatives are Larastan's own strictness settings and custom PHPStan rules written in-house.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect