Skip to content

Commit

Permalink
Merge pull request #280 from patchlevel/allow-to-pass-upcaster
Browse files Browse the repository at this point in the history
Allow to pass upcaster
  • Loading branch information
DavidBadura authored Jun 28, 2022
2 parents 47a84f2 + 5d14602 commit 38c4032
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Serializer/DefaultEventSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ public function deserialize(SerializedEvent $data, array $options = []): object
/**
* @param list<string> $paths
*/
public static function createFromPaths(array $paths): static
public static function createFromPaths(array $paths, ?Upcaster $upcaster = null): static
{
return new self(
(new AttributeEventRegistryFactory())->create($paths),
new MetadataEventHydrator(new AttributeEventMetadataFactory()),
new JsonEncoder()
new JsonEncoder(),
$upcaster
);
}
}

0 comments on commit 38c4032

Please sign in to comment.