Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
changed merge for zend-stdlib's merge. Changed a use namespace reference
Browse files Browse the repository at this point in the history
  • Loading branch information
mkherlakian committed Sep 20, 2017
1 parent e7313bb commit 9457a25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ArraySerializable.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function hydrate(array $data, $object)
if (is_callable([$object, 'exchangeArray'])) {
if (is_callable([$object, 'getArrayCopy'])) {
$original = $object->getArrayCopy($object);
$replacement = array_merge($original, $replacement);
$replacement = \Zend\Stdlib\ArrayUtils::merge($original, $replacement);
}
$object->exchangeArray($replacement);
} elseif (is_callable([$object, 'populate'])) {
Expand Down
5 changes: 2 additions & 3 deletions test/ArraySerializableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Zend\Hydrator\Exception\BadMethodCallException;
use Zend\Hydrator\ArraySerializable;
use ZendTest\Hydrator\TestAsset\ArraySerializable as ArraySerializableAsset;
use ZendTest\Hydrator\TestAsset\ArraySerializableNoGetArrayCopy as ArraySerializableAssetNoGetArrayCopy;

/**
* Unit tests for {@see ArraySerializable}
Expand Down Expand Up @@ -121,10 +120,10 @@ public function testWillPreserveOriginalPropsAtHydration()
*/
public function testWillReplaceArrayIfNoGetArrayCopy()
{
$original = new ArraySerializableAssetNoGetArrayCopy();
$original = new \ZendTest\Hydrator\TestAsset\ArraySerializableNoGetArrayCopy();

$data = [
'bar' => 'foo1'
'bar' => 'foo1'
];

$expected = $data;
Expand Down

0 comments on commit 9457a25

Please sign in to comment.