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

Commit

Permalink
Merge branch 'feature/hydrators' into develop
Browse files Browse the repository at this point in the history
Close #42
  • Loading branch information
weierophinney committed Sep 22, 2015
2 parents 34d0cef + 99051f1 commit a814642
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- [#42](https://github.com/zendframework/zend-db/pull/42) updates the component
to use zend-hydrator for hydrator functionality; this provides forward
compatibility with zend-hydrator, and backwards compatibility with
hydrators from older versions of zend-stdlib.
- [#15](https://github.com/zendframework/zend-db/pull/15) adds a new predicate,
`Zend\Db\Sql\Predicate\NotBetween`, which can be invoked via `Sql`
instances: `$sql->notBetween($field, $min, $max)`.
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
},
"require": {
"php": ">=5.5",
"zendframework/zend-stdlib": "~2.5"
"zendframework/zend-stdlib": "~2.7"
},
"require-dev": {
"zendframework/zend-eventmanager": "~2.5",
"zendframework/zend-hydrator": "~1.0",
"zendframework/zend-mvc": "~2.5",
"zendframework/zend-servicemanager": "~2.5",
"zendframework/zend-stdlib": ">=2.5.0,<2.7.0",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/PHPUnit": "~4.0"
},
"suggest": {
"zendframework/zend-eventmanager": "Zend\\EventManager component",
"zendframework/zend-hydrator": "Zend\\Hydrator component for using HydratingResultSets",
"zendframework/zend-servicemanager": "Zend\\ServiceManager component"
},
"minimum-stability": "dev",
Expand Down
4 changes: 2 additions & 2 deletions src/ResultSet/HydratingResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
namespace Zend\Db\ResultSet;

use ArrayObject;
use Zend\Stdlib\Hydrator\ArraySerializable;
use Zend\Stdlib\Hydrator\HydratorInterface;
use Zend\Hydrator\ArraySerializable;
use Zend\Hydrator\HydratorInterface;

class HydratingResultSet extends AbstractResultSet
{
Expand Down
6 changes: 4 additions & 2 deletions test/ResultSet/HydratingResultSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
namespace ZendTest\Db\ResultSet;

use Zend\Db\ResultSet\HydratingResultSet;
use Zend\Hydrator\ArraySerializable;
use Zend\Hydrator\ClassMethods;

class HydratingResultSetTest extends \PHPUnit_Framework_TestCase
{
Expand Down Expand Up @@ -38,7 +40,7 @@ public function testGetObjectPrototype()
public function testSetHydrator()
{
$hydratingRs = new HydratingResultSet;
$this->assertSame($hydratingRs, $hydratingRs->setHydrator(new \Zend\Stdlib\Hydrator\ClassMethods()));
$this->assertSame($hydratingRs, $hydratingRs->setHydrator(new ClassMethods()));
}

/**
Expand All @@ -47,7 +49,7 @@ public function testSetHydrator()
public function testGetHydrator()
{
$hydratingRs = new HydratingResultSet;
$this->assertInstanceOf('Zend\Stdlib\Hydrator\ArraySerializable', $hydratingRs->getHydrator());
$this->assertInstanceOf(ArraySerializable::class, $hydratingRs->getHydrator());
}

/**
Expand Down

0 comments on commit a814642

Please sign in to comment.