documentation and env changes
All checks were successful
CI (Gitea) / php-tests (push) Successful in 10m8s
CI (Gitea) / docker-image (push) Successful in 2m18s

This commit is contained in:
2025-11-28 08:14:13 +00:00
parent f77f3a9e40
commit d52eb6bd81
59 changed files with 932 additions and 565 deletions

View File

@@ -14,15 +14,18 @@ class CatalogResetService
}
/**
* Deletes all reviews and albums from the catalog and returns summary counts.
*
* @return array{albums:int,reviews:int}
*/
public function reset(): array
public function resetCatalog(): array
{
$deletedReviews = $this->entityManager->createQuery('DELETE FROM App\Entity\Review r')->execute();
$albums = $this->albumRepository->findAll();
$albumCount = count($albums);
foreach ($albums as $album) {
// Remove entities one-by-one so Doctrine cascades delete related tracks/reviews as configured.
$this->entityManager->remove($album);
}
$this->entityManager->flush();