mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 09:34:04 +00:00
remove JobBatchBootstrapper
This commit is contained in:
parent
393f263f03
commit
d8af9b4b43
1 changed files with 0 additions and 39 deletions
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Bootstrappers;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
|
|
||||||
use Stancl\Tenancy\Contracts\Tenant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds support for running queued tenant jobs in batches.
|
|
||||||
*
|
|
||||||
* @deprecated Doesn't seem to 1. be necessary, 2. work correctly in Laravel 11. Please don't use this bootstrapper, the class will be removed before release.
|
|
||||||
*/
|
|
||||||
class JobBatchBootstrapper implements TenancyBootstrapper
|
|
||||||
{
|
|
||||||
public function __construct(
|
|
||||||
protected Application $app,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
public function bootstrap(Tenant $tenant): void
|
|
||||||
{
|
|
||||||
$this->deprecatedNotice();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function deprecatedNotice(): void
|
|
||||||
{
|
|
||||||
if ($this->app->environment() == 'local' && $this->app->hasDebugModeEnabled()) {
|
|
||||||
throw new Exception("JobBatchBootstrapper is not supported anymore, please remove it from your tenancy config. Job batches should work out of the box in Laravel 11. If they don't, please open a bug report.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function revert(): void
|
|
||||||
{
|
|
||||||
$this->deprecatedNotice();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue