fix(livewire): scope DatabaseProxyStopped to proxy fields, harden status trait

Clickhouse, Dragonfly, and Keydb still called syncData() inside the
DatabaseProxyStopped broadcast handler, clobbering in-progress edits to
name/description/credentials. Refresh only is_public/public_port/
public_port_timeout instead, matching the pattern used elsewhere.

Also null-guard HasDatabaseStatusInfo::getListeners() against an absent
Auth::user()/currentTeam(), add explicit return types on getListeners()
and render(), and convert inline comments in the SSL refresh test to a
PHPDoc block.
This commit is contained in:
Aditya Tripathi committed 2026-05-21 10:24:49 +00:00
1 parent e7e65831a7
commit 7a3fcd37d5
5 files changed
+37 -18

No files matched your search

@@ -78,11 +78,13 @@ it('does not subscribe the form to status broadcasts when display lives in a sib
->not->toHaveKey("echo-private:team.{$this->team->id},ServiceStatusChanged");
})->with('database-general-forms-without-broadcasts');
/**
* Resolve a Livewire component's listeners regardless of whether the subclass
* exposes getListeners() publicly or only declares a $listeners array — the
* HandlesEvents trait keeps getListeners() protected by default.
*/
function resolveLivewireListeners(object $component): array
{
// Livewire's HandlesEvents trait declares getListeners() as protected,
// so subclasses that override it as public are callable directly, but
// subclasses that rely on $listeners are not. Reflection handles both.
$method = new ReflectionMethod($component, 'getListeners');
$method->setAccessible(true);