From ba5d2bb84a0738973f08fc1065434d44f69ea093 Mon Sep 17 00:00:00 2001 From: Robert Zondervan Date: Wed, 20 Nov 2024 16:41:56 +0100 Subject: [PATCH 1/2] Fix deletes --- src/Service/CacheService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Service/CacheService.php b/src/Service/CacheService.php index 04148e4e..172f4a17 100644 --- a/src/Service/CacheService.php +++ b/src/Service/CacheService.php @@ -312,7 +312,7 @@ public function warmup(array $config = [], ?string $bundleToCache = null): int // Backwards compatibility. if (((isset($config['schemas']) === false || $config['schemas'] !== true) - || (isset($config['endpoints']) === false || $config['endpoints'] !== true)) + || (isset($config['endpoints']) === false || $config['endpoints'] !== true)) && isset($this->client) === false ) { isset($this->style) === true && $this->style->writeln('No cache client found, halting warmup'); @@ -443,6 +443,7 @@ private function removeDataFromCache(Collection $collection, string $type, array foreach ($schemaRefs as $schemaRef) { $filter['_self.schema.id']['$in'][] = $schemaRef; } + $filter['_limit'] = $collection->count($filter); $objects = $collection->find($filter, [])->toArray(); } else { From c5c7a50e0d948487512d61adc423289b112b9d7d Mon Sep 17 00:00:00 2001 From: GitHub Actions <> Date: Wed, 20 Nov 2024 15:42:48 +0000 Subject: [PATCH 2/2] Update src from PHP Codesniffer --- src/Service/CacheService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Service/CacheService.php b/src/Service/CacheService.php index 172f4a17..f0365ec3 100644 --- a/src/Service/CacheService.php +++ b/src/Service/CacheService.php @@ -312,7 +312,7 @@ public function warmup(array $config = [], ?string $bundleToCache = null): int // Backwards compatibility. if (((isset($config['schemas']) === false || $config['schemas'] !== true) - || (isset($config['endpoints']) === false || $config['endpoints'] !== true)) + || (isset($config['endpoints']) === false || $config['endpoints'] !== true)) && isset($this->client) === false ) { isset($this->style) === true && $this->style->writeln('No cache client found, halting warmup'); @@ -443,6 +443,7 @@ private function removeDataFromCache(Collection $collection, string $type, array foreach ($schemaRefs as $schemaRef) { $filter['_self.schema.id']['$in'][] = $schemaRef; } + $filter['_limit'] = $collection->count($filter); $objects = $collection->find($filter, [])->toArray();