Skip to content

Commit 2b7601f

Browse files
committed
test with php 8.5
1 parent afaf3de commit 2b7601f

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
15+
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v6
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
@@ -25,10 +25,6 @@ jobs:
2525
tools: composer:v2
2626
coverage: none
2727

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

@@ -40,11 +36,11 @@ jobs:
4036
runs-on: ubuntu-latest
4137
strategy:
4238
matrix:
43-
php: ['7.1', '7.2', '7.3', '7.4']
39+
php: ['7.4', '8.0', '8.5']
4440

4541
steps:
4642
- name: Checkout code
47-
uses: actions/checkout@v3
43+
uses: actions/checkout@v6
4844

4945
- name: Setup PHP
5046
uses: shivammathur/setup-php@v2
@@ -67,7 +63,7 @@ jobs:
6763

6864
steps:
6965
- name: Checkout code
70-
uses: actions/checkout@v3
66+
uses: actions/checkout@v6
7167

7268
- name: Setup PHP
7369
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 || ^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)