From 17129ec6ea238c35612d891760b7c0ecb613f57a Mon Sep 17 00:00:00 2001 From: Yakov Lipkovich Date: Thu, 19 Jan 2023 14:20:17 -0700 Subject: [PATCH] [Turbo] Fix checking "topics" option in Broadcaster Mercure Broadcaster class was checking for the "topic" option, which is incorrect. This fixes that by checking for "topics" option instead. --- src/Turbo/src/Bridge/Mercure/Broadcaster.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Turbo/src/Bridge/Mercure/Broadcaster.php b/src/Turbo/src/Bridge/Mercure/Broadcaster.php index d66b616687f..c7b313400b9 100644 --- a/src/Turbo/src/Bridge/Mercure/Broadcaster.php +++ b/src/Turbo/src/Bridge/Mercure/Broadcaster.php @@ -70,7 +70,7 @@ public function broadcast(object $entity, string $action, array $options): void throw new \InvalidArgumentException(sprintf('Cannot broadcast entity of class "%s" as option "rendered_action" is missing.', $entityClass)); } - if (!isset($options['topic']) && !isset($options['id'])) { + if (!isset($options['topics']) && !isset($options['id'])) { throw new \InvalidArgumentException(sprintf('Cannot broadcast entity of class "%s": either option "topics" or "id" is missing, or the PropertyAccess component is not installed. Try running "composer require property-access".', $entityClass)); }