diff --git a/bin/createApi.php b/bin/createApi.php
index 24c4b0b..8be687c 100644
--- a/bin/createApi.php
+++ b/bin/createApi.php
@@ -201,8 +201,8 @@ use Psr\\Http\\Server\\RequestHandlerInterface;
class {$apiHandlerName} implements RequestHandlerInterface
{
public function __construct(
- private readonly {$cqrsHandlerName} \${$cqrsHandlerVariableName},
- private readonly {$cqrsBuilderName} \${$cqrsBuilderVariableName},
+ private readonly {$cqrsHandlerName} \$handler,
+ private readonly {$cqrsBuilderName} \$builder,
private readonly {$apiResponseFormatterName} \$responseFormatter,
) {
}
@@ -211,10 +211,10 @@ class {$apiHandlerName} implements RequestHandlerInterface
{
\$data = \$request->getAttribute(AnalyzeBodyMiddleware::JSON_DATA);
- \${$cqrsVariableName} = \$this->{$cqrsBuilderVariableName}->build(
+ \${$cqrsVariableName} = \$this->builder->build(
\$data
);
- \$result = \$this->{$cqrsHandlerVariableName}->execute(\${$cqrsVariableName});
+ \$result = \$this->handler->execute(\${$cqrsVariableName});
return new SuccessResponse(\$this->responseFormatter->format(\$result));
}
@@ -251,10 +251,10 @@ namespace {$cqrsHandlerNamespace};
class {$cqrsName}
{
public function __construct(
- #TODO
- ) {
+ #TODO
+ ) {
}
-
+
#TODO
}
";
@@ -270,14 +270,12 @@ class {$cqrsHandlerName}
{
public function __construct(
#TODO
- ) {
+ ) {
}
-
+
public function execute({$cqrsName} \${$cqrsVariableName}): {$cqrsResultName}
{
- return new {$cqrsResultName}(
-
- );
+ return new {$cqrsResultName}();
}
}
";
diff --git a/data/mails/reset-password/assets/icon.png b/data/mails/reset-password/assets/icon.png
new file mode 100644
index 0000000..07e8b9d
Binary files /dev/null and b/data/mails/reset-password/assets/icon.png differ
diff --git a/data/mails/reset-password/template.latte b/data/mails/reset-password/template.latte
new file mode 100644
index 0000000..606d6b0
--- /dev/null
+++ b/data/mails/reset-password/template.latte
@@ -0,0 +1,63 @@
+
+
+
+ Passwort zurücksetzen
+
+
+
+
+
+
Hallo {$username},
+
+
Dein Passwort wurde zurückgesetzt.
+
Bitte klicke auf diesen Link um ein neues Passwort zu vergeben.
+
+
Wenn du dein Passwort nicht zurückgesetzt hast, kannst du diese Nachricht ignorieren!
+
+
Mit fleißigen Grüßen,
+
Der Beekeeper
+
+
+
diff --git a/data/migrations/business/Version20240827155813.php b/data/migrations/business/Version20240827155813.php
new file mode 100644
index 0000000..59162dc
--- /dev/null
+++ b/data/migrations/business/Version20240827155813.php
@@ -0,0 +1,37 @@
+addSql($sql);
+ }
+
+ public function down(Schema $schema): void
+ {
+ $this->addSql("DROP TABLE user_password_token;");
+ }
+}
diff --git a/src/ApiDomain/External/Authentication/config/routes.php b/src/ApiDomain/External/Authentication/config/routes.php
index 06dda9f..dc8b4fd 100644
--- a/src/ApiDomain/External/Authentication/config/routes.php
+++ b/src/ApiDomain/External/Authentication/config/routes.php
@@ -1,9 +1,11 @@
'auth.forgot-password',
+ 'path' => '/api/auth/forgot-password',
+ 'allowed_methods' => ['POST'],
+ 'middleware' => [
+ ForgotPasswordHandler::class,
+ ],
+ ],
+ [
+ 'name' => 'auth.reset-password',
+ 'path' => '/api/auth/reset-password',
+ 'allowed_methods' => ['POST'],
+ 'middleware' => [
+ ResetPasswordHandler::class,
+ ],
+ ],
];
\ No newline at end of file
diff --git a/src/ApiDomain/External/Authentication/config/service_manager.php b/src/ApiDomain/External/Authentication/config/service_manager.php
index 61124b9..3d22b21 100644
--- a/src/ApiDomain/External/Authentication/config/service_manager.php
+++ b/src/ApiDomain/External/Authentication/config/service_manager.php
@@ -3,9 +3,13 @@
use Bee\API\External\Authentication\Formatter\ConfirmRegistrationFormatter;
use Bee\API\External\Authentication\Formatter\LoginUserFormatter;
use Bee\API\External\Authentication\Handler\ConfirmRegistrationHandler;
+use Bee\API\External\Authentication\Handler\ForgotPasswordHandler;
use Bee\API\External\Authentication\Handler\LoginUserHandler;
use Bee\API\External\Authentication\Handler\LogoutUserHandler;
use Bee\API\External\Authentication\Handler\RegisterUserHandler;
+use Bee\API\External\Authentication\Handler\ResetPasswordHandler;
+use Bee\API\External\Authentication\ResponseFormatter\ForgotPasswordResponseFormatter;
+use Bee\API\External\Authentication\ResponseFormatter\ResetPasswordResponseFormatter;
use Reinfi\DependencyInjection\Factory\AutoWiringFactory;
return [
@@ -13,11 +17,15 @@ return [
// Formatter
ConfirmRegistrationFormatter::class => AutoWiringFactory::class,
LoginUserFormatter::class => AutoWiringFactory::class,
+ ForgotPasswordResponseFormatter::class => AutoWiringFactory::class,
+ ResetPasswordResponseFormatter::class => AutoWiringFactory::class,
// Handler
LoginUserHandler::class => AutoWiringFactory::class,
LogoutUserHandler::class => AutoWiringFactory::class,
ConfirmRegistrationHandler::class => AutoWiringFactory::class,
- RegisterUserHandler::class => AutoWiringFactory::class
+ RegisterUserHandler::class => AutoWiringFactory::class,
+ ForgotPasswordHandler::class => AutoWiringFactory::class,
+ ResetPasswordHandler::class => AutoWiringFactory::class,
],
];
diff --git a/src/ApiDomain/External/Authentication/src/Handler/ForgotPasswordHandler.php b/src/ApiDomain/External/Authentication/src/Handler/ForgotPasswordHandler.php
new file mode 100644
index 0000000..76da25a
--- /dev/null
+++ b/src/ApiDomain/External/Authentication/src/Handler/ForgotPasswordHandler.php
@@ -0,0 +1,39 @@
+getAttribute(AnalyzeHeaderMiddleware::HOST_ATTRIBUTE);
+ $data = $request->getAttribute(AnalyzeBodyMiddleware::JSON_DATA);
+
+ $forgotPasswordCommand = $this->forgotPasswordCommandBuilder->build(
+ domain: $host,
+ mail: $data['mail'],
+ );
+ $result = $this->forgotPasswordCommandHandler->execute($forgotPasswordCommand);
+
+ return new SuccessResponse($this->responseFormatter->format($result));
+ }
+}
diff --git a/src/ApiDomain/External/Authentication/src/Handler/ResetPasswordHandler.php b/src/ApiDomain/External/Authentication/src/Handler/ResetPasswordHandler.php
new file mode 100644
index 0000000..b3b5cd2
--- /dev/null
+++ b/src/ApiDomain/External/Authentication/src/Handler/ResetPasswordHandler.php
@@ -0,0 +1,45 @@
+getAttribute(AnalyzeBodyMiddleware::JSON_DATA);
+
+ $resetPasswordCommand = $this->builder->build(
+ Uuid::fromString($data['passwordToken']),
+ $data['newPassword'],
+ $data['passwordConfirmation'],
+ );
+ $result = $this->handler->execute($resetPasswordCommand);
+
+ return new SuccessResponse($this->responseFormatter->format($result));
+ }
+}
diff --git a/src/ApiDomain/External/Authentication/src/ResponseFormatter/ForgotPasswordResponseFormatter.php b/src/ApiDomain/External/Authentication/src/ResponseFormatter/ForgotPasswordResponseFormatter.php
new file mode 100644
index 0000000..39ec4c8
--- /dev/null
+++ b/src/ApiDomain/External/Authentication/src/ResponseFormatter/ForgotPasswordResponseFormatter.php
@@ -0,0 +1,17 @@
+handler->execute($query);
diff --git a/src/DataDomain/Business/config/service_manager.php b/src/DataDomain/Business/config/service_manager.php
index 0dc87f1..78f14c3 100644
--- a/src/DataDomain/Business/config/service_manager.php
+++ b/src/DataDomain/Business/config/service_manager.php
@@ -14,8 +14,6 @@ return [
'doctrine.entity_manager.orm_bee' => [BaseEntityManagerFactory::class, 'orm_bee'],
'doctrine.configuration.orm_bee' => [ConfigurationFactory::class, 'orm_bee'],
'doctrine.connection.orm_bee' => [ConnectionFactory::class, 'orm_bee'],
- EntityManager::class => EntityManagerFactory::class,
-
- UserRepository::class => [AutowireRepositoryFactory::class, EntityManager::class, User::class],
+ EntityManager::class => EntityManagerFactory::class
],
];
diff --git a/src/DataDomain/Business/src/Entity/User.php b/src/DataDomain/Business/src/Entity/User.php
index 48d1646..77215c1 100644
--- a/src/DataDomain/Business/src/Entity/User.php
+++ b/src/DataDomain/Business/src/Entity/User.php
@@ -3,6 +3,7 @@
namespace Bee\Data\Business\Entity;
use DateTime;
+use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Bee\Infrastructure\UuidGenerator\UuidGenerator;
use Ramsey\Uuid\UuidInterface;
@@ -39,6 +40,9 @@ class User {
/** @ORM\OneToOne(targetEntity="Bee\Data\Business\Entity\UserSession", mappedBy="user") */
private ?UserSession $session;
+ /* @ORM\OneToMany(targetEntity="Bee\Data\Business\Entity\UserPasswordToken", mappedBy="user") */
+ private Collection $passwordTokens;
+
/** @ORM\Column(name="last_login_at", type="datetime", nullable=true) */
private DateTime $lastLoginAt;
diff --git a/src/DataDomain/Business/src/Entity/UserPasswordToken.php b/src/DataDomain/Business/src/Entity/UserPasswordToken.php
new file mode 100644
index 0000000..73c0c39
--- /dev/null
+++ b/src/DataDomain/Business/src/Entity/UserPasswordToken.php
@@ -0,0 +1,91 @@
+id = UuidGenerator::generate();
+
+ $now = new DateTime();
+ $this->setCreatedAt($now);
+ $this->setUpdatedAt($now);
+ }
+
+
+ /**
+ * @ORM\PrePersist
+ * @ORM\PreUpdate
+ */
+ public function updateTimestamps(): void {
+ $now = new DateTime();
+ $this->setUpdatedAt($now);
+ }
+
+
+ public function getId(): UuidInterface {
+ return $this->id;
+ }
+
+ public function getUserId(): UuidInterface {
+ return $this->userId;
+ }
+
+ public function setUserId(UuidInterface $userId): void {
+ $this->userId = $userId;
+ }
+
+ public function getUser(): User {
+ return $this->user;
+ }
+
+ public function setUser(User $user): void {
+ $this->user = $user;
+ }
+
+ public function getCreatedAt(): DateTime {
+ return $this->createdAt;
+ }
+
+ public function setCreatedAt(DateTime $createdAt): void {
+ $this->createdAt = $createdAt;
+ }
+
+ public function getUpdatedAt(): DateTime {
+ return $this->updatedAt;
+ }
+
+ public function setUpdatedAt(DateTime $updatedAt): void {
+ $this->updatedAt = $updatedAt;
+ }
+}
\ No newline at end of file
diff --git a/src/DataDomain/Business/src/Repository/PermissionRepository.php b/src/DataDomain/Business/src/Repository/PermissionRepository.php
index ac02a73..dfb1892 100644
--- a/src/DataDomain/Business/src/Repository/PermissionRepository.php
+++ b/src/DataDomain/Business/src/Repository/PermissionRepository.php
@@ -5,6 +5,4 @@ namespace Bee\Data\Business\Repository;
use Doctrine\ORM\EntityRepository;
class PermissionRepository extends EntityRepository {
-}
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/DataDomain/Business/src/Repository/ProductRepository.php b/src/DataDomain/Business/src/Repository/ProductRepository.php
deleted file mode 100644
index 8769b29..0000000
--- a/src/DataDomain/Business/src/Repository/ProductRepository.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
\ No newline at end of file
diff --git a/src/DataDomain/Business/src/Repository/RoleRepository.php b/src/DataDomain/Business/src/Repository/RoleRepository.php
index d624dee..31b34c6 100644
--- a/src/DataDomain/Business/src/Repository/RoleRepository.php
+++ b/src/DataDomain/Business/src/Repository/RoleRepository.php
@@ -6,5 +6,3 @@ use Doctrine\ORM\EntityRepository;
class RoleRepository extends EntityRepository {
}
-
-?>
\ No newline at end of file
diff --git a/src/DataDomain/Business/src/Repository/UserPasswordTokenRepository.php b/src/DataDomain/Business/src/Repository/UserPasswordTokenRepository.php
new file mode 100644
index 0000000..f06abb5
--- /dev/null
+++ b/src/DataDomain/Business/src/Repository/UserPasswordTokenRepository.php
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/src/DataDomain/Business/src/Repository/UserSessionRepository.php b/src/DataDomain/Business/src/Repository/UserSessionRepository.php
index cdb91ee..ae12783 100644
--- a/src/DataDomain/Business/src/Repository/UserSessionRepository.php
+++ b/src/DataDomain/Business/src/Repository/UserSessionRepository.php
@@ -7,16 +7,4 @@ use Doctrine\ORM\EntityRepository;
use Bee\Data\Business\Entity\UserSession;
class UserSessionRepository extends EntityRepository {
- public function findByUser(User $user) : ?UserSession {
- $queryBuilder = $this->createQueryBuilder('us');
- $queryBuilder
- ->where("us.userId = :userId")
- ->setParameter('userId', $user->getId());
-
- /** @var ?UserSession $userSession */
- $userSession = $queryBuilder->getQuery()->execute()[0] ?? null;
- return $userSession;
- }
-}
-
-?>
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/HandlingDomain/Registration/src/Pipeline/RegisterUser/Step/SendMailStep.php b/src/HandlingDomain/Registration/src/Pipeline/RegisterUser/Step/SendMailStep.php
index b99f9b8..d7222ec 100644
--- a/src/HandlingDomain/Registration/src/Pipeline/RegisterUser/Step/SendMailStep.php
+++ b/src/HandlingDomain/Registration/src/Pipeline/RegisterUser/Step/SendMailStep.php
@@ -41,6 +41,7 @@ class SendMailStep implements TaskInterface
)
],
recipient: $command->getMail(),
+ sender: 'beekeeper@stack-up.de',
senderName: "Beekeeper"
);
diff --git a/src/HandlingDomain/User/config/service_manager.php b/src/HandlingDomain/User/config/service_manager.php
index 22439a9..ef46308 100644
--- a/src/HandlingDomain/User/config/service_manager.php
+++ b/src/HandlingDomain/User/config/service_manager.php
@@ -1,12 +1,17 @@
InjectionFactory::class,
+ UserPasswordTokenBuilder::class => AutoWiringFactory::class,
/// Rule
UserWithIdentifierAlreadyExistsRule::class => InjectionFactory::class,
@@ -27,13 +33,17 @@ return [
// Create User
CreateUserCommandHandler::class => AutoWiringFactory::class,
CreateUserCommandBuilder::class => AutoWiringFactory::class,
-
// Change Password
ChangePasswordCommandHandler::class => AutoWiringFactory::class,
ChangePasswordCommandBuilder::class => AutoWiringFactory::class,
-
// Change Username
ChangeUsernameCommandHandler::class => AutoWiringFactory::class,
ChangeUsernameCommandBuilder::class => AutoWiringFactory::class,
+ // Forgot Password
+ ForgotPasswordCommandHandler::class => InjectionFactory::class,
+ ForgotPasswordCommandBuilder::class => AutoWiringFactory::class,
+ // Reset Password
+ ResetPasswordCommandHandler::class => InjectionFactory::class,
+ ResetPasswordCommandBuilder::class => AutoWiringFactory::class,
],
];
diff --git a/src/HandlingDomain/User/src/Builder/UserPasswordTokenBuilder.php b/src/HandlingDomain/User/src/Builder/UserPasswordTokenBuilder.php
new file mode 100644
index 0000000..ce78bfd
--- /dev/null
+++ b/src/HandlingDomain/User/src/Builder/UserPasswordTokenBuilder.php
@@ -0,0 +1,25 @@
+setUser($user);
+
+ return $userPasswordToken;
+ }
+}
diff --git a/src/HandlingDomain/User/src/Exception/UserNotFoundByMailException.php b/src/HandlingDomain/User/src/Exception/UserNotFoundByMailException.php
new file mode 100644
index 0000000..4dd0601
--- /dev/null
+++ b/src/HandlingDomain/User/src/Exception/UserNotFoundByMailException.php
@@ -0,0 +1,24 @@
+password;
}
+
+ public function getNewPasswordConfirmation(): string
+ {
+ return $this->newPasswordConfirmation;
+ }
}
diff --git a/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandBuilder.php b/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandBuilder.php
index 2995991..a9f6561 100644
--- a/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandBuilder.php
+++ b/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandBuilder.php
@@ -10,12 +10,14 @@ class ChangePasswordCommandBuilder
User $user,
string $password,
string $newPassword,
+ string $newPasswordConfirmation,
): ChangePasswordCommand
{
return new ChangePasswordCommand(
$user,
$password,
$newPassword,
+ $newPasswordConfirmation,
);
}
}
diff --git a/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandHandler.php b/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandHandler.php
index 263d800..5887cd7 100644
--- a/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandHandler.php
+++ b/src/HandlingDomain/User/src/Handler/Command/ChangePassword/ChangePasswordCommandHandler.php
@@ -6,6 +6,7 @@ use Bee\Data\Business\Entity\User;
use Bee\Data\Business\Repository\RoleRepository;
use Bee\Data\Business\Repository\UserRepository;
use Bee\Handling\User\Exception\UserNotFoundByIdentifierException;
+use Bee\Handling\User\Exception\UserPasswordConfirmationMismatchException;
use Bee\Handling\User\Exception\UserWrongPasswordException;
use Bee\Data\Business\Manager\EntityManager;
use Bee\Infrastructure\Encryption\Client\EncryptionClient;
@@ -20,6 +21,10 @@ class ChangePasswordCommandHandler
) {
}
+ /**
+ * @throws UserWrongPasswordException
+ * @throws UserPasswordConfirmationMismatchException
+ */
public function execute(ChangePasswordCommand $command): void
{
$user = $command->getUser();
@@ -28,6 +33,10 @@ class ChangePasswordCommandHandler
throw new UserWrongPasswordException();
}
+ if ($command->getNewPassword() !== $command->getNewPasswordConfirmation()) {
+ throw new UserPasswordConfirmationMismatchException();
+ }
+
$encryptedPassword = $this->encryptionClient->encrypt(
$command->getNewPassword()
);
diff --git a/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommand.php b/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommand.php
new file mode 100644
index 0000000..6cca779
--- /dev/null
+++ b/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommand.php
@@ -0,0 +1,24 @@
+domain;
+ }
+
+ public function getMail(): string
+ {
+ return $this->mail;
+ }
+}
diff --git a/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommandBuilder.php b/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommandBuilder.php
new file mode 100644
index 0000000..63ca3ef
--- /dev/null
+++ b/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommandBuilder.php
@@ -0,0 +1,18 @@
+getMail();
+
+ /** @var User $user */
+ $user = $this->userRepository->findOneBy(['mail' => $mail]);
+
+ if ($user === null) {
+ throw new UserNotFoundByMailException($mail);
+ }
+
+ $passwordToken = $this->passwordTokenBuilder->build($user);
+
+ $this->entityManager->persist($passwordToken);
+ $this->entityManager->flush();
+
+ $this->mailService->send(
+ 'reset-password',
+ templateData: [
+ 'username' => $user->getUsername(),
+ 'passwordResetLink' => sprintf(
+ self::RESET_PASSWORD_LINK,
+ $forgotPasswordCommand->getDomain(),
+ $passwordToken->getId()->toString()
+ )
+ ],
+ recipient: $mail,
+ sender: 'beekeeper@stack-up.de',
+ senderName: 'Beekeeper'
+ );
+
+ return new ForgotPasswordCommandResult();
+ }
+}
diff --git a/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommandResult.php b/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommandResult.php
new file mode 100644
index 0000000..f7315b7
--- /dev/null
+++ b/src/HandlingDomain/User/src/Handler/Command/ForgotPassword/ForgotPasswordCommandResult.php
@@ -0,0 +1,12 @@
+passwordTokenUuid;
+ }
+
+ public function getNewPassword(): string
+ {
+ return $this->newPassword;
+ }
+
+ public function getPasswordConfirmation(): string
+ {
+ return $this->passwordConfirmation;
+ }
+}
diff --git a/src/HandlingDomain/User/src/Handler/Command/ResetPassword/ResetPasswordCommandBuilder.php b/src/HandlingDomain/User/src/Handler/Command/ResetPassword/ResetPasswordCommandBuilder.php
new file mode 100644
index 0000000..0e6786c
--- /dev/null
+++ b/src/HandlingDomain/User/src/Handler/Command/ResetPassword/ResetPasswordCommandBuilder.php
@@ -0,0 +1,22 @@
+getPasswordTokenUuid();
+
+ // Load and check password token
+ /** @var ?UserPasswordToken $passwordToken */
+ $passwordToken = $this->repository->findOneBy(['id' => $passwordTokenId]);
+ if ($passwordToken === null) {
+ throw new UserPasswordTokenNotFoundByIdException($passwordTokenId->toString());
+ }
+
+ if ($resetPasswordCommand->getNewPassword() !== $resetPasswordCommand->getPasswordConfirmation()) {
+ throw new UserPasswordConfirmationMismatchException();
+ }
+
+ // Update Password
+ $user = $passwordToken->getUser();
+ $user->setPassword($this->encryptionClient->encrypt($resetPasswordCommand->getNewPassword()));
+
+ // Save to DB
+ $this->entityManager->remove($passwordToken);
+ $this->entityManager->persist($user);
+ if ($user->getSession() !== null) {
+ $this->entityManager->remove($user->getSession());
+ }
+
+ $this->entityManager->flush();
+
+ return new ResetPasswordCommandResult();
+ }
+}
diff --git a/src/HandlingDomain/User/src/Handler/Command/ResetPassword/ResetPasswordCommandResult.php b/src/HandlingDomain/User/src/Handler/Command/ResetPassword/ResetPasswordCommandResult.php
new file mode 100644
index 0000000..acb9182
--- /dev/null
+++ b/src/HandlingDomain/User/src/Handler/Command/ResetPassword/ResetPasswordCommandResult.php
@@ -0,0 +1,13 @@
+get(EntityManager::class);
+ return $em->getRepository($configKey);
+ }
+
+ protected function getDefaultConfig(string $configKey): array
+ {
+ return [];
+ }
+}
diff --git a/src/Infrastructure/Database/src/ConfigServiceFactory.php b/src/Infrastructure/Database/src/ConfigServiceFactory.php
deleted file mode 100644
index 0548333..0000000
--- a/src/Infrastructure/Database/src/ConfigServiceFactory.php
+++ /dev/null
@@ -1,33 +0,0 @@
-entityClass, $this->entityClass);
- }
-
- public function __invoke(
- ContainerInterface $container,
- $requestedName,
- ?array $options = null
- ): ObjectRepository|EntityRepository
- {
- /** @var EntityManager $em */
- $em = $container->get($this->entityManagerClass);
-
- return $em->getRepository($this->entityClass);
- }
-}
diff --git a/src/Infrastructure/UuidGenerator/src/UuidGenerator.php b/src/Infrastructure/UuidGenerator/src/UuidGenerator.php
index 31a2235..a078253 100644
--- a/src/Infrastructure/UuidGenerator/src/UuidGenerator.php
+++ b/src/Infrastructure/UuidGenerator/src/UuidGenerator.php
@@ -13,6 +13,4 @@ class UuidGenerator {
$factory->setCodec($codec);
return $factory->uuid1();
}
-}
-
-?>
\ No newline at end of file
+}
\ No newline at end of file