From 1bea0ccb673a0f13b3d701d6c415b27952605efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Thu, 12 Sep 2024 16:47:37 +0200 Subject: [PATCH 1/2] fix: This will prtect from exporting properties that don't have range --- models/classes/metadata/metaMetadata/PropertyMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/classes/metadata/metaMetadata/PropertyMapper.php b/models/classes/metadata/metaMetadata/PropertyMapper.php index af4fb9a19..398c9f447 100644 --- a/models/classes/metadata/metaMetadata/PropertyMapper.php +++ b/models/classes/metadata/metaMetadata/PropertyMapper.php @@ -64,7 +64,7 @@ public function getMetadataProperties(Property $property): array private function isIgnoredForCollectionGathering(Property $property): bool { - return in_array($property->getUri(), $this->getIgnoredProperties()); + return in_array($property->getUri(), $this->getIgnoredProperties()) || $property->getRange() === null; } private function getIgnoredProperties(): array From cef7e638fc36180ec52b41bb00b39ea1aefc3422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Mon, 16 Sep 2024 16:49:38 +0200 Subject: [PATCH 2/2] fix: PropertyMapperTest --- .../models/classes/metadata/metaMetadata/PropertyMapperTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit/models/classes/metadata/metaMetadata/PropertyMapperTest.php b/test/unit/models/classes/metadata/metaMetadata/PropertyMapperTest.php index 056e50843..b2eb2d3b0 100644 --- a/test/unit/models/classes/metadata/metaMetadata/PropertyMapperTest.php +++ b/test/unit/models/classes/metadata/metaMetadata/PropertyMapperTest.php @@ -50,6 +50,7 @@ public function testGetMetadataProperties(): void $property = $this->createMock(Property::class); $resourceMock = $this->createMock(Resource::class); $property->method('getUri')->willReturn('uri'); + $property->method('getRange')->willReturn('range'); $resourceMock->method('getUri')->willReturn('resource_uri'); $property