Skip to content

Commit

Permalink
Add Support for PHP 8.4 (#87)
Browse files Browse the repository at this point in the history
* Add PHP 8.4 to the matrix
* Fix implicitly nullable parameters
* Permit installation of laminas-diactoros ^3 in dev
  • Loading branch information
gsteel authored Oct 31, 2024
1 parent 0b86992 commit f3eb48d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Build-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-22.04]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
include:
- operating-system: ubuntu-20.04
php-versions: '7.4'
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.3.3 - 2024-10-31

### Added

- Added support for PHP 8.4

## 2.3.2 - 2024-03-03

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"guzzlehttp/psr7": "^2.0",
"php-http/client-integration-tests": "^3.0",
"phpunit/phpunit": "^7.5 || ^9.4",
"laminas/laminas-diactoros": "^2.0",
"laminas/laminas-diactoros": "^2.0 || ^3.0",
"php-http/message-factory": "^1.1"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class Client implements HttpClient, HttpAsyncClient
* @since 2.0 Accepts PSR-17 factories instead of HTTPlug ones.
*/
public function __construct(
ResponseFactoryInterface $responseFactory = null,
StreamFactoryInterface $streamFactory = null,
?ResponseFactoryInterface $responseFactory = null,
?StreamFactoryInterface $streamFactory = null,
array $options = []
) {
$this->responseFactory = $responseFactory ?: Psr17FactoryDiscovery::findResponseFactory();
Expand Down
6 changes: 3 additions & 3 deletions src/CurlPromise.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ public function __construct(PromiseCore $core, MultiRunner $runner)
* If you do not care about one of the cases, you can set the corresponding callable to null
* The callback will be called when the response or exception arrived and never more than once.
*
* @param callable $onFulfilled Called when a response will be available
* @param callable $onRejected Called when an error happens.
* @param callable|null $onFulfilled Called when a response will be available
* @param callable|null $onRejected Called when an error happens.
*
* You must always return the Response in the interface or throw an Exception
*
* @return Promise Always returns a new promise which is resolved with value of the executed
* callback (onFulfilled / onRejected)
*/
public function then(callable $onFulfilled = null, callable $onRejected = null)
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
{
if ($onFulfilled) {
$this->core->addOnFulfilled($onFulfilled);
Expand Down
2 changes: 1 addition & 1 deletion src/MultiRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function remove(PromiseCore $core): void
*
* @param PromiseCore|null $targetCore
*/
public function wait(PromiseCore $targetCore = null): void
public function wait(?PromiseCore $targetCore = null): void
{
do {
$status = curl_multi_exec($this->multiHandle, $active);
Expand Down

0 comments on commit f3eb48d

Please sign in to comment.