Skip to content

Commit 7375352

Browse files
authored
Fixed bug, dropped support for php-http/common:1.x (#33)
* Fixed bug, dropped support for php-http/common * Cs * Minor
1 parent 8867098 commit 7375352

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ cache:
77
- $HOME/.composer/cache/files
88

99
php:
10-
- 7.1
1110
- 7.2
1211
- 7.3
12+
- 7.4
1313

1414
env:
1515
global:
@@ -18,7 +18,7 @@ env:
1818
matrix:
1919
fast_finish: true
2020
include:
21-
- php: 7.1
21+
- php: 7.2
2222
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
2323

2424
before_install:

composer.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@
2121
"php": "^7.1",
2222
"php-http/httplug": "^1.0 || ^2.0",
2323
"php-http/multipart-stream-builder": "^1.0",
24-
"php-http/client-common": "^1.1 || ^2.0",
24+
"php-http/client-common": "^2.0",
2525
"php-http/discovery": "^1.0"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "^7.4",
2929
"php-http/message-factory": "^1.0",
30-
"php-http/curl-client": "^1.6",
30+
"php-http/curl-client": "^2.0",
3131
"php-http/message": "^1.0",
32-
"guzzlehttp/psr7": "^1.3",
33-
"nyholm/nsa": "^1.0"
32+
"symfony/http-client": "^5.0",
33+
"nyholm/nsa": "^1.1",
34+
"nyholm/psr7": "^1.3"
3435
},
3536
"autoload": {
3637
"psr-4": {

src/Api/Customer.php

-9
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ public function update(int $id, string $email, string $firstName, string $lastNa
6060
return $response;
6161
}
6262

63-
/**
64-
* @param string $email
65-
* @param string $firstName
66-
* @param string $lastName
67-
* @param string $gender
68-
* @param array $optionalParams
69-
*
70-
* @return array
71-
*/
7263
private function validateAndGetParams(string $email, string $firstName, string $lastName, string $gender, array $optionalParams): array
7364
{
7465
if (empty($email)) {

src/Http/AuthenticationPlugin.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace FAPI\Sylius\Http;
66

77
use Http\Client\Common\Plugin;
8+
use Http\Promise\Promise;
89
use Psr\Http\Message\RequestInterface;
910
use Psr\Http\Message\ResponseInterface;
1011

@@ -40,7 +41,7 @@ public function __construct(Authenticator $authenticator, string $accessToken)
4041
$this->accessToken = \json_decode($accessToken, true);
4142
}
4243

43-
public function handleRequest(RequestInterface $request, callable $next, callable $first)
44+
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
4445
{
4546
if (null === $this->accessToken) {
4647
return $next($request);

0 commit comments

Comments
 (0)