Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ jobs:
name: PHP ${{ matrix.php }} Latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -25,10 +26,6 @@ jobs:
tools: composer:v2
coverage: none

- name: Emulate PHP 8.3
run: composer config platform.php 8.3.999
if: matrix.php == '8.4'

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

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

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -67,7 +65,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 1.5.0 - unreleased

- Test with newer PHP versions up to 8.5
- Drop support for PHP < 7.4

## 1.4.2 - 2024-09-04

- Fix phpdoc syntax.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
}
],
"require": {
"php": "^7.1 || ^8.0",
"php": "^7.4 || ^8.0",
"php-http/discovery": "^1.15",
"psr/http-factory-implementation": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3",
"phpunit/phpunit": "^8.5.50 || ^9.3 || ^10.0 || ^11.0 || ^12.0",
"php-http/message": "^1.5",
"php-http/message-factory": "^1.0.2",
"nyholm/psr7": "^1.0"
Expand Down
4 changes: 3 additions & 1 deletion tests/FunctionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Nyholm\Psr7\Factory\HttplugFactory;
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7\Stream;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\StreamInterface;

Expand Down Expand Up @@ -168,6 +169,7 @@ public function testThrowsExceptionInConstructor()
/**
* @dataProvider getStreamFactories
*/
#[DataProvider('getStreamFactories')]
public function testSupportDifferentFactories($factory)
{
$resource = fopen(__DIR__.'/Resources/httplug.png', 'r');
Expand All @@ -180,7 +182,7 @@ public function testSupportDifferentFactories($factory)
$this->assertTrue(false !== strpos($multipartStream, 'Content-Type: image/png'));
}

public function getStreamFactories()
public static function getStreamFactories()
{
yield 'Httplug Stream Factory' => [new HttplugFactory()];
yield 'PSR-17 Stream Factory' => [new Psr17Factory()];
Expand Down