- Does Symfony UX Turbo work with Laravel?
- No. Symfony UX Turbo is a Symfony bundle integrating Hotwire Turbo into Symfony applications, and it depends on Symfony components and Twig conventions. Laravel developers should use a Laravel-specific Turbo package or manual integration instead. Installing symfony/ux-turbo in Laravel is not a supported path.
- What Symfony and PHP versions does symfony/ux-turbo require?
- As of v3.x, symfony/ux-turbo requires Symfony 7.4+ and PHP 8.4+. Older Symfony or PHP versions need an upgrade path before adopting v3. This hard version lock is the main compatibility gate for evaluation. Check Composer constraints before planning adoption.
- How do I install Symfony UX Turbo in a Symfony app?
- Install it via Composer and enable the bundle, typically with Symfony Flex handling registration. Then include Turbo's JavaScript through your asset pipeline or the default setup. Vanilla JavaScript or StimulusBundle is enough, and Webpack or ESBuild is not required for the default setup.
- Do I need Mercure to use Symfony UX Turbo?
- No. Turbo works without Mercure for page transitions and Turbo Frames. Mercure is only needed for real-time broadcasting of DOM updates to connected users. For real-time features, require symfony/mercure-bundle ^0.6+ and Mercure ^0.9; v3.6.0 supports Mercure protocol 1.0 through turbo_stream_from().
- What are Turbo Frames and Turbo Streams in Symfony UX Turbo?
- Turbo Frames isolate parts of a page for partial updates, so you can enhance components gradually before full-page transitions. Turbo Streams send DOM changes over transports such as Mercure to update all connected users. Symfony UX Turbo provides Twig components like <twig:Turbo:Frame> and <twig:Turbo:Stream>, plus turbo_stream_from() and turbo_is_frame_request(). This keeps the approach Twig-centric.
- Can I use Symfony UX Turbo without writing JavaScript?
- Mostly yes. Turbo enables SPA-like speed with declarative data-turbo-* attributes and server-rendered HTML. You may still write some JavaScript for custom behavior or integration with Stimulus, jQuery, or other tools. Complex client-side state management may need complementary libraries, but the backend remains primarily PHP and Twig.
- How do I test Symfony UX Turbo features?
- Test server-rendered responses and Turbo Frame requests with Symfony's functional testing tools. Use turbo_is_frame_request() to branch behavior and assert frame-specific responses. For Mercure broadcasts, test the dispatched updates or mock the Mercure hub in integration tests. Also verify fallback routes with JavaScript disabled.
- Is Symfony UX Turbo production-ready and maintained?
- Yes, it is part of Symfony UX and maintained in the main Symfony UX repository. It is backed by Mercure.rocks and has official documentation. The repository is a read-only sub-tree split, so issues and pull requests go to symfony/ux. Production use requires matching Symfony 7.4+ and PHP 8.4+ constraints.
- What breaking changes should I know before upgrading Symfony UX Turbo?
- v3.0+ removed backward-compatibility layers, including deprecated TurboStreamListenRendererInterface. Teams using symfony/ux-turbo-mercure must migrate to mercure-bundle. v2.13+ uses ES Modules with type: module, which can affect asset pipelines. v3.6.0 resolves an Asset Mapper 8.2+ conflict and only triggers the TurboStreamListenRenderer deprecation when the service is used.
- What are alternatives to Symfony UX Turbo for Laravel or Symfony?
- For Symfony, alternatives include HTMX, Alpine.js, Stimulus, or a full SPA framework. For Laravel, look at Laravel-specific Turbo or Livewire packages rather than symfony/ux-turbo. Turbo itself pairs well with Alpine.js or HTMX for dynamic UI pieces. Symfony UX Turbo is best when you want to stay Twig-centric and avoid a frontend overhaul.