diff --git a/src/EventListener/MapFromListener.php b/src/EventListener/MapFromListener.php index 0ecf9f4..d26cdcb 100644 --- a/src/EventListener/MapFromListener.php +++ b/src/EventListener/MapFromListener.php @@ -39,7 +39,7 @@ public function __invoke(GenerateMapperEvent $event): void if ($reflectionClassOrPropertyOrMethod instanceof \ReflectionClass) { if ($mapFromAttributeInstance->property === null) { - throw new BadMapDefinitionException(sprintf('Required `name` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName())); + throw new BadMapDefinitionException(sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName())); } if ($mapFromAttributeInstance->transformer === null) { diff --git a/src/EventListener/MapToListener.php b/src/EventListener/MapToListener.php index cb195e5..1d40857 100644 --- a/src/EventListener/MapToListener.php +++ b/src/EventListener/MapToListener.php @@ -38,7 +38,7 @@ public function __invoke(GenerateMapperEvent $event): void if ($reflectionClassOrPropertyOrMethod instanceof \ReflectionClass) { if ($mapToAttributeInstance->property === null) { - throw new BadMapDefinitionException(sprintf('Required `name` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName())); + throw new BadMapDefinitionException(sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName())); } if ($mapToAttributeInstance->transformer === null) {