diff --git a/composer.json b/composer.json index d5a5e31..d8ae4ee 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "minimum-stability": "dev", "require": { "php": ">=8.2", - "commongateway/corebundle": "^1.3.18 | <2.0", + "commongateway/corebundle": "^1.4.13 | <2.0", "smalot/pdfparser": "^2.8" }, "require-dev": { diff --git a/publiccode.yaml b/publiccode.yaml index 9ac5ef1..30b2b60 100644 --- a/publiccode.yaml +++ b/publiccode.yaml @@ -86,14 +86,14 @@ nl: dependsOn: open: - name: CommonGateway - versionMin: 1.3 - versionMax: 2.0 - version: 1.3.18 + versionMin: 1.4 + versionMax: 1.5 + version: 1.4.13 optional: false - name: CoreBundle - versionMin: 1.3 - versionMax: 2.0 - version: 1.3.18 + versionMin: 1.4 + versionMax: 1.5 + version: 1.4.13 optional: false roadmap: null inputTypes: diff --git a/src/Service/SitemapService.php b/src/Service/SitemapService.php index d6f5e9d..79a991a 100644 --- a/src/Service/SitemapService.php +++ b/src/Service/SitemapService.php @@ -221,7 +221,7 @@ private function getSitemap(array $parameters): array ); $publisherSchema = $this->resourceService->getSchema('https://commongateway.nl/woo.sitemap.schema.json', 'common-gateway/woo-bundle'); - $publishers = $this->cacheService->searchObjects(null, ['oin' => $parameters['oin']], [$publisherSchema->getId()->toString()])['results']; + $publishers = $this->cacheService->searchObjects(['oin' => $parameters['oin']], [$publisherSchema->getId()->toString()])['results']; if (count($publishers) === 0) { $this->logger->error('Couldn\'t find a publisher for this oin: '.$parameters['oin'], ['plugin' => 'common-gateway/woo-bundle']); @@ -233,7 +233,7 @@ private function getSitemap(array $parameters): array // $filter = ['_limit' => 50000]; // Get all the publication objects with the given query. - $objects = $this->cacheService->searchObjects(null, $filter, [$publicatieSchema->getId()->toString()])['results']; + $objects = $this->cacheService->searchObjects($filter, [$publicatieSchema->getId()->toString()])['results']; $sitemap = []; foreach ($objects as $object) { @@ -299,7 +299,7 @@ private function getSitemapindex(array $parameters): array } // Count all the publication objects with the given query. - $count = $this->cacheService->countObjects(null, $filter, [$publicatieSchema->getId()->toString()]); + $count = $this->cacheService->countObjects($filter, [$publicatieSchema->getId()->toString()]); $pages = ((int) (($count - 1) / 50000) + 1); // Get the domain of the request. @@ -341,7 +341,7 @@ private function getRobot(array $parameters): array $host = $this->requestStack->getMainRequest()->getHost(); - $sitemaps = $this->cacheService->searchObjects(null, ['domains' => $host], [$sitemapSchema->getId()->toString()]); + $sitemaps = $this->cacheService->searchObjects(['domains' => $host], [$sitemapSchema->getId()->toString()]); if (count($sitemaps['results']) === 1) { $oin = $sitemaps['results'][0]['oin'];