Skip to content

Commit dbe5586

Browse files
committed
minor #287 Wrong class used in turbo streams (htmlshaman1, weaverryan)
This PR was merged into the 2.x branch. Discussion ---------- Wrong class used in turbo streams TurboBundle::STREAM_FORMAT doesn't exist, that static variable was moved to TurboStreamResponse::STREAM_FORMAT. Also the stream didn't work for me unless I changed: $this->render('task/success.stream.html.twig', ['task' => $task]); to $this->render('task/success.stream.html.twig', ['task' => $task], new TurboStreamResponse()); | Q | A | ------------- | --- | Bug fix? | yes/no | New feature? | yes/no <!-- please update src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Never break backward compatibility (see https://symfony.com/bc). - Features and deprecations must be submitted against branch main. --> Commits ------- 1abee43 minor cleanups 320efe3 I think I got it 5eef995 Added a message about it was done in version 2.0 e411a77 Wrong class used in turbo streams
2 parents 5583bc9 + 1abee43 commit dbe5586

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Turbo/Resources/doc/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,11 @@ clients. There are two main ways to receive the updates:
300300
Forms
301301
^^^^^
302302

303+
.. versionadded:: 2.1
304+
305+
Prior to 2.1, ``TurboStreamResponse::STREAM_FORMAT`` was used instead of ``TurboBundle::STREAM_FORMAT``.
306+
Also, one had to return a new ``TurboStreamResponse()`` object as the third argument to ``$this->render()``.
307+
303308
Let's discover how to use Turbo Streams to enhance your `Symfony forms`_::
304309

305310
// src/Controller/TaskController.php

0 commit comments

Comments
 (0)