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

Multi User Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Conceptual model worth understanding: a user-discriminator maps a single login form to N user classes, delegating registration, profile, and password-reset flows per type. This is the same problem Laravel solves with polymorphic authenticatables, guards, or a user_type column plus a custom UserProvider.
  • The bundle's value is almost entirely architectural reference. Treat it as a design document written in PHP, not a dependency.

Integration feasibility: near zero (direct), moderate (conceptual).

  • Archived repository, 0 dependents in this dataset, no active maintainer. No CVE feed, no security patching — disqualifying for an authentication-adjacent component.
  • Era-locked: expects Symfony 2.x/3.x and FOSUserBundle (itself unmaintained). Composer 2 and modern PHP will likely refuse resolution outright.
  • Auth domain = highest blast radius in any app. Adopting unmaintained auth code is a board-visible risk, not a code-review risk.

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:

  1. Are we actually running Symfony or Laravel? If Laravel, this is a pattern study, full stop.
  2. What is driving the need — genuinely heterogeneous actor types (e.g., Patients vs. Clinicians vs. Admins with separate tables), or just role separation? If the latter, native guards are sufficient and this package is over-engineering.
  3. Who owns the fork if we go Symfony-legacy? Budget a named maintainer before adoption, not after.
  4. What is the security review budget for an unsupported auth component?

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.

Integration Approach

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:

  • Single-table discriminator: one 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.
  • Multi-table chained provider: separate 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.

  • Laravel target: do not install. Run a 2–3 day design spike that reproduces the discriminator + provider pattern natively, with feature tests covering login, registration, password reset, and profile edit per user type. Estimated ~1–2 sprint-weeks for a production-grade implementation.
  • Legacy Symfony target already using it: freeze the dependency, inventory the user classes and discriminator mapping, then port to Symfony's native UserProviderInterface + ChainUserProvider (or MakerBundle-generated security) as part of the next framework upgrade. Do not attempt to carry FOSUserBundle forward.
  • Modern Symfony target: skip entirely — native chain providers already cover the use case the bundle was written to solve in 2013.

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.

  1. Confirm framework target (Laravel vs. Symfony) — this decision alone collapses half the option space.
  2. Confirm the actor model (heterogeneous vs. role-based) — determines whether the pattern is even warranted.
  3. Spike the native equivalent behind a feature flag; write auth tests first.
  4. Security review of the native implementation.
  5. Cut over; archive the reference reading list.

Operational Impact

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.

  • Discriminator drift: a user type added to the model but not the mapping fails silently at login rather than at boot. Mitigate with a boot-time assertion test enumerating all types.
  • Upgrade dead-end: framework upgrades blocked because the auth layer can't move. Mitigate by keeping the native implementation thin and framework-idiomatic.
  • Cross-type leakage: password reset or profile routes resolving against the wrong provider. Mitigate with per-type route namespacing and explicit provider binding in tests.
  • Security regression with no CVE feed: the highest-severity, lowest-visibility failure. Mitigate with routine dependency scanning and a documented auth threat model owned by a named engineer.

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.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
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
cgv/localized-resource