Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
php-versions: ['7.2', '7.3', '7.4', '8.0']
name: PHP ${{ matrix.php-versions }}

steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v1
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [1.1.0] - 2020-11-26
### Added
- Support for PHP 8

### Changed
- Updated README with link to Packagist

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^7.2",
"php": "^7.2 || ^8.0",
"psr/http-client": "^1.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"phpspec/prophecy": "^1.12",
"phpunit/phpunit": "^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
Expand Down
13 changes: 8 additions & 5 deletions tests/MiddlewareClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Coolblue\Http\Client\MiddlewareInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\Prophet;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
Expand All @@ -18,10 +19,12 @@ public function testHandlingOfMiddlewareInCorrectOrder(): void
{
$order = [];

$request = $this->prophesize(RequestInterface::class);
$response = $this->prophesize(ResponseInterface::class);
$prophet = new Prophet();

$middlewareOne = $this->prophesize(MiddlewareInterface::class);
$request = $prophet->prophesize(RequestInterface::class);
$response = $prophet->prophesize(ResponseInterface::class);

$middlewareOne = $prophet->prophesize(MiddlewareInterface::class);
$middlewareOne->process(Argument::type(RequestInterface::class), Argument::type(ClientInterface::class))
->shouldBeCalled()
->will(function (array $arguments) use (&$order) {
Expand All @@ -32,7 +35,7 @@ public function testHandlingOfMiddlewareInCorrectOrder(): void
return $response;
});

$middlewareTwo = $this->prophesize(MiddlewareInterface::class);
$middlewareTwo = $prophet->prophesize(MiddlewareInterface::class);
$middlewareTwo->process(Argument::type(RequestInterface::class), Argument::type(ClientInterface::class))
->shouldBeCalled()
->will(function (array $arguments) use (&$order) {
Expand All @@ -44,7 +47,7 @@ public function testHandlingOfMiddlewareInCorrectOrder(): void
return $response;
});

$client = $this->prophesize(ClientInterface::class);
$client = $prophet->prophesize(ClientInterface::class);
$client->sendRequest(Argument::type(RequestInterface::class))
->shouldBeCalledOnce()
->will(function () use (&$order, $response) {
Expand Down