Skip to content

Add Support for PHP 8.4 #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 31, 2024
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
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