Skip to content

Commit 57deb64

Browse files
committed
bug #653 [Turbo] Fix checking "topics" option in Broadcaster (wooky)
This PR was merged into the 2.x branch. Discussion ---------- [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. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | 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 ------- 17129ec [Turbo] Fix checking "topics" option in Broadcaster
2 parents 88d9a0f + 17129ec commit 57deb64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Turbo/src/Bridge/Mercure/Broadcaster.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function broadcast(object $entity, string $action, array $options): void
7070
throw new \InvalidArgumentException(sprintf('Cannot broadcast entity of class "%s" as option "rendered_action" is missing.', $entityClass));
7171
}
7272

73-
if (!isset($options['topic']) && !isset($options['id'])) {
73+
if (!isset($options['topics']) && !isset($options['id'])) {
7474
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));
7575
}
7676

0 commit comments

Comments
 (0)