Skip to content

Commit f3eb48d

Browse files
authored
Add Support for PHP 8.4 (#87)
* Add PHP 8.4 to the matrix * Fix implicitly nullable parameters * Permit installation of laminas-diactoros ^3 in dev
1 parent 0b86992 commit f3eb48d

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

Diff for: .github/workflows/Build-Test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
operating-system: [ubuntu-22.04]
18-
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
18+
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
1919
include:
2020
- operating-system: ubuntu-20.04
2121
php-versions: '7.4'

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 2.3.3 - 2024-10-31
9+
10+
### Added
11+
12+
- Added support for PHP 8.4
13+
814
## 2.3.2 - 2024-03-03
915

1016
### Fixed

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"guzzlehttp/psr7": "^2.0",
2929
"php-http/client-integration-tests": "^3.0",
3030
"phpunit/phpunit": "^7.5 || ^9.4",
31-
"laminas/laminas-diactoros": "^2.0",
31+
"laminas/laminas-diactoros": "^2.0 || ^3.0",
3232
"php-http/message-factory": "^1.1"
3333
},
3434
"autoload": {

Diff for: src/Client.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class Client implements HttpClient, HttpAsyncClient
7777
* @since 2.0 Accepts PSR-17 factories instead of HTTPlug ones.
7878
*/
7979
public function __construct(
80-
ResponseFactoryInterface $responseFactory = null,
81-
StreamFactoryInterface $streamFactory = null,
80+
?ResponseFactoryInterface $responseFactory = null,
81+
?StreamFactoryInterface $streamFactory = null,
8282
array $options = []
8383
) {
8484
$this->responseFactory = $responseFactory ?: Psr17FactoryDiscovery::findResponseFactory();

Diff for: src/CurlPromise.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ public function __construct(PromiseCore $core, MultiRunner $runner)
5151
* If you do not care about one of the cases, you can set the corresponding callable to null
5252
* The callback will be called when the response or exception arrived and never more than once.
5353
*
54-
* @param callable $onFulfilled Called when a response will be available
55-
* @param callable $onRejected Called when an error happens.
54+
* @param callable|null $onFulfilled Called when a response will be available
55+
* @param callable|null $onRejected Called when an error happens.
5656
*
5757
* You must always return the Response in the interface or throw an Exception
5858
*
5959
* @return Promise Always returns a new promise which is resolved with value of the executed
6060
* callback (onFulfilled / onRejected)
6161
*/
62-
public function then(callable $onFulfilled = null, callable $onRejected = null)
62+
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
6363
{
6464
if ($onFulfilled) {
6565
$this->core->addOnFulfilled($onFulfilled);

Diff for: src/MultiRunner.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function remove(PromiseCore $core): void
8181
*
8282
* @param PromiseCore|null $targetCore
8383
*/
84-
public function wait(PromiseCore $targetCore = null): void
84+
public function wait(?PromiseCore $targetCore = null): void
8585
{
8686
do {
8787
$status = curl_multi_exec($this->multiHandle, $active);

0 commit comments

Comments
 (0)