Skip to content

Commit a11fc85

Browse files
committed
fix: property name in error messages
1 parent e959098 commit a11fc85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/EventListener/MapFromListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __invoke(GenerateMapperEvent $event): void
3939

4040
if ($reflectionClassOrPropertyOrMethod instanceof \ReflectionClass) {
4141
if ($mapFromAttributeInstance->property === null) {
42-
throw new BadMapDefinitionException(sprintf('Required `name` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName()));
42+
throw new BadMapDefinitionException(sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapFrom::class, $reflectionClassOrPropertyOrMethod->getName()));
4343
}
4444

4545
if ($mapFromAttributeInstance->transformer === null) {

src/EventListener/MapToListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __invoke(GenerateMapperEvent $event): void
3838

3939
if ($reflectionClassOrPropertyOrMethod instanceof \ReflectionClass) {
4040
if ($mapToAttributeInstance->property === null) {
41-
throw new BadMapDefinitionException(sprintf('Required `name` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName()));
41+
throw new BadMapDefinitionException(sprintf('Required `property` property in the "%s" attribute on "%s" class.', MapTo::class, $reflectionClassOrPropertyOrMethod->getName()));
4242
}
4343

4444
if ($mapToAttributeInstance->transformer === null) {

0 commit comments

Comments
 (0)