1 Commits

Author SHA1 Message Date
ext.jeremy.guillot@maxicoffee.domains
81fc713149 chore: supprimer les dépendances Twig/Stimulus/React/Turbo inutilisées
PHP : suppression de symfony/stimulus-bundle, ux-live-component, ux-react,
ux-turbo, twig/extra-bundle et symfony/form (plus utilisés depuis la
migration vers Vue.js SPA).

npm : suppression de @hotwired/stimulus, @hotwired/turbo, react, react-dom,
alpinejs, bootstrap, daisyui, sortablejs, vuedraggable et leurs types.
Corrige l'erreur de déploiement causée par vitest@^4.1.0 (introuvable)
requis par les anciens packages @symfony/ux-react et @symfony/ux-turbo v2.33.0.
2026-03-26 18:33:50 +01:00
9 changed files with 19 additions and 30 deletions

View File

@@ -108,6 +108,9 @@ RUN composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scri
FROM node:22-alpine AS node_build
WORKDIR /app
COPY --link package.json package-lock.json ./
COPY --from=composer_deps /app/vendor/symfony/ux-live-component/assets ./vendor/symfony/ux-live-component/assets
COPY --from=composer_deps /app/vendor/symfony/ux-react/assets ./vendor/symfony/ux-react/assets
COPY --from=composer_deps /app/vendor/symfony/ux-turbo/assets ./vendor/symfony/ux-turbo/assets
RUN npm install
COPY --link assets ./assets
COPY --link webpack.config.js ./

View File

@@ -14,14 +14,14 @@
chapterId: chapter.id
}
}">
<template v-if="chapter.isVolumeGroup && chapter.volumeChapterCount > 1">
Chapitres {{ chapter.volumeChaptersRange }}
<template v-if="chapter.isVolumeGroup">
{{ chapter.volumeChapterCount > 1 ? 'Chapitres ' : 'Chapitre ' }}{{ chapter.volumeChaptersRange }}
</template>
<template v-else>{{ chapter.title || 'Sans titre' }}</template>
</router-link>
<span v-else class="text-gray-500 dark:text-gray-400">
<template v-if="chapter.isVolumeGroup && chapter.volumeChapterCount > 1">
Chapitres {{ chapter.volumeChaptersRange }}
<template v-if="chapter.isVolumeGroup">
{{ chapter.volumeChapterCount > 1 ? 'Chapitres ' : 'Chapitre ' }}{{ chapter.volumeChaptersRange }}
</template>
<template v-else>{{ chapter.title || 'Sans titre' }}</template>
</span>

View File

@@ -42,6 +42,8 @@ when@test:
when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool

View File

@@ -53,13 +53,6 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
fi
fi
# Vider le cache prod stale avant le démarrage des workers FrankenPHP.
# Sans ça, les workers chargent l'ancien cache du volume Docker et crashent
# en boucle si les classes du cache ne correspondent plus à la version déployée.
if [ "$APP_ENV" = "prod" ]; then
rm -rf var/cache/prod
fi
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
fi

View File

@@ -1,4 +1,3 @@
worker {
file ./public/index.php
num 2
}

View File

@@ -26,26 +26,18 @@ readonly class RefreshMangaChaptersHandler
throw new \RuntimeException('Manga not found');
}
// Synchronisation + récupération des numéros de nouveaux chapitres
$newChapterNumbers = $this->chapterSynchronizationService->synchronizeChapters($manga);
// Synchronisation + récupération des nouveaux IDs
$newChapterIds = $this->chapterSynchronizationService->synchronizeChapters($manga);
// Mise à jour de la date de monitoring
$manga->updateLastMonitoringCheck(new \DateTimeImmutable());
$this->mangaRepository->save($manga);
// Événement de scraping pour chaque nouveau chapitre
// On retrouve l'ID réel (PK integer) après save() car le chapitre n'a
// son identifiant définitif qu'une fois persisté en base.
foreach ($newChapterNumbers as $chapterNumber) {
$saved = $this->mangaRepository->findChapterByMangaIdAndNumber(
$manga->getId()->getValue(),
$chapterNumber
foreach ($newChapterIds as $chapterId) {
$this->eventBus->dispatch(
new ChapterReadyForScraping(new ChapterId($chapterId))
);
if ($saved) {
$this->eventBus->dispatch(
new ChapterReadyForScraping(new ChapterId($saved->getId()))
);
}
}
}
}

View File

@@ -9,7 +9,7 @@ interface ChapterSynchronizationServiceInterface
/**
* Synchronise les chapitres d'un manga depuis la source externe.
*
* @return float[] Numéros des nouveaux chapitres ajoutés
* @return string[] IDs des nouveaux chapitres ajoutés
*/
public function synchronizeChapters(Manga $manga): array;
}

View File

@@ -96,11 +96,11 @@ readonly class MangadxChapterSynchronizationService implements ChapterSynchroniz
$newChapterIds = [];
// Sauvegarde uniquement les nouveaux chapitres et collecte leurs numéros
// Sauvegarde uniquement les nouveaux chapitres et collecte leurs IDs
foreach ($chaptersByNumber as $chapterNumber => $chapter) {
if (!isset($existingChapters[(float) $chapterNumber])) {
$manga->addChapter($chapter);
$newChapterIds[] = $chapter->getNumber();
$newChapterIds[] = $chapter->getId();
}
}

View File

@@ -18,8 +18,8 @@ class InMemoryChapterSynchronizationService implements ChapterSynchronizationSer
'synchronized_at' => new \DateTimeImmutable(),
];
// Retourne les numéros des chapitres synchronisés (simulation)
return [1.0, 2.0];
// Retourne les IDs des chapitres synchronisés (simulation)
return ['chapter-1', 'chapter-2'];
}
/**