feat: mise à jour de la gestion des chapitres en remplaçant les types d'identifiants par des flottants pour une meilleure cohérence, ajout de la documentation pour les méthodes de recherche de chapitres, et amélioration de la gestion des exceptions lors de la récupération des chapitres.

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-04-05 11:43:40 +02:00
parent 5928cfd5f0
commit c0bd9c69b1
8 changed files with 36 additions and 22 deletions

View File

@@ -11,6 +11,7 @@ use App\Domain\Scraping\Domain\Contract\Service\ImageDownloaderInterface;
use App\Domain\Scraping\Domain\Contract\Service\ScraperInterface;
use App\Domain\Scraping\Domain\Event\ChapterScraped;
use App\Domain\Scraping\Domain\Event\ChapterScrapingFailed;
use App\Domain\Scraping\Domain\Model\Chapter;
use App\Domain\Scraping\Domain\Model\ScrapingJob;
use App\Domain\Scraping\Domain\Model\Source;
use App\Domain\Scraping\Domain\Model\ValueObject\CbzGenerationRequest;
@@ -41,6 +42,7 @@ readonly class ScrapeChapterHandler
$job = null;
try {
// 1. Récupération du chapitre
/**@var Chapter $chapter */
$chapter = $this->chapterRepository->getById($command->chapterId);
if (!$chapter) {
throw new \InvalidArgumentException("Chapter not found with ID: {$command->chapterId}");