Skip to content

Commit

Permalink
Merge pull request #1310 from curzio-della-santa/master
Browse files Browse the repository at this point in the history
Fix callback-method setup using XmlDriver
  • Loading branch information
goetas authored Jul 1, 2021
2 parents 528b4ef + 62c15a9 commit 292f5db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Metadata/Driver/XmlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,15 @@ protected function loadMetadataFromFile(\ReflectionClass $class, string $path):

switch ((string) $method->attributes()->type) {
case 'pre-serialize':
$metadata->addPreSerializeMethod(new MethodMetadata($name, (string) $method->attributes()->name));
$metadata->addPreSerializeMethod(new MethodMetadata($class->name, (string) $method->attributes()->name));
break;

case 'post-serialize':
$metadata->addPostSerializeMethod(new MethodMetadata($name, (string) $method->attributes()->name));
$metadata->addPostSerializeMethod(new MethodMetadata($class->name, (string) $method->attributes()->name));
break;

case 'post-deserialize':
$metadata->addPostDeserializeMethod(new MethodMetadata($name, (string) $method->attributes()->name));
$metadata->addPostDeserializeMethod(new MethodMetadata($class->name, (string) $method->attributes()->name));
break;

case 'handler':
Expand Down

0 comments on commit 292f5db

Please sign in to comment.