HttpKernel or a micro-framework wrapper).doctrine/orm package), adding complexity.FrameworkBundle, SecurityBundle, etc.), which are not Laravel-first. Laravel’s illuminate/support and illuminate/http are incompatible.auth() helper and middleware would need to be reimplemented or bridged.twig/twig + symfony/templating), increasing bundle bloat.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony-Laravel Conflict | High | Isolate in a micro-service or use Symfony’s HttpKernel as a sub-application. |
| ORM Mismatch | Medium | Use Doctrine ORM in Laravel (adds ~50MB to vendor). |
| Authentication Rework | High | Replace Laravel’s auth() with a custom provider wrapping FOSUserBundle’s logic. |
| Deprecated Fork | Medium | Original FOSUserBundle is actively maintained; this fork is abandoned (last release: 2020). |
| Twig vs. Blade | Low | Use TwigBridge (spatie/laravel-twig) for hybrid templating. |
Authenticatable, HasApiTokens)?Target Stack: Laravel (v8/9/10) + Symfony Components (if bridging).
Compatibility Matrix:
| Laravel Component | FOSUserBundle Dependency | Conflict Risk |
|---|---|---|
| Eloquent ORM | Doctrine ORM | High |
| Blade Templating | Twig | Medium |
| Laravel Auth System | Symfony SecurityBundle | High |
| Service Container | Symfony DI | Medium |
| Middleware Pipeline | Symfony HttpFoundation | Low |
Workarounds:
HttpKernel in Laravel (e.g., via symfony/http-kernel) and route /auth to it.symfony/framework-bundle and doctrine/orm in Laravel.doctrine/dbal).User entity.Authenticatable with a custom guard using FOSUserBundle’s UserProvider.// app/Providers/AuthServiceProvider.php
public function boot()
{
$this->app['auth']->provider('fos_user', function ($app) {
return new FOS\UserBundle\Model\UserProvider($app['fos_user.user_manager']);
});
}
spatie/laravel-twig to render FOSUserBundle’s Twig templates in Blade.@twig('FOSUserBundle:Registration:register.html.twig', ['form' => $form])
auth()->attempt().symfony/framework-bundle (~100MB) and doctrine/orm (~50MB) increases deploy size.SecurityBundle and Doctrine may conflict with Laravel’s auth() and Eloquent.Class 'FOS\UserBundle\Model\User' not found due to autoloader conflicts.security.events in Laravel’s monolog for auth tracking.session.driver = 'database').User table vs. Laravel’s users table.| Scenario | Impact | Mitigation |
|---|---|---|
| Symfony-Laravel autoloader conflict | App crashes on boot | Use composer.json aliases or a custom PSR-4 loader. |
| Doctrine-Eloquent schema mismatch | Data corruption | Freeze Eloquent migrations until FOSUserBundle is fully adopted. |
| Abandoned fork bugs | Security vulnerabilities | Fork and maintain the package internally. |
| Templating conflicts (Twig/Blade) | Broken UI | Use |
How can I help you explore Laravel packages today?