elao/theme-bundle
ElaoThemeBundle is a Symfony bundle (work in progress) intended to provide theme support for applications. The repository currently contains minimal documentation and may be incomplete or unstable.
ThemeAwareInterface, ThemeManager) to fit Laravel’s ServiceProvider, View system, and Blade templating.EventDispatcher, HttpKernel, and Twig (if applicable), which are non-trivial to replace in Laravel. Laravel’s event system (Illuminate\Events) and view layer (Blade) are incompatible without significant refactoring.Symfony\Component\DependencyInjection\ContainerInterface instead of ContainerBuilder).Filesystem, Config, or Doctrine (if ORM was used). Laravel’s Filesystem and Config APIs differ, requiring adaptation.Asset component or Webpack Encore. Laravel uses Mix/Vite, introducing build toolchain conflicts.Router is incompatible with Laravel’s Router. Any theme-based route overrides would need manual recreation in Laravel’s RouteServiceProvider.| Risk Area | Severity | Mitigation |
|---|---|---|
| Architectural Mismatch | Critical | Rewrite core logic; avoid direct integration. |
| Deprecated Dependencies | High | Replace Symfony components with Laravel equivalents (e.g., Illuminate\Events). |
| No Community Support | High | Expect no upstream fixes; fork and maintain. |
| Asset/Build Tooling | Medium | Abstract theme assets into Laravel’s Mix/Vite pipeline. |
| Testing Overhead | Medium | Write integration tests for Laravel-specific adaptations. |
view() helper, mix-manifest.json). What unique value does this bundle add?Cache, Filesystem, or Database?elao/theme-manager), but this is reinventing the wheel (Laravel already has theming capabilities).laravel-theme-manager) using Laravel’s:
ServiceProvider for registration.Blade for templating.Illuminate\Filesystem for asset management.Illuminate\View\Factory for dynamic theme switching.ThemeManager, ThemeAwareInterface, etc.).EventDispatcher → Illuminate\Events\Dispatcher).Symfony\Component\HttpKernel → Laravel’s Illuminate\Http\Request/Response.Twig → Blade.AssetComponent → Laravel Mix/Vite.@theme('header')).| Feature | Symfony2 Bundle | Laravel Equivalent | Compatibility Risk |
|---|---|---|---|
| Theme Resolution | ThemeManager |
Custom ServiceProvider + Blade |
High (logic rewrite needed) |
| Asset Management | AssetComponent |
Laravel Mix/Vite | Medium (build toolchain differences) |
| Event System | EventDispatcher |
Illuminate\Events |
Low (direct replacement possible) |
| Dependency Injection | ContainerInterface |
Laravel’s Container |
High (PSR-11 vs. legacy DI) |
| Templating | Twig | Blade | Medium (syntax/feature differences) |
| Routing Overrides | Router |
Laravel RouteServiceProvider |
High (complete rewrite needed) |
ContainerInterface with Laravel’s Container.ThemeManager to use Laravel’s ServiceProvider and Binding.laravel-theme-manager).Twig, HttpKernel), these may break in newer Laravel versions.How can I help you explore Laravel packages today?