Skip to content

Commit

Permalink
Upgrade from Zend to Laminas. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Jan 27, 2020
1 parent 0ae4a51 commit f0cb718
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 18 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 3.0.0 - 2020-01-27

### Added

- Nothing.

### Changed

- Updated Zend dependencies to use Laminas equivalents.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 2.4.1 - 2019-09-13

### Added
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"require": {
"php": ">=7.0.8",
"zendframework/zend-console": ">=2.2",
"zendframework/zend-http": ">=2.2"
"laminas/laminas-console": ">=2.2",
"laminas/laminas-http": ">=2.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.16.1",
Expand Down
2 changes: 1 addition & 1 deletion src/ConsoleOutput/ConsoleWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
namespace VuFindHarvest\ConsoleOutput;

use Zend\Console\Console;
use Laminas\Console\Console;

/**
* Thin wrapper around console output
Expand Down
4 changes: 2 additions & 2 deletions src/OaiPmh/Communicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
*/
namespace VuFindHarvest\OaiPmh;

use Laminas\Http\Client;
use Laminas\Uri\Http;
use VuFindHarvest\ConsoleOutput\WriterAwareTrait;
use VuFindHarvest\ResponseProcessor\ResponseProcessorInterface;
use Zend\Http\Client;
use Zend\Uri\Http;

/**
* OAI-PMH Communicator (handles low-level request/response processing).
Expand Down
4 changes: 2 additions & 2 deletions src/OaiPmh/HarvesterConsoleRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
*/
namespace VuFindHarvest\OaiPmh;

use Laminas\Console\Getopt;
use Laminas\Http\Client;
use VuFindHarvest\ConsoleOutput\ConsoleWriter;
use VuFindHarvest\ConsoleOutput\WriterAwareTrait;
use Zend\Console\Getopt;
use Zend\Http\Client;

/**
* OAI Class
Expand Down
2 changes: 1 addition & 1 deletion src/OaiPmh/HarvesterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
*/
namespace VuFindHarvest\OaiPmh;

use Laminas\Http\Client;
use VuFindHarvest\ConsoleOutput\ConsoleWriter;
use VuFindHarvest\RecordWriterStrategy\RecordWriterStrategyFactory;
use VuFindHarvest\RecordWriterStrategy\RecordWriterStrategyInterface;
use VuFindHarvest\ResponseProcessor\ResponseProcessorInterface;
use VuFindHarvest\ResponseProcessor\SimpleXmlResponseProcessor;
use Zend\Http\Client;

/**
* Factory for OAI-PMH Harvest Tool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

use VuFindHarvest\OaiPmh\Harvester;
use VuFindHarvest\OaiPmh\HarvesterFactory;
use Zend\Http\Client;
use Laminas\Http\Client;

/**
* OAI-PMH harvester factory integration test.
Expand Down Expand Up @@ -204,7 +204,7 @@ public function testDateAutodetectWith503Retry()
$response->expects($this->any())
->method('getBody')
->will($this->returnValue($this->getIdentifyResponse()));
$header = $this->getMockBuilder('Zend\Http\Header\RetryAfter')->getMock();
$header = $this->getMockBuilder('Laminas\Http\Header\RetryAfter')->getMock();
$header->expects($this->once())
->method('getDeltaSeconds')
->will($this->returnValue(1));
Expand Down Expand Up @@ -272,21 +272,21 @@ protected function getIdentifyResponse()
/**
* Get a fake HTTP client
*
* @return \Zend\Http\Client
* @return \Laminas\Http\Client
*/
protected function getMockClient()
{
$query = $this->getMockBuilder('Zend\Stdlib\Parameters')->getMock();
$request = $this->getMockBuilder('Zend\Http\Request')->getMock();
$query = $this->getMockBuilder('Laminas\Stdlib\Parameters')->getMock();
$request = $this->getMockBuilder('Laminas\Http\Request')->getMock();
$request->expects($this->any())
->method('getQuery')
->will($this->returnValue($query));
$headers = $this->getMockBuilder('Zend\Http\Headers')->getMock();
$response = $this->getMockBuilder('Zend\Http\Response')->getMock();
$headers = $this->getMockBuilder('Laminas\Http\Headers')->getMock();
$response = $this->getMockBuilder('Laminas\Http\Response')->getMock();
$response->expects($this->any())
->method('getHeaders')
->will($this->returnValue($headers));
$client = $this->getMockBuilder('Zend\Http\Client')->getMock();
$client = $this->getMockBuilder('Laminas\Http\Client')->getMock();
$client->expects($this->any())
->method('getRequest')
->will($this->returnValue($request));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function testInvalidIniFile()
public function testRunFromIniFile()
{
$basePath = '/foo/bar';
$client = $this->getMockBuilder('Zend\Http\Client')->getMock();
$client = $this->getMockBuilder('Laminas\Http\Client')->getMock();
$harvester = $this->getMockHarvester();
$expectedSettings = [
'url' => 'http://bar',
Expand Down Expand Up @@ -167,7 +167,7 @@ public function testRunFromIniFile()
public function testRunFromIniFileWithOptionOverrides()
{
$basePath = '/foo/bar';
$client = $this->getMockBuilder('Zend\Http\Client')->getMock();
$client = $this->getMockBuilder('Laminas\Http\Client')->getMock();
$harvester = $this->getMockHarvester();
$expectedSettings = [
'url' => 'http://bar',
Expand Down

0 comments on commit f0cb718

Please sign in to comment.