From 436197fbfed5cc1dba332d60a1afcadc483f99c5 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 27 Jul 2026 00:50:43 -0400 Subject: [PATCH] refactor: migrate to scoped execution contexts Signed-off-by: Sebastian --- lib/Controllers/CompositionController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Controllers/CompositionController.php b/lib/Controllers/CompositionController.php index 47df067..c056bd4 100644 --- a/lib/Controllers/CompositionController.php +++ b/lib/Controllers/CompositionController.php @@ -7,8 +7,8 @@ namespace KTXM\Mail\Controllers; use InvalidArgumentException; use KTXC\Http\Response\JsonResponse; use KTXC\Http\Response\Response; -use KTXC\SessionIdentity; -use KTXC\SessionTenant; +use KTXC\Context\IdentityContextInterface; +use KTXC\Context\TenantContextInterface; use KTXF\Controller\ControllerAbstract; use KTXF\Routing\Attributes\AuthenticatedRoute; use KTXM\Mail\CompositionManager; @@ -18,8 +18,8 @@ use Throwable; final class CompositionController extends ControllerAbstract { public function __construct( - private readonly SessionTenant $tenantIdentity, - private readonly SessionIdentity $userIdentity, + private readonly TenantContextInterface $tenantContext, + private readonly IdentityContextInterface $identityContext, private readonly CompositionManager $compositionManager, private readonly LoggerInterface $logger, ) {} @@ -31,8 +31,8 @@ final class CompositionController extends ControllerAbstract { string|null $operation = null, array|null $data = null, ): Response { - $tenantId = $this->tenantIdentity->identifier(); - $userId = $this->userIdentity->identifier(); + $tenantId = $this->tenantContext->identifier(); + $userId = $this->identityContext->identifier(); try { if ($operation === null) {