Skip to content

Commit 80da484

Browse files
committed
Initial commit
1 parent f50112d commit 80da484

File tree

49 files changed

+197
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+197
-185
lines changed

composer.lock

Lines changed: 36 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Application/EventListener/AccountWorkflowEventListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function onWorkflowAccountCompletedRegister(CompletedEvent $event): void
2828
throw new InvalidArgumentException(message: 'Subject expected to be a valid account.');
2929
}
3030

31-
$account = $this->accountEntityRepository->findOneByUuid($event->getSubject()->getUuid());
31+
$account = $this->accountEntityRepository->findOneById($event->getSubject()->getId());
3232
$this->eventDispatcher->dispatch(new AccountRegisteredEvent($account));
3333
}
3434
}

src/Application/MessageHandler/BlockAccountById/BlockAccountByIdHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __invoke(BlockAccountByIdRequest $message): BlockAccountByIdResu
2525
throw AuthorizationForbiddenException::create();
2626
}
2727

28-
$this->accountWorkflowManager->block($message->uuid);
28+
$this->accountWorkflowManager->block($message->id);
2929

3030
return BlockAccountByIdResult::success();
3131
}

src/Application/MessageHandler/BlockAccountById/BlockAccountByIdRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class BlockAccountByIdRequest
1515
public function __construct(
1616
#[Assert\NotBlank]
1717
#[Assert\Uuid]
18-
public readonly string $uuid = '',
18+
public readonly string $id = '',
1919
) {
2020
}
2121
}

src/Application/MessageHandler/CreateNewAccount/CreateNewAccountHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public function __invoke(CreateNewAccountRequest $message): CreateNewAccountResu
3838

3939
$passwordHash = $this->authenticationPasswordHasher->hash($message->password);
4040
$accountEntity = $this->accountEntityBuilder->build($message->email, $passwordHash, $message->locale);
41-
$accountUuid = $this->accountEntityRepository->save($accountEntity);
41+
$accountId = $this->accountEntityRepository->save($accountEntity);
4242

43-
$this->accountWorkflowManager->register($accountUuid);
44-
$this->accountWorkflowManager->activate($accountUuid);
43+
$this->accountWorkflowManager->register($accountId);
44+
$this->accountWorkflowManager->activate($accountId);
4545

46-
return CreateNewAccountResult::success($accountUuid);
46+
return CreateNewAccountResult::success($accountId);
4747
}
4848
}

src/Application/MessageHandler/CreateNewAccount/CreateNewAccountResult.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
#[Exclude]
1212
final class CreateNewAccountResult extends JsonResponse
1313
{
14-
public static function success(string $uuid): self
14+
public static function success(string $id): self
1515
{
1616
return new self(
1717
data: [
18-
'uuid' => $uuid,
18+
'id' => $id,
1919
],
2020
status: Response::HTTP_CREATED,
2121
);

src/Application/MessageHandler/DeleteAccountById/DeleteAccountByIdHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __invoke(DeleteAccountByIdRequest $message): DeleteAccountByIdRe
2525
throw AuthorizationForbiddenException::create();
2626
}
2727

28-
$this->accountEntityRepository->deleteByUuid($message->uuid);
28+
$this->accountEntityRepository->deleteById($message->id);
2929

3030
return DeleteAccountByIdResult::success();
3131
}

src/Application/MessageHandler/DeleteAccountById/DeleteAccountByIdRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class DeleteAccountByIdRequest
1515
public function __construct(
1616
#[Assert\NotBlank]
1717
#[Assert\Uuid]
18-
public readonly string $uuid = '',
18+
public readonly string $id = '',
1919
) {
2020
}
2121
}

src/Application/MessageHandler/GetAccountById/GetAccountByIdHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __invoke(GetAccountByIdRequest $message): GetAccountByIdResult
2525
throw AuthorizationForbiddenException::create();
2626
}
2727

28-
$account = $this->accountEntityRepository->findOneByUuid($message->uuid);
28+
$account = $this->accountEntityRepository->findOneById($message->id);
2929

3030
return GetAccountByIdResult::success($account);
3131
}

src/Application/MessageHandler/GetAccountById/GetAccountByIdRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class GetAccountByIdRequest
1515
public function __construct(
1616
#[Assert\NotBlank]
1717
#[Assert\Uuid]
18-
public readonly string $uuid = '',
18+
public readonly string $id = '',
1919
) {
2020
}
2121
}

0 commit comments

Comments
 (0)