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, ) { }