c975l/user-bundle
GDPR-focused user management bundle inspired by FOSUserBundle: Doctrine entities (extendable), signup/signin/profile/password reset forms, email notifications, social login (HWIOAuth), public profiles, anti-brute-force delays, Gravatar/social avatars, JS data access, and JSON API.
Auth::attempt()) would need a bridge (e.g., custom middleware or a facade).doctrine/orm in Laravel (non-trivial).twig/extra-bundle).EventSubscriberInterface) could be adapted via Laravel’s event system (e.g., Illuminate\Support\Facades\Event).lcobucci/jwt (for API auth).c975LEmailBundle (email archiving), Misd\PhoneNumberBundle (phone validation).Mail facade.Auth system.spatie/laravel-socialite.typsharp/laravel-jwt-auth or firebase/php-jwt.| Risk Area | Severity | Mitigation |
|---|---|---|
| Non-Laravel Core | High | Requires significant abstraction layer (e.g., custom auth service, route handlers). |
| Doctrine ↔ Eloquent | Medium | Manual model mapping or hybrid ORM setup (e.g., doctrine/dbal for queries). |
| Twig ↔ Blade | Low | Use Twig in Laravel (e.g., twig/laravel) or convert templates to Blade. |
| Security Configuration | High | Misconfiguring security.yml (Symfony) could break auth. Test thoroughly. |
| Social Login (HWIOAuth) | Medium | Laravel Socialite may not cover all HWIOAuth features; custom integration needed. |
| API Integration | Low | Laravel’s API resources can consume the bundle’s JSON API with minimal effort. |
Is Symfony/Laravel Interoperability Worth the Effort?
spatie/laravel-permission, laravel-breeze) suffices.Can Eloquent Replace Doctrine?
UserServiceInterface) can be rewritten using Eloquent or Query Builder.How Will Templates Be Handled?
Social Login Strategy
API vs. Frontend Integration
Migration Path from FOSUserBundle
Performance Impact
Long-Term Maintenance
| Laravel Component | Bundle Component | Integration Strategy |
|---|---|---|
| Authentication | Symfony Security | Build a Laravel middleware/facade to bridge Symfony’s firewalls and Laravel’s Auth. |
| User Models | Doctrine Entities | Convert entities to Eloquent models or use a hybrid approach (e.g., doctrine/dbal). |
| Routing | Symfony Annotations | Replace with Laravel route definitions (e.g., Route::get('/signup', [UserController::class, 'signup'])). |
| Templates | Twig | Option 1: Use Twig in Laravel (twig/laravel). Option 2: Convert Twig to Blade. |
| Forms | Symfony FormBuilder | Replace with Laravel Collective or custom FormRequest classes. |
| Events | Symfony EventDispatcher | Map to Laravel’s Event facade (e.g., Event::dispatch('user.deleted', $user)). |
| API | JSON API | Consume via Laravel’s HTTP client (Http::post('/api/users')) or wrap in API resources. |
| Social Login | HWIOAuthBundle | Replace with Laravel Socialite or extend HWIOAuth via a custom provider. |
| Symfony Mailer + c975LEmailBundle | Use Laravel’s Mail facade; archive emails via a custom service. |
|
| Validation | Symfony Validator | Use Laravel’s built-in validation or laravel-validator. |
Phase 1: API-First Integration (Low Risk)
Http::asForm()->post()).Phase 2: Hybrid Integration (Medium Risk)
User entity to an Eloquent model with identical fields.doctrine/dbal for complex queries if needed.// app/Providers/AuthServiceProvider.php
public function boot()
{
Auth::extend('user_bundle', function ($app) {
return new UserBundleGuard($app['c975l.user_service']);
});
}
Phase 3: Full Bundle Replacement (High Risk)
spatie/laravel-permission (roles/permissions).laravel-breeze (auth scaffolding).spatie/laravel-activitylog (auditing).| Feature | Compatibility |
|---|---|
| User Entities | High (convert to Eloquent models). |
| GDPR Compliance | Medium (manual implementation of data export/archiving may be needed). |
| API | High (consume via Laravel HTTP client). |
| Social Login | Low (HWIOAuth requires significant adaptation). |
| Email Archiving | Medium (replace c975LEmailBundle with a custom Laravel service). |
| Templates | Low (Twig ↔ Blade conversion required). |
| Events | High (map to Laravel’s event system). |
| Validation (Siret/VAT) | Medium (rewrite validators or use Laravel’s Validator extension). |
How can I help you explore Laravel packages today?