symfony-cmf/core-bundle
Symfony CMF Core Bundle provides shared infrastructure for CMF bundles: base classes, helpers, configuration and integration glue for Symfony projects. Supports content repositories (e.g., PHPCR), routing, and common services to build content-managed sites.
symfony-cmf/core-bundle aligns well with Laravel’s modular architecture, particularly if the application leverages content management (CMS) patterns (e.g., dynamic content rendering, route-based content resolution). Its Symfony roots suggest a declarative, event-driven approach, which can complement Laravel’s service container and event system (via Illuminate\Events).spatie/laravel-medialibrary, spatie/laravel-activitylog) may reduce dependency on this bundle for core CMS features.Symfony\CMF\Component\Routing\RouteObjectInterface) clashing with Laravel’s conventions. A wrapper layer (e.g., custom facades, service providers) may be needed to bridge gaps.{{ $document->render() }})./blog/{slug} → Post model), which aligns with Laravel’s implicit route binding but may require custom middleware.@Route annotations could conflict with Laravel’s Route::get() syntax; a hybrid approach (e.g., using Laravel’s Route::bind() + bundle metadata) may be preferable.symfony/routing, symfony/http-foundation), which are not natively in Laravel. Composer will auto-resolve these, but version conflicts (e.g., Symfony 6.x vs. Laravel’s Symfony 5.x) could arise.App\Providers\RouteServiceProvider would need customization.ContainerInterface may force Laravel to adopt Symfony’s service locator pattern, increasing coupling.KernelEvents) adds complexity compared to Laravel’s simpler event model.HttpFoundation request/response objects differ from Laravel’s Illuminate\Http\Request; unit tests may need mocking layers.spatie/laravel-cms, laravel-nova, or custom Blade components?symfony/routing only) to avoid full bundle adoption?Route::model('post', Post::class)) interact with the bundle’s RouteObject system?spatie/laravel-cms, laravel-nova, or custom resource controllers + Blade.symfony/routing) with Laravel wrappers.composer require symfony-cmf/core-bundle).{{ $document->render() }} in Blade) and route resolution.RouteObject (if needed) alongside Laravel’s native routes.KernelEvents) via Laravel’s event system.App\Providers\CmfServiceProvider) to:
public function register()
{
$this->app->singleton(\Symfony\Component\HttpFoundation\Request::class, function () {
return Request::capture();
});
}
| Laravel Feature | Bundle Compatibility | Workaround |
|---|---|---|
| Route Model Binding | Low (Symfony’s RouteObject vs. Laravel’s bind) |
Use middleware to reconcile route objects. |
| Blade Templating | High (supports {{ $document->render() }}) |
Custom Blade directives for bundle-specific tags. |
| Service Container | Medium (Symfony DI vs. Laravel’s Pimple) | Bind Symfony services to Laravel interfaces. |
| Middleware Pipeline | High (integrates with Laravel’s middleware) | Wrap Symfony middleware in Laravel’s stack. |
| Events | Medium (Symfony KernelEvents vs. Laravel Events) |
Dispatch Symfony events to Laravel listeners. |
symfony-cmf/routing for multi-site routing if needed.symfony/* dependencies to avoid conflicts with Laravel’s Symfony 5.x components.core-bundle issues may not align with Laravel’s use case.laravel-debugbar.Cache::remember) to store rendered content.RouteCollection) may need optimization for high-traffic sites.| Risk | Impact | Mitigation |
|---|---|---|
| Symfony-Laravel Abstraction Mismatch | Routes/templates break silently. | Use feature flags to toggle bundle functionality. |
| Version Conflict | Symfony 6.x breaks Laravel’s Symfony 5.x. | Use platform-check in composer.json. |
| Event System Overhead | Slow request processing. |
How can I help you explore Laravel packages today?