Skip to content

Releases: spatie/laravel-multitenancy

4.2.0

Choose a tag to compare

@freekmurze freekmurze released this 07 Aug 12:47
6c1e657

What's Changed

Processing a job no longer leaves the surrounding code with a different current tenant than it had before (#639, #643).

On the sync connection and through dispatchSync(), a job runs inside the request that dispatched it. A job that is not tenant aware forgot the current tenant and never put it back, so the rest of the request continued without one. A tenant aware job for another tenant left that other tenant current. Whatever tenant was current before a job starts is now restored when it finishes, on both the success and the failure path, and nested sync dispatches restore per level.

queue:retry behaves the same way. It needs the tenant of a failed job while it pushes that job back onto the queue, but the tenant of the code that ran the command is restored once it finishes. This matters when retrying jobs from a request with Artisan::call('queue:retry').

Behaviour worth knowing about when upgrading: on a queue worker the tenant of a processed job no longer stays current after that job finishes. Every job binds its own tenant, so jobs are unaffected, but code reading Tenant::current() in between jobs now sees no tenant. Listeners that are part of processing a job, Queue::after() and JobFailed for instance, still see the tenant of the job they are handling.

  • Update actions/checkout to v7 (#644)

Full Changelog: 4.1.5...4.2.0

4.1.5

Choose a tag to compare

@masterix21 masterix21 released this 22 Jul 11:58
0e4dd42

What's Changed

  • Fix tenant id retrival during job retry by @gazben in #642

Full Changelog: 4.1.4...4.1.5

4.1.4

Choose a tag to compare

@masterix21 masterix21 released this 17 Jul 09:01
1d60c6b

What's Changed

  • Support legacy queue payloads in tenant-awareness detection by @ragulka in #640

New Contributors

Full Changelog: 4.1.3...4.1.4

4.1.3

Choose a tag to compare

@freekmurze freekmurze released this 22 May 12:31
ff3d16f

What's Changed

  • Resolve tenant from payload context when retrying jobs by @freekmurze in #638

Full Changelog: 4.1.2...4.1.3

4.1.2

Choose a tag to compare

@masterix21 masterix21 released this 13 May 07:23
2665689

What's Changed

New Contributors

Full Changelog: 4.1.1...4.1.2

4.1.1

Choose a tag to compare

@masterix21 masterix21 released this 12 Apr 21:07
92e750f

What's Changed

  • Add description to TenantsArtisanCommand by @dac514 in #633

New Contributors

Full Changelog: 4.1.0...4.1.1

4.0.9

Choose a tag to compare

@freekmurze freekmurze released this 09 Feb 18:36
c766205

What's Changed

Full Changelog: 4.0.8...4.0.9

4.0.7

Choose a tag to compare

@masterix21 masterix21 released this 26 Sep 16:06
6bf5a69

What's Changed

New Contributors

Full Changelog: 4.0.6...4.0.7

4.0.6

Choose a tag to compare

@masterix21 masterix21 released this 26 Sep 14:45

What's Changed

New Contributors

Full Changelog: 4.0.5...4.0.6

4.0.5

Choose a tag to compare

@masterix21 masterix21 released this 12 May 09:57
7b43b33

What's Changed

  • Update using-multiple-databases.md by @najbo in #584
  • [Bugfix]: Jobs with ShouldBeEncrypted need to be decrypted by @Joel-Jensen in #588

New Contributors

Full Changelog: 4.0.4...4.0.5