Skip to content

Commit ffeed58

Browse files
ci: add tests for PHP 8.5 (#19)
Co-authored-by: Christopher Georg <[email protected]>
1 parent 03a415f commit ffeed58

17 files changed

+45
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
max-parallel: 10
16+
fail-fast: false
1617
matrix:
17-
php: [ '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
18+
php: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1819

1920
steps:
2021
- name: Set up PHP
@@ -25,7 +26,7 @@ jobs:
2526
tools: flex
2627

2728
- name: Checkout code
28-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
2930

3031
- name: Download dependencies
3132
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
@@ -48,7 +49,7 @@ jobs:
4849
tools: flex
4950

5051
- name: Checkout code
51-
uses: actions/checkout@v4
52+
uses: actions/checkout@v6
5253

5354
- name: Download dependencies
5455
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable --prefer-lowest

.github/workflows/static.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717

1818
- name: PHPStan
1919
uses: docker://oskarstark/phpstan-ga
@@ -26,18 +26,18 @@ jobs:
2626
name: PHP-CS-Fixer
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
3030
- name: PHP-CS-Fixer
3131
uses: docker://oskarstark/php-cs-fixer-ga
3232
with:
33-
args: --dry-run
33+
args: --diff --dry-run
3434

3535
psalm:
3636
name: Psalm
3737
runs-on: ubuntu-latest
3838
steps:
3939
- name: Checkout code
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v6
4141

4242
- name: Psalm
4343
uses: docker://vimeo/psalm-github-actions

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
->setRules([
1010
'@Symfony' => true,
1111
'array_syntax' => ['syntax' => 'short'],
12+
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['array_destructuring', 'arrays', 'match']]
1213
]);

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
],
1313
"require": {
1414
"php": "^7.3 | ^8.0",
15-
"php-http/httplug": "^2.0",
16-
"psr/http-client": "^1.0",
17-
"guzzlehttp/guzzle": "^7.0"
15+
"php-http/httplug": "^2.4",
16+
"psr/http-client": "^1.0.3",
17+
"guzzlehttp/guzzle": "^7.10"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^8.0|^9.3",
21-
"php-http/client-integration-tests": "^3.0",
22-
"phpspec/prophecy-phpunit": "^2.0",
20+
"phpunit/phpunit": "^9.6.31 || ^10.0 || ^11.0 || ^12.0",
21+
"php-http/client-integration-tests": "^3.0 || ^4.0",
22+
"phpspec/prophecy-phpunit": "^2.4",
2323
"php-http/message-factory": "^1.1"
2424
},
2525
"provide": {

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
colors="true"
55
bootstrap="vendor/autoload.php"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd">
77
<coverage>
88
<include>
99
<directory suffix=".php">src/</directory>

src/Client.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ public static function createWithConfig(array $config): Client
4343
return new self(self::buildClient($config));
4444
}
4545

46+
#[\Override]
4647
public function sendRequest(RequestInterface $request): ResponseInterface
4748
{
4849
return $this->sendAsyncRequest($request)->wait();
4950
}
5051

52+
#[\Override]
5153
public function sendAsyncRequest(RequestInterface $request)
5254
{
5355
$promise = $this->guzzle->sendAsync($request);

src/Promise.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,19 @@ public function __construct(PromiseInterface $promise, RequestInterface $request
7070
});
7171
}
7272

73+
#[\Override]
7374
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
7475
{
7576
return new static($this->promise->then($onFulfilled, $onRejected), $this->request);
7677
}
7778

79+
#[\Override]
7880
public function getState()
7981
{
8082
return $this->state;
8183
}
8284

85+
#[\Override]
8386
public function wait($unwrap = true)
8487
{
8588
$this->promise->wait(false);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* @author GeLo <[email protected]>
1414
*/
15-
abstract class HttpAdapterTest extends HttpClientTest
15+
abstract class AbstractHttpAdapter extends HttpClientTest
1616
{
1717
protected function createHttpAdapter(): ClientInterface
1818
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* @author Joel Wurtz <[email protected]>
1414
*/
15-
abstract class HttpAsyncAdapterTest extends HttpAsyncClientTest
15+
abstract class AbstractHttpAsyncAdapter extends HttpAsyncClientTest
1616
{
1717
protected function createHttpAsyncClient(): HttpAsyncClient
1818
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* @author GeLo <[email protected]>
1111
*/
12-
class CurlHttpAdapterTest extends HttpAdapterTest
12+
class CurlHttpAdapter extends AbstractHttpAdapter
1313
{
1414
protected function createHandler()
1515
{

0 commit comments

Comments
 (0)