symfony/framework-bundle
Symfony FrameworkBundle tightly integrates Symfony components into the full-stack framework, providing core framework services and configuration. Part of the main Symfony repository; see official docs for contributing, issues, and pull requests.
The Symfony FrameworkBundle is a core component of the Symfony full-stack framework, designed to tightly integrate Symfony components (e.g., HTTP kernel, dependency injection, configuration, routing, and event dispatching) into a cohesive framework. For a Laravel-based application, this package is not a direct fit due to fundamental architectural differences:
HttpKernel and Laravel’s Kernel.config/*.php). A unified configuration resolver would be needed.HttpFoundation, DependencyInjection) could be adopted piecemeal, but the FrameworkBundle itself is not modular for this purpose.KernelTestCase vs. Laravel’s HttpTestCase), increasing CI/CD complexity.Why Symfony?
Integration Scope
Performance and Scalability
Team Expertise
spatie/laravel-symfony-components) that could achieve the same goals with lower risk?Future-Proofing
HttpFoundation, DependencyInjection) could be adopted, but the FrameworkBundle itself is not modular for this.Assessment Phase:
spatie/laravel-symfony-components, symfony/http-foundation standalone) that offer Symfony features without the full bundle.Pilot Integration (Low Risk):
HttpFoundation for request/response handling, DependencyInjection for advanced DI) via Composer.Symfony\Component\HttpFoundation\Request as a Laravel service).// config/app.php
'providers' => [
App\Providers\SymfonyRequestServiceProvider::class,
];
HttpKernel for specific routes/middleware.Full Framework Integration (High Risk):
HttpKernel (e.g., via a Symfony-compatible facade).symfony/dependency-injection, symfony/http-kernel), which may conflict with Laravel’s dependencies.replace in composer.json to avoid version conflicts or isolate Symfony dependencies in a separate namespace.Config component to parse Laravel’s config/*.php files.Illuminate\Routing) is incompatible with Symfony’s (symfony/routing). A router adapter would be required.symfony/http-kernel) differs from Laravel’s. A middleware bridge would need to map between the two.Phase 1: Component Adoption (3-6 weeks)
HttpFoundation, VarDumper).Phase 2: Hybrid Integration (6-12 weeks)
Phase 3: Full Migration (3-6 months)
console component.Application class within Laravel’s Artisan or vice versa.How can I help you explore Laravel packages today?