pugx/multi-user-bundle
PUGX MultiUserBundle extends FOSUserBundle so Symfony applications can support several distinct user types. It provides separate user entities with shared registration, login, form, controller, and profile handling, simplifying multi-role account management without duplicating authentication code.
Architecture fit — critical mismatch to flag first. Despite being catalogued here as a "Laravel/PHP package," pugx/multi-user-bundle is a Symfony bundle, not a Laravel package. It provides multi-user-type support (multiple user entities/classes sharing one authentication surface) by layering on top of FOSUserBundle and Symfony's security firewall, DI container, and event system. A Laravel application cannot consume it via Composer in any meaningful way. The pattern is transferable; the code is not.
user_type column plus a custom UserProvider.Integration feasibility: near zero (direct), moderate (conceptual).
FOSUserBundle (itself unmaintained). Composer 2 and modern PHP will likely refuse resolution outright.Technical risk: High.
| Risk | Severity | Notes |
|---|---|---|
| Unmaintained auth surface | High | No security patching path; you own any CVE response |
| Framework lock-in | High | Symfony 2/3 + FOSUserBundle, both EOL |
| Ecosystem vacuum | Medium | 159 stars, 0 dependents → effectively no community answers |
| Silent auth drift | Medium | Discriminator/mapping errors fail at login, not at boot |
Key questions for the team:
The opportunity: 19.24 score reads as consistent with this: the strategic upside of adopting the package is low; the upside of borrowing its pattern is where the real value sits.
Stack fit. For a Laravel codebase, the correct integration is a native reimplementation of the pattern, not a port of this bundle. Two viable shapes:
users table with user_type (enum/string) + a custom UserProvider that scopes resolution by type, with per-type Guards and policies. Lowest operational cost; recommended unless types have materially divergent schemas.patients, clinicians, admins tables resolved through a ChainUserProvider-style decorator (Laravel: a delegating provider that tries each type's Eloquent provider in order). Closer to the PUGX model; higher migration and query complexity.Migration path.
UserProviderInterface + ChainUserProvider (or MakerBundle-generated security) as part of the next framework upgrade. Do not attempt to carry FOSUserBundle forward.Compatibility. Expect PHP 5.x/7.0-era constraints and Symfony ~2.3-style ranges. Validate with a throwaway composer require in a scratch container before committing any planning effort; the answer is likely "resolves only under an EOL toolchain."
Sequencing.
Maintenance. Adopting the package means forking it. Budget 3–5% of an FTE ongoing for security patching, plus a spike every PHP/Symfony major. Because the upstream is archived, there is no "wait for a fix" option — every defect is yours. This is the single largest hidden cost and should be priced explicitly against the 1–2 sprint-weeks of a native reimplementation.
Support. No upstream maintainer, no issue triage, no documentation refresh since the Symfony 2/3 era. Stack Overflow answers exist but assume FOSUserBundle, which is itself abandoned. Effective support model is "tribal knowledge + a named internal owner."
Scaling. The pattern scales well — a discriminator column or chained provider lookup adds negligible query overhead at typical SaaS volumes, and both shapes index cleanly. The bundle's implementation (security event listeners) is not a performance concern. The scaling risk is organizational: every new user type requires code changes to a component nobody on the team wrote.
Failure modes to design against.
Ramp-up. Conceptual ramp is low — multi-user authentication is well-trodden and a mid-level engineer grasps the discriminator model in a day. Operational ramp for the legacy bundle is high: 2013-era Symfony idioms, implicit container wiring, and stale docs mean 1–2 weeks before an engineer can confidently modify it. Ramp-up for the native Laravel reimplementation is effectively already paid — it's idiomatic guards and Eloquent.
TPM recommendation. Do not adopt as a dependency in either stack. Harvest the discriminator-plus-chain-provider design as a reference, implement natively, and treat opportunity: 19.24 as confirmation that the tactical value here is in the pattern, not the package.
How can I help you explore Laravel packages today?