From ad29909a16aaefefeae74ddbe066f42d49ba21b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 29 Nov 2022 10:25:22 +0100 Subject: [PATCH] Make $tenantId nullable in initializeTenancyForQueue (revert phpstan change) --- src/Bootstrappers/QueueTenancyBootstrapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bootstrappers/QueueTenancyBootstrapper.php b/src/Bootstrappers/QueueTenancyBootstrapper.php index 5b6ef4d8..92c95ef6 100644 --- a/src/Bootstrappers/QueueTenancyBootstrapper.php +++ b/src/Bootstrappers/QueueTenancyBootstrapper.php @@ -79,9 +79,9 @@ class QueueTenancyBootstrapper implements TenancyBootstrapper $dispatcher->listen(JobFailed::class, $revertToPreviousState); // artisan('queue:work') which fails } - protected static function initializeTenancyForQueue(string|int $tenantId): void + protected static function initializeTenancyForQueue(string|int|null $tenantId): void { - if (! $tenantId) { + if ($tenantId === null) { // The job is not tenant-aware if (tenancy()->initialized) { // Tenancy was initialized, so we revert back to the central context