diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4a7417b..31ebd8f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 357798c..968eb05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/composer.json b/composer.json index 1aebe61..2b2bc2b 100644 --- a/composer.json +++ b/composer.json @@ -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" diff --git a/tests/FunctionTest.php b/tests/FunctionTest.php index 52e84ea..79b34bc 100644 --- a/tests/FunctionTest.php +++ b/tests/FunctionTest.php @@ -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; @@ -168,6 +169,7 @@ public function testThrowsExceptionInConstructor() /** * @dataProvider getStreamFactories */ + #[DataProvider('getStreamFactories')] public function testSupportDifferentFactories($factory) { $resource = fopen(__DIR__.'/Resources/httplug.png', 'r'); @@ -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()];