Skip to content

Commit 75d5ddc

Browse files
committed
the provider can be sigleton but the client needs to be updated
1 parent 623bbeb commit 75d5ddc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Providers/Traits/Singleton.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public static function getInstance(Client $client)
2525
if (!static::$instance) {
2626
static::$instance = new static($client);
2727
}
28+
29+
// since we can call this for multiple clients we
30+
// make sure this client is updated with the latest one
31+
static::$instance->setClient($client);
2832
return static::$instance;
2933
}
3034

0 commit comments

Comments
 (0)