bengor-user/user-bundle
Fully featured, well-tested Symfony user bundle built on BenGorUser. Supports multiple user types and HTML/JSON renderers. Includes registration (confirmation/invites), login/logout, JWT auth, password reset, user removal, role management, and token purging.
Bundle system vs. Laravel’s Service Providers, Symfony’s EventDispatcher vs. Laravel’s Events, and Symfony’s Doctrine ORM vs. Laravel’s Eloquent).Domain\Model\User), which could be abstracted and adapted, but requires significant refactoring to align with Laravel’s conventions.User, Employee) is a strong feature for Laravel applications needing role-based or segmented authentication (e.g., admin vs. customer portals). However, Laravel’s built-in Guard system or packages like spatie/laravel-permission already provide similar functionality with better Laravel-native integration.SensioFrameworkExtraBundle, Symfony\Component\Security\Core), making direct integration into Laravel non-trivial. Key challenges:
Guard system differs from Laravel’s Authenticatable contracts.Routing component is incompatible with Laravel’s Router.EventDispatcher vs. Laravel’s Events system requires middleware or facade wrappers.tyramius/laravel-jwt-auth that are more aligned with Laravel’s ecosystem.FormLoginAuthenticator, UserProvider) to use Laravel’s Auth, Guard, and Request systems.Authenticatable, CanResetPassword).EventDispatcher to Laravel’s Events or using a bridge like symfony/event-dispatcher (if acceptable).Console commands as Laravel Artisan commands.PHPSpec, which is less common in Laravel. Migrating tests would require rewriting them for Laravel’s testing tools (e.g., PHPUnit with Laravel\Testing).spatie/laravel-permission, laravel/breeze).Guard or spatie/laravel-permission can achieve this with less overhead.sanctum or passport may suffice.Bundle, EventDispatcher, and Security systems have no direct Laravel equivalents.Routing and Controller components are incompatible with Laravel’s Route and Controller systems.Auth, Guard, Sanctum).User entity to Eloquent, adapt authentication logic to Laravel’s Guard).FormLoginAuthenticator with Laravel’s Authenticatable + Guard.Guard or spatie/laravel-permission for role-based segmentation.tyramius/laravel-jwt-auth instead of the bundle’s implementation.EventDispatcher with Laravel’s Events or a facade wrapper.Artisan commands.PHPSpec tests for Laravel’s PHPUnit testing framework.symfony/security-bundle) that conflict with Laravel’s composer constraints. Use replace in composer.json or isolate dependencies.Illuminate\Foundation\Auth\User).User entity and authentication logic to Laravel’s Auth system.Guard or spatie/laravel-permission.remember_token, JWT) via Laravel packages.Redis) and queue systems.Auth features in Laravel 11). Adaptations may need frequent updates.symfony/security) could lead to version conflicts. Use composer’s replace or a monorepo structure.EventDispatcher usage) could obscure error sources. Clear logging and separation of concerns are critical.spatie/laravel-permission) are optimized for Laravel’s stack.Redis, database) and caching (Memcached, APCu) should be leveraged over Symfony’s solutions.Horizon or Laravel Debugbar can help.How can I help you explore Laravel packages today?