From 8108f42ad4d6749fd03fb18ce03958dacac2bf3b Mon Sep 17 00:00:00 2001 From: soyuka Date: Fri, 20 May 2022 15:11:15 +0200 Subject: [PATCH] fix(metadata): property override when value is set --- src/Metadata/Property/Factory/LegacyPropertyMetadataFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Metadata/Property/Factory/LegacyPropertyMetadataFactory.php b/src/Metadata/Property/Factory/LegacyPropertyMetadataFactory.php index 8bbbe0d60bc..cf9b60991a9 100644 --- a/src/Metadata/Property/Factory/LegacyPropertyMetadataFactory.php +++ b/src/Metadata/Property/Factory/LegacyPropertyMetadataFactory.php @@ -78,7 +78,7 @@ public function create(string $resourceClass, string $property, array $options = $wither = str_replace(['get', 'is'], 'with', $method); - if (method_exists($propertyMetadata, $wither) && null !== $legacyPropertyMetadata->{$method}()) { + if (method_exists($propertyMetadata, $wither) && null !== $legacyPropertyMetadata->{$method}() && null === $propertyMetadata->{$method}()) { $propertyMetadata = $propertyMetadata->{$wither}($legacyPropertyMetadata->{$method}()); } }