-
-
Notifications
You must be signed in to change notification settings - Fork 399
Open
Labels
BugBug FixBug FixStatus: Waiting feedbackNeeds feedback from the authorNeeds feedback from the authorTurbo
Description
Hey everyone! 👋🏻
I updated symfony/ux-turbo from v2.23.0 to 2.25.2 and my tests (WebTestCase) started failing with this error
ErrorException: An exception has been thrown during the rendering of a template
("Too few arguments to function Symfony\UX\Turbo\Bridge\Mercure\TurboStreamListenRenderer::__construct(),
3 passed in /app/var/cache/test/ContainerO3ffV3d/getTurbo_Mercure_Default_RendererService.php
on line 31 and exactly 4 expected") in "foo.html.twig" at line 31.
On line 31 is turbo_stream_listen.
Additionally, I havemercure.hub.default mocked according to these instructions https://symfony.com/doc/current/mercure.html#testing
I see that this PR #2447 has been merged in v2.24.0, and a lot of things related to turbo_stream_listen has changed, including RegisterMercureHubsPass. It loops through mercure.hub tags, so I ended up with this solution
# config/services_test.yaml
services:
mercure.hub.default:
class: Tests\Services\MockMercureHub
tags:
- 'mercure.hub'Reporting this because I'm not sure if this is a bug or if the documentation has to be updated.
Metadata
Metadata
Assignees
Labels
BugBug FixBug FixStatus: Waiting feedbackNeeds feedback from the authorNeeds feedback from the authorTurbo