imanghafoori/laravel-anypass
Laravel package that lets you log in as any user with any password during development, so you can switch accounts and test flows without remembering credentials. Simple to install and easy to disable in production.
Architecture fit AnyPass is a dev-only authentication convenience: it lets a developer authenticate as an existing user with an arbitrary password. It is a single service-provider package with no migrations, routes, views, or published config in the typical case — the entire surface area is a binding into Laravel's auth stack (most likely decorating the Eloquent user provider or intercepting credential validation). That means near-zero coupling to application domain code and no architectural constraints imposed on the host app.
The fit question is therefore not "does this belong in our architecture" but "what is the blast radius of the seam it touches." Authentication is a security-critical boundary; the package's value is entirely proportional to how tightly it can be confined to local development. It fits cleanly for teams running Laravel session auth on the default Eloquent provider, and poorly for apps whose auth is delegated to an external IdP, token-only Sanctum APIs, or passwordless flows where there is no credential check to shortcut.
Integration feasibility
Low effort. A composer require --dev plus auto-discovery is the expected happy path. The package does not create users, so teams still need factories/seeders with known accounts before it produces value — that prerequisite, not the install, is the real work item.
Compatibility caveats to verify before adoption: behavior under multiple guards, custom user providers, and stacks that decorate the auth manager (Fortify, Breeze, Jetstream, Passport). Interaction with 2FA and email-verification middleware is also unverified — those middlewares sit after authentication and should still fire, but this must be confirmed rather than assumed.
Technical risk
Key questions for the maintainer or code review
validateCredentials, the user provider binding, or the guard — and does it survive custom providers?Stack fit Strong fit for Laravel monoliths and any application using Eloquent-backed session authentication. Weak or no fit for API-token-first services (there is no password to bypass), SPAs fronted by an external identity provider, or apps already using a local-dev impersonation feature in their own codebase.
Migration path
Purely additive, with a clean exit. Add to require-dev, commit the lockfile, document in the onboarding README, and removal is a single composer remove with no data or schema cleanup. There is no migration, no backfill, and no rollback plan required beyond deletion.
Compatibility Confirm support against the Laravel versions actually pinned across the estate — the February 2025 release suggests current Laravel is targeted, but 11.x and 12.x should be verified explicitly, along with PHP 8.2+. Verify against each distinct auth stack in the portfolio rather than assuming a single answer.
Sequencing
composer install --no-dev in production images, a CI assertion that the package is absent from the production vendor tree, and a boot-time assertion in a service provider that throws if the package is active outside local.Build-vs-adopt A roughly 30-line internal user-provider decorator replicates the core behavior with full control over gating and logging. Given zero dependents and a single maintainer, the internal option is defensible and should be the fallback if the guardrails above cannot be enforced mechanically.
Maintenance
Low ongoing cost: small code surface, MIT license, active-as-of-2025 maintenance. The real maintenance exposure is bus factor 1 — if the maintainer stops, the fork cost is trivial given the size, so this is acceptable for dev tooling. Pin the version in composer.lock and review on Laravel majors.
Support Community-only via GitHub issues, no SLA, no commercial backing. Acceptable strictly because the package is excluded from production; it would be disqualifying for runtime-critical dependencies.
Scaling No scaling implications. If excluded from production builds, it contributes nothing to runtime footprint, latency, or infrastructure cost. The package scales with developer headcount only in the sense that onboarding documentation needs to exist.
Failure modes
| Failure | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Active in production | Low | Critical — auth bypass | --no-dev builds, CI vendor check, boot-time assertion |
| Active in test suite, masking auth bugs | Medium | Medium | Explicitly disable in phpunit.xml env |
| Guard/provider mismatch (Fortify, Sanctum, custom) | Medium | Medium | Pilot per auth stack; verify before rollout |
| Package abandoned | Low | Low | Small surface; fork or replace in-house |
| Missing seed users → feature appears broken | Medium | Low | Make seeders part of the adoption checklist |
Ramp-up Under an hour for a developer familiar with Laravel auth. The cost is not learning the API — it is building and verifying the containment controls and writing the two paragraphs of documentation that prevent someone from shipping it to production.
Recommendation Conditional adopt, dev-only, for session-auth Laravel apps. Gate the decision on mechanical containment (build flags + CI check + boot-time assertion) being in place before the first merge. If that enforcement cannot be guaranteed across the estate's pipelines, build the equivalent internally instead — the functionality is small enough that the dependency buys convenience, not capability.
How can I help you explore Laravel packages today?