schuppo/password-strength
Laravel validation rule that scores password strength with the zxcvbn estimator and rejects weak passwords. Configure a minimum score, customize error messages, and use it in form requests or inline validation rules. Simple to install and integrate for safer user accounts.
Architecture fit. Unchanged. The package is a Laravel validation rule — a leaf dependency in the request-validation layer, not a service. That is architecturally cheap: it sits alongside required|string|min:8 in a FormRequest, touches no domain model, holds no state, and introduces no new runtime (no queue, no cache, no external HTTP call). It is appropriate only inside a Laravel application; outside Laravel it has essentially no value because it depends on illuminate/validation and Laravel's translator/message conventions. It also solves only one part of the problem — password strength estimation at the boundary — and does nothing for credential-stuffing defense, rate limiting, MFA, or breach-list checks, all of which carry more security weight than a composition heuristic.
Integration feasibility. Mechanically trivial, and now marginally more credible: v2.7 explicitly claims Laravel 10.x support, which removes the biggest unknown for teams on Laravel 10. composer require, service-provider auto-discovery (Laravel 5.5+), optionally vendor:publish for config, then add the rule to registration/password-reset/change-password requests. Realistic effort for a competent Laravel engineer is half a day including tests, assuming version constraints resolve. The uncertainty was compatibility, not effort — v2.7 reduces that uncertainty for one additional major but does not eliminate it (see below).
Technical risk.
P@ssw0rd1! while rejecting a long passphrase is actively counterproductive. A compatibility release does not touch this.Password rule with ->uncompromised() already provides k-anonymity HIBP screening, and zxcvbn-php provides a materially better estimator. Both are stronger defaults than this package. Unchanged.Key questions for the maintainer/team.
composer.json, and what is the intended timeline for Laravel 11/12 support?lang/ pipeline?Stack fit. Laravel-only. The viable window is now explicitly Laravel 8–10 applications that already have bespoke regex password rules to retire. For greenfield work, and for any app on Laravel 11+, the built-in Password::defaults() (with uncompromised()) or zxcvbn-php is the better default; this package is a distant third choice on merit, not a first. v2.7 does not change the merit ranking — it only widens the addressable install base by one major.
Migration path. Unchanged and still the most important part of this assessment. Do not call the rule directly from FormRequests. Introduce a thin application-owned Rule class (e.g., App\Rules\PasswordPolicy) that delegates to the package. That wrapper is the real deliverable: it gives a single place to change thresholds, add breach-list checks, and swap the engine for zxcvbn-php or Laravel's built-in rule later without touching call sites. Migration off bespoke regex rules should be incremental — one form at a time, with the old rule retained behind a feature flag until telemetry confirms equivalent or better behavior.
Compatibility. Pin an exact version (^2.7 at minimum), commit the lockfile, run composer audit in CI, and add a job that exercises the rule on the oldest and newest supported PHP/Laravel combos. Confirm the Laravel 10 support is CI-backed rather than a widened constraint — a constraint bump without a test matrix is the classic way a package claims support it does not have. Treat any Laravel major upgrade — 11 and 12 included — as a re-evaluation gate, not a routine bump.
Sequencing.
zxcvbn-php and Laravel's uncompromised().App\Rules\PasswordPolicy regardless of engine choice.Maintenance. Day-to-day cost is near zero — no daemon, no schema, no config drift unless misconfigured. v2.7 shifts the deferred cost slightly: a release after a long gap suggests the maintainer is still present, which lowers (but does not remove) the risk of an unmaintained dependency in the authentication path. The cadence is still thin enough that the team must budget for either a periodic patch/fork review or an explicit decision to replace it within 12–18 months — and the clock now starts one major behind, since Laravel 11 is unsupported. The wrapper from the integration section is what makes that replacement a one-file change instead of a codebase sweep.
Support. Community-only, no SLA, no commercial backing. Internal ownership must be assigned to the team that owns authentication. Escalation path is "we fork it" — plan for that to be acceptable, because it may be the only option. v2.7 does not change this, but it does confirm the fork would be against an actively-touched codebase rather than a dead one.
Scaling. Effectively free and unchanged. The check is CPU-bound on a short string, stateless, and makes no outbound calls, so it adds sub-millisecond overhead and no horizontal scaling concern. The only thing to watch is a future dictionary-backed implementation loading large wordlists into memory per request — verify before assuming it stays cheap.
Failure modes.
Ramp-up. Low for any Laravel developer — under a day to install, configure, test, and wrap, with documentation being the only friction point (thin README, no upgrade guide; v2.7 ships a one-line note and no migration guidance, which is itself indicative). The cognitive load is not in using the package; it is in understanding what its score actually measures well enough to defend the threshold in a security review.
Recommendation. Do not adopt for greenfield, and do not adopt on Laravel 11+. For an existing Laravel 8–10 app, the position is unchanged in substance: adopt only behind an application-owned rule wrapper, only after a comparative corpus test against zxcvbn-php and Laravel's uncompromised(), and with a documented exit plan. v2.7 removes the immediate version-compatibility objection for Laravel 10 teams and is a mild positive signal on maintainer engagement, but it touches nothing that made this a weak choice: the algorithm is still outdated against NIST/OWASP guidance, there is still no breach-list screening, and the package is now one Laravel major behind. The security value added over Laravel core remains small; the long-term maintenance exposure remains.
How can I help you explore Laravel packages today?