Skip to content

Commit 83cac1f

Browse files
committed
ci: add tests for PHP 8.5
1 parent a0d5f0d commit 83cac1f

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
max-parallel: 10
1616
fail-fast: false
1717
matrix:
18-
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
18+
php: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1919

2020
steps:
2121
- name: Set up PHP
@@ -44,7 +44,7 @@ jobs:
4444
- name: Set up PHP
4545
uses: shivammathur/[email protected]
4646
with:
47-
php-version: 7.4
47+
php-version: 7.3
4848
coverage: none
4949
tools: flex
5050

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.4 | ^8.0",
14+
"php": "^7.3 | ^8.0",
1515
"php-http/httplug": "^2.4",
1616
"psr/http-client": "^1.0.3",
1717
"guzzlehttp/guzzle": "^7.10"
1818
},
1919
"require-dev": {
2020
"phpunit/phpunit": "^9.6.31 || ^10.0 || ^11.0 || ^12.0",
21-
"php-http/client-integration-tests": "^4.0",
21+
"php-http/client-integration-tests": "^3.0 || ^4.0",
2222
"phpspec/prophecy-phpunit": "^2.4",
2323
"php-http/message-factory": "^1.1"
2424
},

tests/DefaultHttpAdapterWithConfigTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ class DefaultHttpAdapterWithConfigTest extends HttpClientTest
1313
{
1414
protected function createHttpAdapter(): ClientInterface
1515
{
16-
self::$defaultHeaders['X-Test'] = 'configuration-value';
16+
$reflected = new \ReflectionClass(HttpClientTest::class);
17+
$property = $reflected->getProperty('defaultHeaders');
18+
19+
if($property->isStatic()) {
20+
self::$defaultHeaders['X-Test'] = 'configuration-value';
21+
} else {
22+
$this->$defaultHeaders['X-Test'] = 'configuration-value';
23+
}
1724

1825
return Client::createWithConfig([
1926
'headers' => [

0 commit comments

Comments
 (0)