generated from Nodarx/template
refactor: migrate to scoped execution contexts
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace KTXM\ProviderImap\Console;
|
||||
|
||||
use KTXC\SessionTenant;
|
||||
use KTXC\Context\TenantContext;
|
||||
use KTXM\ProviderImap\Client\Command\SelectCommand;
|
||||
use KTXM\ProviderImap\Client\FetchOptions;
|
||||
use KTXM\ProviderImap\Client\FetchTarget;
|
||||
@@ -41,7 +41,7 @@ class TestCommand extends Command
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Provider $provider,
|
||||
private readonly SessionTenant $sessionTenant,
|
||||
private readonly TenantContext $tenantContext,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -108,7 +108,7 @@ class TestCommand extends Command
|
||||
return Command::FAILURE;
|
||||
}
|
||||
|
||||
$this->sessionTenant->configureById($tenantId);
|
||||
$this->tenantContext->resolveIdentifier($tenantId);
|
||||
$service = $this->provider->serviceFetch($tenantId, $userId, $serviceId);
|
||||
|
||||
if ($service === null) {
|
||||
@@ -269,7 +269,7 @@ class TestCommand extends Command
|
||||
return;
|
||||
}
|
||||
|
||||
$this->sessionTenant->configureById($tenantId);
|
||||
$this->tenantContext->resolveIdentifier($tenantId);
|
||||
$services = $this->provider->serviceList($tenantId, $userId);
|
||||
|
||||
if ($services === []) {
|
||||
|
||||
Reference in New Issue
Block a user