braunstetter/control-panel-bundle
Symfony/Bundle, Symfony/DependencyInjection).laravelcollective/html or tightenco/ziggy, but template inheritance/hook systems (e.g., TemplateHooksBundle) would require custom implementation.FormType system maps to Laravel’s FormRequest/Form classes, but validation and rendering would need manual adaptation.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony → Laravel gaps | High | Abstract core logic into Laravel-compatible layers (e.g., rewrite Bundle as a Laravel package). |
| Template hooks system | Medium | Implement a lightweight hook system (e.g., Laravel’s view composer or blade directives). |
| Doctrine ↔ Eloquent | Medium | Use a data mapper or write adapters for critical entities. |
| Frontend asset pipeline | Low | Configure Vite/Mix to replace Webpack Encore. |
| Long-term maintenance | High | Fork and maintain if upstream Symfony changes break compatibility. |
| Component | Symfony Bundle | Laravel Equivalent | Integration Notes |
|---|---|---|---|
| Bundle/Package | ControlPanelBundle |
Laravel Package (e.g., braunstetter/control-panel) |
Rewrite Bundle as a Laravel package with ServiceProvider. |
| Templates | Twig + hooks | Blade or Twig | Replace base.html.twig with Blade templates; implement hook system via Blade directives. |
| Forms | Symfony Form | Laravel Form (or custom) | Adapt FormType to Laravel’s FormRequest or use a library like laravel-form. |
| Routing | Symfony Router | Laravel Router | Rewrite routes in routes/admin.php; use middleware for admin guards. |
| Assets | Webpack Encore | Vite/Mix | Migrate assets to Vite; replace Encore entries. |
| ORM | Doctrine | Eloquent | Use a data mapper or rewrite entity logic. |
| Dependency Injection | Symfony DI | Laravel Container | Replace services.yaml with register() in ServiceProvider. |
Assessment Phase (2–4 weeks)
symfony/*, twig/*) and map to Laravel equivalents.Abstraction Layer (4–8 weeks)
Bundle with a ServiceProvider./packages/control-panel-laravel
/src/
ServiceProvider.php
BladeDirectives.php (for hooks)
FormAdapters/ (if using custom forms)
/resources/views/
(Blade/Twig templates)
Feature-by-Feature Port
Testing & Validation
Events system.Gate/Policy.trans() helper instead of Symfony’s translator.spatie/laravel-permission for RBAC).| Priority | Task | Dependencies |
|---|---|---|
| 1 | Template system (Blade/Twig) | None |
| 2 | Routing and middleware | Template system |
| 3 | Basic authentication (e.g., Sanctum) | Routing |
| 4 | Form types adaptation | Template system |
| 5 | Asset pipeline migration | Frontend dependencies resolved |
| 6 | ORM/data layer (Doctrine ↔ Eloquent) | Core features working |
| 7 | Custom logic (page types, etc.) | All prior features |
replace in composer.json to point to a fork.How can I help you explore Laravel packages today?