fix: initialize Collection properties to handle queue deserialization edge cases
This commit is contained in:
parent
eefcb6fc35
commit
85b73a8c00
1 changed files with 14 additions and 0 deletions
|
|
@ -105,6 +105,20 @@ public function __construct(public Server $server, public $data)
|
|||
|
||||
public function handle()
|
||||
{
|
||||
// Defensive initialization for Collection properties to handle queue deserialization edge cases
|
||||
$this->serviceContainerStatuses ??= collect();
|
||||
$this->applicationContainerStatuses ??= collect();
|
||||
$this->foundApplicationIds ??= collect();
|
||||
$this->foundDatabaseUuids ??= collect();
|
||||
$this->foundServiceApplicationIds ??= collect();
|
||||
$this->foundApplicationPreviewsIds ??= collect();
|
||||
$this->foundServiceDatabaseIds ??= collect();
|
||||
$this->allApplicationIds ??= collect();
|
||||
$this->allDatabaseUuids ??= collect();
|
||||
$this->allTcpProxyUuids ??= collect();
|
||||
$this->allServiceApplicationIds ??= collect();
|
||||
$this->allServiceDatabaseIds ??= collect();
|
||||
|
||||
// TODO: Swarm is not supported yet
|
||||
if (! $this->data) {
|
||||
throw new \Exception('No data provided');
|
||||
|
|
|
|||
Loading…
Reference in a new issue