I'm trying to use symfony mercure bundle but it doesn't seem to work even with the example given on the documentation. here is my code in my controller
/**
* @Route("/test", name="test")
*/
class TestController extends AbstractController
{
public function __invoke(PublisherInterface $publisher): Response
{
$update = new Update(
'/chat',
json_encode(['status' => 'OutOfStock'])
);
// The Publisher service is an invokable object
$publisher($update);
return new Response('published!');
}
}
and this the error i get.
HTTP/1.1 400 Bad Request returned for "http://localhost:3000/.well-known/mercure".
does anyone have any idea what's wrong?
error image here
here is a github link for a my project