Releases: spatie/laravel-multitenancy
Release list
4.2.0
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
What's Changed
Full Changelog: 4.1.4...4.1.5
4.1.4
4.1.3
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
What's Changed
- Add Laravel Boost skill by @victoryoalli in #635
New Contributors
- @victoryoalli made their first contribution in #635
Full Changelog: 4.1.1...4.1.2
4.1.1
4.0.9
What's Changed
- Fix #617: Add default value for TasksCollection constructor parameter by @freekmurze in #625
- Fix #620: Handle JobRetryRequested in queue tenant awareness by @freekmurze in #624
Full Changelog: 4.0.8...4.0.9
4.0.7
What's Changed
- Fix syntax for tenant aware interface config by @danharrin in #608
New Contributors
- @danharrin made their first contribution in #608
Full Changelog: 4.0.6...4.0.7
4.0.6
What's Changed
- Command state persistence with
TenantAwareby @SethSharp in #602 - Add types to TenantCollection by @markieo1 in #596
- Update issue template by @AlexVanderbist in #603
- feat: Add configuration option to specify
TenantAwareandNotTenantAwareinterfaces by @przemyslaw-przylucki in #607
New Contributors
- @SethSharp made their first contribution in #602
- @markieo1 made their first contribution in #596
- @przemyslaw-przylucki made their first contribution in #607
Full Changelog: 4.0.5...4.0.6
4.0.5
What's Changed
- Update using-multiple-databases.md by @najbo in #584
- [Bugfix]: Jobs with
ShouldBeEncryptedneed to be decrypted by @Joel-Jensen in #588
New Contributors
- @najbo made their first contribution in #584
- @Joel-Jensen made their first contribution in #588
Full Changelog: 4.0.4...4.0.5