Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Turbo] Add stream format with request listener #2550

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

aleho
Copy link
Contributor

@aleho aleho commented Feb 5, 2025

Q A
Bug fix? yes
New feature? no
Issues Fix #2549
License MIT

BundleInterface::boot() is only called when booting a worker and not on every request. So on FrankenPHP for example Turbo requests would never return a stream when checking with if ($request->getPreferredFormat() === TurboBundle::STREAM_FORMAT.

This replaces TurboBundle::boot() with a request listener to register the format on every request.

@carsonbot carsonbot added Bug Bug Fix Turbo Status: Needs Review Needs to be reviewed labels Feb 5, 2025
BundleInterface::boot() is only called when booting a worker and not on
every request.

Fixes symfony#2549
@aleho aleho force-pushed the fix/turbo-stream-format-workers branch from a770555 to 2d28de2 Compare February 5, 2025 10:05
@aleho
Copy link
Contributor Author

aleho commented Feb 5, 2025

The failing tests are in LiveComponents and a timeout in webdriver. I hope they're not related to my changes ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Status: Needs Review Needs to be reviewed Turbo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Turbo] Request format is not registered for workers
2 participants