From 4785b32a2b9b381c981464f0cb29f0ad365abea3 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Tue, 24 Dec 2024 15:24:54 +0200 Subject: [PATCH 1/4] feat: synchronize parent and child terms using the MultilingualLink representation --- src/Infrastructure/Search/FilterableTermsUpdater.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/Search/FilterableTermsUpdater.php b/src/Infrastructure/Search/FilterableTermsUpdater.php index 1a2fbce..4080671 100644 --- a/src/Infrastructure/Search/FilterableTermsUpdater.php +++ b/src/Infrastructure/Search/FilterableTermsUpdater.php @@ -341,7 +341,7 @@ private function retrieveParentTermId( return 0; } - /** @var AdmissionRequirement|Degree $flatProperty */ + /** @var AdmissionRequirement|Degree|MultilingualLink $flatProperty */ $parentProperty = $flatProperty->parent(); if (is_null($parentProperty)) { @@ -403,7 +403,11 @@ private function isHierarchicalProperty( MultilingualString|MultilingualLink|AdmissionRequirement|Degree $flatProperty ): bool { - return $flatProperty instanceof Degree || $flatProperty instanceof AdmissionRequirement; + return in_array($flatProperty::class, [ + Degree::class, + AdmissionRequirement::class, + MultilingualLink::class, + ], true); } private function createTerm(TermData $termData): ?int From 5f69153e6ece31a9453d75d666f221739b0e7e58 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Tue, 24 Dec 2024 15:29:16 +0200 Subject: [PATCH 2/4] doc: update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5540ea9..42479c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Add synchronization of 'German language skills for international students' child terms to consuming websites. + ## [2.1.0] - 2024-09-06 ### Added From 8ab3704fe9d2471d8e8c937526a8668bee3d8453 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Thu, 26 Dec 2024 09:15:46 +0200 Subject: [PATCH 3/4] refactor: simplify code --- src/Infrastructure/Search/FilterableTermsUpdater.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Infrastructure/Search/FilterableTermsUpdater.php b/src/Infrastructure/Search/FilterableTermsUpdater.php index 4080671..254dd93 100644 --- a/src/Infrastructure/Search/FilterableTermsUpdater.php +++ b/src/Infrastructure/Search/FilterableTermsUpdater.php @@ -403,11 +403,7 @@ private function isHierarchicalProperty( MultilingualString|MultilingualLink|AdmissionRequirement|Degree $flatProperty ): bool { - return in_array($flatProperty::class, [ - Degree::class, - AdmissionRequirement::class, - MultilingualLink::class, - ], true); + return !$flatProperty instanceof MultilingualString; } private function createTerm(TermData $termData): ?int From 73ca3fddca927acadfb0b5a3c4c90bf5ebcea721 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Fri, 3 Jan 2025 14:01:35 +0200 Subject: [PATCH 4/4] chore: update common package --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 8a8817c..438f1ea 100644 --- a/composer.lock +++ b/composer.lock @@ -401,12 +401,12 @@ "source": { "type": "git", "url": "https://github.com/RRZE-Webteam/FAU-Studium-Common.git", - "reference": "2314da111571d795a3f3d3dbe194680737a26e07" + "reference": "9d164cfcdb8ff80950fbf07b9a9e8629342d7cac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/2314da111571d795a3f3d3dbe194680737a26e07", - "reference": "2314da111571d795a3f3d3dbe194680737a26e07", + "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/9d164cfcdb8ff80950fbf07b9a9e8629342d7cac", + "reference": "9d164cfcdb8ff80950fbf07b9a9e8629342d7cac", "shasum": "" }, "require": { @@ -479,7 +479,7 @@ "source": "https://github.com/RRZE-Webteam/FAU-Studium-Common/tree/main", "issues": "https://github.com/RRZE-Webteam/FAU-Studium-Common/issues" }, - "time": "2024-09-04T13:20:56+00:00" + "time": "2025-01-03T11:55:51+00:00" }, { "name": "webmozart/assert",