1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 18:04:03 +00:00

Make $tenantId nullable in initializeTenancyForQueue (revert phpstan change)

This commit is contained in:
Samuel Štancl 2022-11-29 10:25:22 +01:00
parent b2dc0844eb
commit ad29909a16

View file

@ -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