From 11ad166701151fd6e2925f864595c5bfb3d2a7f1 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Tue, 2 Jul 2024 17:49:43 +0300 Subject: [PATCH 1/2] feat: add WpQuerySplitter to split massive HIS code relationship queries into smaller ones --- src/Infrastructure/Repository/RepositoryModule.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Infrastructure/Repository/RepositoryModule.php b/src/Infrastructure/Repository/RepositoryModule.php index 6d5b5b3..a5b3263 100644 --- a/src/Infrastructure/Repository/RepositoryModule.php +++ b/src/Infrastructure/Repository/RepositoryModule.php @@ -19,6 +19,7 @@ use Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramRepository; use Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramViewRepository; use Fau\DegreeProgram\Common\Infrastructure\Repository\WpQueryArgsBuilder; +use Fau\DegreeProgram\Common\Infrastructure\Repository\WpQuerySplitter; use Fau\DegreeProgram\Common\Infrastructure\Sanitizer\HtmlDegreeProgramSanitizer; use Fau\DegreeProgram\Output\Application\OriginalDegreeProgramViewRepository; use Fau\DegreeProgram\Output\Infrastructure\ApiClient\ApiClient; @@ -60,6 +61,10 @@ public function services(): array WordPressDatabaseDegreeProgramCollectionRepository::class => static fn(ContainerInterface $container) => new WordPressDatabaseDegreeProgramCollectionRepository( $container->get(DegreeProgramViewRepository::class), $container->get(WpQueryArgsBuilder::class), + $container->get(WpQuerySplitter::class) + ), + WpQuerySplitter::class => static fn(ContainerInterface $container) => new WpQuerySplitter( + $container->get(WpQueryArgsBuilder::class) ), DegreeProgramCollectionRepository::class => static fn(ContainerInterface $container) => new CachedApiCollectionRepository( $container->get(WordPressDatabaseDegreeProgramCollectionRepository::class), From b7fd0badd35b12c7ff2c8132e2ef3f4dce724bc9 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Wed, 3 Jul 2024 13:44:27 +0300 Subject: [PATCH 2/2] chore: update rrze/fau-studium-common package --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index ff2bf10..413347c 100644 --- a/composer.lock +++ b/composer.lock @@ -411,12 +411,12 @@ "source": { "type": "git", "url": "https://github.com/RRZE-Webteam/FAU-Studium-Common.git", - "reference": "c171c049fcbc34799d751db06e9165dd4ba57cf2" + "reference": "fc1f347cd46f7cca7588c8a5df274b1426dd77d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/c171c049fcbc34799d751db06e9165dd4ba57cf2", - "reference": "c171c049fcbc34799d751db06e9165dd4ba57cf2", + "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/fc1f347cd46f7cca7588c8a5df274b1426dd77d2", + "reference": "fc1f347cd46f7cca7588c8a5df274b1426dd77d2", "shasum": "" }, "require": { @@ -489,7 +489,7 @@ "source": "https://github.com/RRZE-Webteam/FAU-Studium-Common/tree/dev", "issues": "https://github.com/RRZE-Webteam/FAU-Studium-Common/issues" }, - "time": "2024-06-17T07:53:26+00:00" + "time": "2024-07-03T10:40:43+00:00" }, { "name": "webmozart/assert",