You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: src/Turbo/src/Bridge/Mercure/Broadcaster.php
+1-1
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ public function broadcast(object $entity, string $action, array $options): void
70
70
thrownew \InvalidArgumentException(sprintf('Cannot broadcast entity of class "%s" as option "rendered_action" is missing.', $entityClass));
71
71
}
72
72
73
-
if (!isset($options['topic']) && !isset($options['id'])) {
73
+
if (!isset($options['topics']) && !isset($options['id'])) {
74
74
thrownew \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));
0 commit comments