Skip to content

Commit daa3355

Browse files
authored
Merge pull request #69 from php-http/php85
test with php 8.5
2 parents afaf3de + b11a94a commit daa3355

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ jobs:
1111
name: PHP ${{ matrix.php }} Latest
1212
runs-on: ubuntu-latest
1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
16+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1617

1718
steps:
1819
- name: Checkout code
19-
uses: actions/checkout@v3
20+
uses: actions/checkout@v6
2021

2122
- name: Setup PHP
2223
uses: shivammathur/setup-php@v2
@@ -25,10 +26,6 @@ jobs:
2526
tools: composer:v2
2627
coverage: none
2728

28-
- name: Emulate PHP 8.3
29-
run: composer config platform.php 8.3.999
30-
if: matrix.php == '8.4'
31-
3229
- name: Install dependencies
3330
run: composer update --prefer-dist --no-interaction --no-progress
3431

@@ -39,12 +36,13 @@ jobs:
3936
name: PHP ${{ matrix.php }} Lowest
4037
runs-on: ubuntu-latest
4138
strategy:
39+
fail-fast: false
4240
matrix:
43-
php: ['7.1', '7.2', '7.3', '7.4']
41+
php: ['7.4', '8.0', '8.5']
4442

4543
steps:
4644
- name: Checkout code
47-
uses: actions/checkout@v3
45+
uses: actions/checkout@v6
4846

4947
- name: Setup PHP
5048
uses: shivammathur/setup-php@v2
@@ -67,7 +65,7 @@ jobs:
6765

6866
steps:
6967
- name: Checkout code
70-
uses: actions/checkout@v3
68+
uses: actions/checkout@v6
7169

7270
- name: Setup PHP
7371
uses: shivammathur/setup-php@v2

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 1.5.0 - unreleased
4+
5+
- Test with newer PHP versions up to 8.5
6+
- Drop support for PHP < 7.4
7+
38
## 1.4.2 - 2024-09-04
49

510
- Fix phpdoc syntax.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.1 || ^8.0",
14+
"php": "^7.4 || ^8.0",
1515
"php-http/discovery": "^1.15",
1616
"psr/http-factory-implementation": "^1.0"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3",
19+
"phpunit/phpunit": "^8.5.50 || ^9.3 || ^10.0 || ^11.0 || ^12.0",
2020
"php-http/message": "^1.5",
2121
"php-http/message-factory": "^1.0.2",
2222
"nyholm/psr7": "^1.0"

tests/FunctionTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Nyholm\Psr7\Factory\HttplugFactory;
88
use Nyholm\Psr7\Factory\Psr17Factory;
99
use Nyholm\Psr7\Stream;
10+
use PHPUnit\Framework\Attributes\DataProvider;
1011
use PHPUnit\Framework\TestCase;
1112
use Psr\Http\Message\StreamInterface;
1213

@@ -168,6 +169,7 @@ public function testThrowsExceptionInConstructor()
168169
/**
169170
* @dataProvider getStreamFactories
170171
*/
172+
#[DataProvider('getStreamFactories')]
171173
public function testSupportDifferentFactories($factory)
172174
{
173175
$resource = fopen(__DIR__.'/Resources/httplug.png', 'r');
@@ -180,7 +182,7 @@ public function testSupportDifferentFactories($factory)
180182
$this->assertTrue(false !== strpos($multipartStream, 'Content-Type: image/png'));
181183
}
182184

183-
public function getStreamFactories()
185+
public static function getStreamFactories()
184186
{
185187
yield 'Httplug Stream Factory' => [new HttplugFactory()];
186188
yield 'PSR-17 Stream Factory' => [new Psr17Factory()];

0 commit comments

Comments
 (0)