From 1c0ae30b682d97ec7e5e05b08ea4c631ed6ed1de Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Thu, 28 May 2020 10:30:15 +0200 Subject: [PATCH] Fix pagination --- src/Command/ScanAllPackagesCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/ScanAllPackagesCommand.php b/src/Command/ScanAllPackagesCommand.php index 0a15c740..11d23fde 100644 --- a/src/Command/ScanAllPackagesCommand.php +++ b/src/Command/ScanAllPackagesCommand.php @@ -50,7 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $progressBar = new ProgressBar($output, $count); $progressBar->start(); - for ($offset = 0; $offset <= $count; $offset = ($offset + 1) * $limit) { + for ($offset = 0; $offset < $count; $offset += $limit) { foreach ($this->packageQuery->getAllSynchronized($limit, $offset) as $item) { $this->scanner->scan( $this->packageRepository->getById(Uuid::fromString($item->id()))