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

remove JobBatchBootstrapper

This commit is contained in:
Samuel Štancl 2025-07-10 01:08:49 +02:00
parent 393f263f03
commit d8af9b4b43

View file

@ -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();
}
}