Skip to content

Commit 5c1c35c

Browse files
committed
minor #2766 [Turbo] Fix Turbo CI (PHPStan & Functional tests) (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- [Turbo] Fix Turbo CI (PHPStan & Functional tests) | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | 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 description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Looks like the CI for Turbo was broken for a moment... let's fix it :) Commits ------- de6f26f [Turbo] Fix Turbo CI (PHPStan & Functional tests)
2 parents f708759 + de6f26f commit 5c1c35c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ public function broadcast(object $entity, string $action, array $options): void
6868
$topics = [];
6969

7070
foreach ((array) ($options['topics'] ?? []) as $topic) {
71+
// @phpstan-ignore function.alreadyNarrowedType ($topic should always be a string given the PHPDoc... could be removed in 3.x)
72+
if (!\is_string($topic)) {
73+
$topics[] = $topic;
74+
continue;
75+
}
76+
7177
if (!str_starts_with($topic, '@=')) {
7278
$topics[] = $topic;
7379
continue;

0 commit comments

Comments
 (0)