ashleydawson/multibundle
Group and register multiple dependent Symfony2 bundles as a single logical unit. Extend AbstractMultiBundle to declare required bundles, then call registerInto() in AppKernel to add the bundle and its dependencies in one step.
Kernel class (Illuminate\Foundation\Application) lacks the registerBundles() method used by this package. A wrapper class would need to be created to bridge the gap.Bundle/ namespaces, while Laravel packages use Vendor/Package/. Manual namespace resolution or custom autoloading rules would be required.KernelEvents, while Laravel uses Events and ServiceProvider boot methods. Cross-system event dispatching would need custom logic.Why Symfony Bundles in Laravel?
Modern Alternatives
spatie/laravel-package-tools) for modular extensions?Compatibility Testing
Long-Term Viability
BundleLoader class to mimic Symfony’s BundleInterface.KernelEvents to Laravel’s Events.Assessment Phase (1–2 days)
Bundle classes to Laravel ServiceProvider/Package equivalents.Proof-of-Concept (3–5 days)
Multibundle facade that:
app->register().Illuminate\Contracts\Foundation\Application instead of Symfony’s Kernel.Refactoring (1–2 weeks)
Bundle classes with Laravel-compatible packages (e.g., Vendor/BundleName).Resources/ directories.Kernel::BOOT → Laravel’s booted event).Testing & Optimization (3–5 days)
Illuminate\Container, not Symfony’s ContainerInterface. A DI bridge (e.g., symfony/di + Laravel’s container) may be needed.routing.yml. Laravel uses routes/web.php or RouteServiceProvider. A route collector would need to parse Symfony routes.twig/bridge) would be required.Illuminate\Support\ServiceProvider, not Symfony\Component\HttpKernel\Bundle\Bundle.Kernel::handle()) must be converted to Laravel middleware (Handle classes).| Phase | Task | Dependencies |
|---|---|---|
| 1. Analysis | Document Symfony bundle requirements. | Business stakeholders. |
| 2. Abstraction | Build Multibundle facade. |
Laravel kernel access. |
| 3. Bundle Porting | Convert 1–2 bundles to Laravel packages. | Custom autoloader. |
| 4. Event Bridge | Map Symfony events to Laravel. | Event dispatcher. |
| 5. Testing | Validate functionality with legacy Symfony bundles. | Test suite. |
| 6. Optimization | Profile and refactor for performance. | Benchmark data. |
| 7. Deployment | Migrate in stages (e.g., non-critical bundles first). | CI/CD pipeline. |
BundleNotFoundException may originate from custom loader logic, not the original package.| Risk | Impact | Mitigation Strategy |
|---|---|---|
| Bundle Load Order Issues | Critical services fail to register. | Enforce dependency graphs; use priority in service providers. |
| DI Container Conflicts | Symfony Bundle services clash with Laravel bindings. |
Use when() in Laravel’s container to override Symfony services. |
| Event Dispatching Failures | Symfony events not fired in Laravel. | Implement a fallback event system (e.g., log missed events). |
| PHP Version Incompatibility | PHP 8.x breaks legacy Symfony2 code. | Use php80 polyfills or fork the package. |
| Security Vulnerabilities | Abandoned |
How can I help you explore Laravel packages today?