bengor-user/symfony-security-bridge-bundle
BenGorUser/UserBundle, which is not Laravel-native, requiring significant abstraction or a custom bridge.SecurityBundle with UserBundle—Laravel’s authentication (e.g., Illuminate\Auth) is fundamentally different, necessitating rewrites or wrappers for compatibility.UserBundle’s entity-based auth vs. Laravel’s model-agnostic auth.UserBundle may have breaking changes or unresolved vulnerabilities.Illuminate\Auth) and packages like spatie/laravel-permission. Is this bundle solving a unique problem?SecurityContext as Laravel middleware.ContainerAware with Laravel’s ServiceProvider.SecurityEvents to Laravel’s Events or Listeners.Auth::attempt(), guards, providers).Security and User components.// Laravel Service Provider
public function register()
{
$this->app->bind('symfony.security', function () {
return new LaravelSecurityBridge(); // Custom wrapper
});
}
SecurityBundle, UserBundle: Would need composer installs but no direct Laravel hooks.Symfony\Component\Security\* vs. Laravel’s Illuminate\Support\*).UserBundle’s schema (e.g., UserType) would need Laravel Eloquent migrations.| Phase | Task | Dependencies |
|---|---|---|
| 1. Feasibility | Spike: Can we run Symfony’s SecurityBundle in Laravel? |
Composer, Docker (for isolation) |
| 2. Abstraction | Build a Laravel-compatible facade for SecurityBridge. |
Symfony components installed |
| 3. Core Auth | Replace Laravel’s Auth with bundle-inspired services. |
Custom middleware |
| 4. Advanced Features | Implement voters, firewalls, etc. | Phase 3 completion |
| 5. Testing | PHPSpec → Laravel’s PHPUnit/Pest. | Custom test wrappers |
| 6. Deprecation | Phase out original Laravel auth in favor of bundle-based system. | Full feature parity |
UserBundle docs (not Laravel-friendly).SecurityContext) would require cross-framework debugging.laravel-queue), Symfony’s Security events may not integrate cleanly.| Risk | Impact | Mitigation Strategy |
|---|---|---|
| Bundle Incompatibility | Integration fails mid-project. | Spike first; have a fallback auth system. |
| Security Gaps | Symfony’s SecurityBundle has vulnerabilities. |
Audit Symfony’s security advisories; patch manually. |
| Team Burnout | High refactoring effort. | Limit scope; prioritize critical features. |
| Laravel Version Conflict | New Laravel breaks bundle. | Containerize the bundle for isolation. |
| Maintenance Abandonment | Team moves on; no one supports it. | Document decisions; plan for rewrite. |
Firewalls, Voters, Providers.How can I help you explore Laravel packages today?