From 7e76b289025f52547133d3dcd328cd5003e5e8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Sat, 24 Jan 2026 19:02:50 +0100 Subject: [PATCH] chore: cleanup --- config/services.yaml | 5 -- src/Command/GenerateThumbnailsCommand.php | 66 ----------------------- src/Twig/AppRuntime.php | 1 - 3 files changed, 72 deletions(-) delete mode 100644 src/Command/GenerateThumbnailsCommand.php diff --git a/config/services.yaml b/config/services.yaml index fdbfdc1..d60edfa 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -58,11 +58,6 @@ services: arguments: $connection: '@doctrine.dbal.default_connection' - App\Command\GenerateThumbnailsCommand: - arguments: - $cacheManager: '@liip_imagine.cache.manager' - $filterService: '@liip_imagine.service.filter' - App\BusProNet\ApiClient: arguments: $logger: '@monolog.logger.bpn' diff --git a/src/Command/GenerateThumbnailsCommand.php b/src/Command/GenerateThumbnailsCommand.php deleted file mode 100644 index 90ad510..0000000 --- a/src/Command/GenerateThumbnailsCommand.php +++ /dev/null @@ -1,66 +0,0 @@ -entityManager - ->getRepository(Teamer::class) - ->createQueryBuilder('t') - ->select('t.id', 'p.filename') - ->innerJoin('t.photo', 'p') - ->getQuery() - ->getArrayResult() - ; - - $imagesCount = count($images); - - $io->info('Generating thumbnails for '.$imagesCount.' profile images...'); - - $progressbar = $io->createProgressBar($imagesCount); - $progressbar->start(); - - foreach ($images as $image) { - try { - $this->filterService->warmUpCache($image['filename'], 'thumbnail'); - $this->filterService->warmUpCache($image['filename'], 'profile'); - $this->cacheManager->getBrowserPath($image['filename'], 'thumbnail'); - $this->cacheManager->getBrowserPath($image['filename'], 'profile'); - } catch (\Exception $e) { - } - - $progressbar->advance(); - } - - $progressbar->finish(); - - return Command::SUCCESS; - } -} diff --git a/src/Twig/AppRuntime.php b/src/Twig/AppRuntime.php index 54afefd..97dfbfe 100644 --- a/src/Twig/AppRuntime.php +++ b/src/Twig/AppRuntime.php @@ -24,7 +24,6 @@ class AppRuntime implements RuntimeExtensionInterface private readonly CountryDataProvider $countries, private readonly PickupDataProvider $pickups, private readonly PickupResolver $pickupResolver, - private readonly UploadHandler $uploadHandler, private readonly string $environment, ) { }