Skip to content

Commit ae3f7f2

Browse files
committed
Add full support for PSR-18
Now, the HTTP request will not trigger a non PSR compatible exception. See #34
1 parent f895fec commit ae3f7f2

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Changed
1717

18-
- Work with HTTPlug 2, drop HTTPlug 1 support
19-
- Move to `react/http` library instead of `react/http-client`
18+
- Add full PSR-18 support.
19+
- Work with HTTPlug 2, drop HTTPlug 1 support.
20+
- Move to `react/http` library instead of `react/http-client`.
2021

2122
## [2.3.0] - 2019-07-30
2223

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
namespace Http\Adapter\React\Exception;
4+
5+
use Http\Client\Exception;
6+
7+
final class UnexpectedValueException extends \UnexpectedValueException implements Exception
8+
{
9+
}

src/Promise.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace Http\Adapter\React;
44

5+
use Http\Adapter\React\Exception\UnexpectedValueException;
56
use Http\Client\Exception as HttplugException;
67
use Http\Promise\Promise as HttpPromise;
78
use Psr\Http\Message\RequestInterface;
89
use Psr\Http\Message\ResponseInterface;
910
use React\EventLoop\LoopInterface;
1011
use React\Promise\PromiseInterface;
1112
use RuntimeException;
12-
use UnexpectedValueException;
1313

1414
/**
1515
* React promise adapter implementation.

tests/PromiseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Http\Adapter\React\Tests;
44

5+
use Http\Adapter\React\Exception\UnexpectedValueException;
56
use Http\Adapter\React\Promise;
67
use Http\Adapter\React\ReactFactory;
78
use Http\Client\Exception\HttpException;
@@ -14,7 +15,6 @@
1415
use Psr\Http\Message\ResponseInterface;
1516
use React\Promise\Promise as ReactPromise;
1617
use RuntimeException;
17-
use UnexpectedValueException;
1818

1919
class PromiseTest extends TestCase
2020
{

0 commit comments

Comments
 (0)