Skip to content

Commit

Permalink
Merge pull request #20 from swagindustries/add-missing-context-forwar…
Browse files Browse the repository at this point in the history
…d-to-domain-denormalizer
  • Loading branch information
Nek- committed May 16, 2023
2 parents a8bd1e2 + a95d471 commit 6acbea9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- Add new return types (for Symfony 6)
- Add new context parameter for DomainDenormalizer

## [2.3.2] - 2023-03-15

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions src/Integration/Symfony/Serializer/DomainDenormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ 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 $this->decorated->supportsDenormalization($data, $type, $format);
return $this->decorated->supportsDenormalization($data, $type, $format, $context);
}

/**
Expand All @@ -67,9 +67,9 @@ public function normalize($object, $format = null, array $context = [])
/**
* {@inheritdoc}
*/
public function supportsNormalization($data, $format = null): bool
public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $this->decorated->supportsNormalization($data, $format);
return $this->decorated->supportsNormalization($data, $format, $context);
}

public function setSerializer(SerializerInterface $serializer): void
Expand Down

0 comments on commit 6acbea9

Please sign in to comment.