1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-08-06 04:54:04 +00:00

Update src/Bootstrappers/BroadcastingConfigBootstrapper.php

Use `instance` instead of `singleton` in `revert()` (they're pretty much equivalent)

Co-authored-by: Samuel Stancl <samuel@archte.ch>
This commit is contained in:
lukinovec 2026-07-13 15:50:52 +02:00 committed by GitHub
parent 31d1663347
commit d535b28d67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,8 +122,8 @@ class BroadcastingConfigBootstrapper implements TenancyBootstrapper
public function revert(): void
{
// Revert the bound BroadcastManager and Broadcaster singletons back to their original state
$this->app->singleton(BroadcastManager::class, fn () => $this->originalBroadcastManager);
$this->app->singleton(BroadcasterContract::class, fn () => $this->originalBroadcaster);
$this->app->instance(BroadcastManager::class, $this->originalBroadcastManager);
$this->app->instance(BroadcasterContract::class, $this->originalBroadcaster);
// Clear the resolved Broadcast facade instance so that it gets re-resolved as the central BroadcastManager
Broadcast::clearResolvedInstance();