Skip to content

Commit

Permalink
minor #196 Add context to (de)normalizer support check (mbrodala)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.x-dev branch.

Discussion
----------

Add context to (de)normalizer support check

See symfony/symfony#43982

Commits
-------

ab69eab Add context to (de)normalizer support check
  • Loading branch information
ogizanagi committed Jul 11, 2022
2 parents 5741331 + ab69eab commit 7266715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bridge/Symfony/Serializer/Normalizer/EnumNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function normalize($object, $format = null, array $context = []): string
/**
* {@inheritdoc}
*/
public function supportsNormalization($data, $format = null): bool
public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof EnumInterface;
}
Expand Down Expand Up @@ -67,7 +67,7 @@ public function denormalize($data, $class, $format = null, array $context = []):
/**
* {@inheritdoc}
*/
public function supportsDenormalization($data, $type, $format = null): bool
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return is_a($type, EnumInterface::class, true);
}
Expand Down

0 comments on commit 7266715

Please sign in to comment.