Refatoring : Working state

This commit is contained in:
julien
2026-03-16 15:08:48 +01:00
parent 664d74cd69
commit 3ad3c3d0b7
50 changed files with 69 additions and 331 deletions

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\AccountController;
use App\Auth\Http\AccountController as AccountController;
use App\Auth\AuthServiceInterface;
use App\Shared\Http\FlashServiceInterface;
use App\Shared\Http\SessionManagerInterface;

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\AuthController;
use App\Auth\Http\AuthController as AuthController;
use App\Auth\AuthServiceInterface;
use App\Shared\Http\ClientIpResolver;
use App\Shared\Http\FlashServiceInterface;

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\AuthService;
use App\Auth\Application\AuthApplicationService as AuthService;
use App\Auth\LoginAttemptRepositoryInterface;
use App\Shared\Http\SessionManagerInterface;
use App\User\UserRepositoryInterface;

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\AuthService;
use App\Auth\Application\AuthApplicationService as AuthService;
use App\Auth\LoginAttemptRepositoryInterface;
use App\Shared\Exception\NotFoundException;
use App\Shared\Http\SessionManagerInterface;

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\LoginAttemptRepository;
use App\Auth\Infrastructure\PdoLoginAttemptRepository as LoginAttemptRepository;
use PDO;
use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\AuthServiceInterface;
use App\Auth\PasswordResetController;
use App\Auth\Http\PasswordResetController as PasswordResetController;
use App\Auth\Exception\InvalidResetTokenException;
use App\Auth\PasswordResetServiceInterface;
use App\Shared\Http\ClientIpResolver;

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\PasswordResetRepository;
use App\Auth\Infrastructure\PdoPasswordResetRepository as PasswordResetRepository;
use PDO;
use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;

View File

@@ -4,12 +4,12 @@ declare(strict_types=1);
namespace Tests\Auth;
use App\Auth\Exception\InvalidResetTokenException;
use App\Auth\PasswordResetRepository;
use App\Auth\PasswordResetService;
use App\Auth\Infrastructure\PdoPasswordResetRepository as PasswordResetRepository;
use App\Auth\Application\PasswordResetApplicationService as PasswordResetService;
use App\Shared\Database\Migrator;
use App\Shared\Mail\MailServiceInterface;
use App\User\User;
use App\User\UserRepository;
use App\User\Infrastructure\PdoUserRepository as UserRepository;
use PDO;
use PHPUnit\Framework\TestCase;

View File

@@ -5,7 +5,7 @@ namespace Tests\Auth;
use App\Auth\Exception\InvalidResetTokenException;
use App\Auth\PasswordResetRepositoryInterface;
use App\Auth\PasswordResetService;
use App\Auth\Application\PasswordResetApplicationService as PasswordResetService;
use App\Shared\Mail\MailServiceInterface;
use App\User\Exception\WeakPasswordException;
use App\User\User;

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Tests\Category;
use App\Category\Category;
use App\Category\CategoryController;
use App\Category\Http\CategoryController as CategoryController;
use App\Category\CategoryServiceInterface;
use App\Shared\Http\FlashServiceInterface;
use App\Shared\Pagination\PaginatedResult;

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Tests\Category;
use App\Category\Category;
use App\Category\CategoryRepository;
use App\Category\Infrastructure\PdoCategoryRepository as CategoryRepository;
use PDO;
use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;

View File

@@ -5,7 +5,7 @@ namespace Tests\Category;
use App\Category\Category;
use App\Category\CategoryRepositoryInterface;
use App\Category\CategoryService;
use App\Category\Application\CategoryApplicationService as CategoryService;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

View File

@@ -7,7 +7,7 @@ use App\Media\Exception\FileTooLargeException;
use App\Media\Exception\InvalidMimeTypeException;
use App\Media\Exception\StorageException;
use App\Media\Media;
use App\Media\MediaController;
use App\Media\Http\MediaController as MediaController;
use App\Media\MediaServiceInterface;
use App\Shared\Http\FlashServiceInterface;
use App\Shared\Http\SessionManagerInterface;

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Tests\Media;
use App\Media\Media;
use App\Media\MediaRepository;
use App\Media\Infrastructure\PdoMediaRepository as MediaRepository;
use PDO;
use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;

View File

@@ -4,9 +4,9 @@ declare(strict_types=1);
namespace Tests\Post;
use App\Post\Post;
use App\Post\PostRepository;
use App\Post\Infrastructure\PdoPostRepository as PostRepository;
use App\Post\PostRepositoryInterface;
use App\Post\PostService;
use App\Post\Application\PostApplicationService as PostService;
use App\Shared\Database\Migrator;
use App\Shared\Exception\NotFoundException;
use App\Shared\Html\HtmlSanitizerInterface;

View File

@@ -6,7 +6,7 @@ namespace Tests\Post;
use App\Category\Category;
use App\Category\CategoryServiceInterface;
use App\Post\Post;
use App\Post\PostController;
use App\Post\Http\PostController as PostController;
use App\Post\PostServiceInterface;
use App\Shared\Exception\NotFoundException;
use App\Shared\Http\FlashServiceInterface;

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Tests\Post;
use App\Post\Post;
use App\Post\PostExtension;
use App\Post\Infrastructure\TwigPostExtension as PostExtension;
use PHPUnit\Framework\TestCase;
use Twig\TwigFunction;

View File

@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace Tests\Post;
use App\Post\PostRepository;
use App\Post\Infrastructure\PdoPostRepository as PostRepository;
use App\Shared\Database\Migrator;
use PDO;
use PHPUnit\Framework\TestCase;

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Tests\Post;
use App\Post\Post;
use App\Post\PostRepository;
use App\Post\Infrastructure\PdoPostRepository as PostRepository;
use PDO;
use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;

View File

@@ -5,7 +5,7 @@ namespace Tests\Post;
use App\Post\Post;
use App\Post\PostRepositoryInterface;
use App\Post\PostService;
use App\Post\Application\PostApplicationService as PostService;
use App\Shared\Html\HtmlSanitizerInterface;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

View File

@@ -5,7 +5,7 @@ namespace Tests\Post;
use App\Post\Post;
use App\Post\PostRepositoryInterface;
use App\Post\PostService;
use App\Post\Application\PostApplicationService as PostService;
use App\Shared\Exception\NotFoundException;
use App\Shared\Html\HtmlSanitizerInterface;
use PHPUnit\Framework\MockObject\MockObject;

View File

@@ -5,7 +5,7 @@ namespace Tests\Post;
use App\Post\Post;
use App\Post\PostServiceInterface;
use App\Post\RssController;
use App\Post\Http\RssController as RssController;
use PHPUnit\Framework\MockObject\MockObject;
use Tests\ControllerTestBase;

View File

@@ -10,7 +10,7 @@ use App\User\Exception\DuplicateEmailException;
use App\User\Exception\DuplicateUsernameException;
use App\User\Exception\WeakPasswordException;
use App\User\User;
use App\User\UserController;
use App\User\Http\UserController as UserController;
use App\User\UserServiceInterface;
use PHPUnit\Framework\MockObject\MockObject;
use Tests\ControllerTestBase;

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Tests\User;
use App\User\User;
use App\User\UserRepository;
use App\User\Infrastructure\PdoUserRepository as UserRepository;
use PDO;
use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;

View File

@@ -9,7 +9,7 @@ use App\User\Exception\InvalidRoleException;
use App\User\Exception\WeakPasswordException;
use App\User\User;
use App\User\UserRepositoryInterface;
use App\User\UserService;
use App\User\Application\UserApplicationService as UserService;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;