Skip to content

Commit

Permalink
Allow unexpected keys for api response
Browse files Browse the repository at this point in the history
Fixes #199
  • Loading branch information
effectpet authored and usox committed Aug 12, 2023
1 parent ba25256 commit ca9641b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Hydrator/Property/ArrayOfObjectValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ private function createSetter(string $propertyName, ?HydratorConfigInterface $hy
$hydrator->hydrate(
$hydratorConfig,
$object,
(array)$item
(array)$item,
Hydrator::NO_STRICT_KEYS,
);

$items[$key] = $object;
Expand Down
3 changes: 2 additions & 1 deletion src/Hydrator/Property/ObjectValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ private function createSetter(string $propertyName, ?HydratorConfigInterface $hy
$hydrator->hydrate(
$hydratorConfig,
$object,
(array)$value
(array)$value,
Hydrator::NO_STRICT_KEYS
);

$this->$propertyName = $object;
Expand Down

0 comments on commit ca9641b

Please sign in to comment.