Update 1.0.3, support PHP 8.4

This commit is contained in:
crazywhalecc 2025-03-10 10:14:46 +08:00
parent 103e88977c
commit d7a05ac929
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
4 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@
}
],
"require": {
"php": "^7.4 || ^8.0 || ^8.1 || ^8.2",
"php": "^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3 || ^8.4",
"psr/http-client": "^1.0"
},
"require-dev": {
@ -64,7 +64,7 @@
"[ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/cghooks add"
],
"analyse": "phpstan analyse --memory-limit 300M",
"cs-fix": "php-cs-fixer fix",
"cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
"test": "phpunit --no-coverage"
}
}

View File

@ -35,7 +35,7 @@ class Response implements ResponseInterface
* @param string $version Protocol version
* @param null|string $reason Reason phrase (when empty a default will be used based on the status code)
*/
public function __construct($status = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null)
public function __construct($status = 200, array $headers = [], $body = null, string $version = '1.1', ?string $reason = null)
{
// If we got nobody, defer initialization of the stream until Response::getBody()
if ($body !== '' && $body !== null) {

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
const CHOIR_PSR_HTTP_VERSION = '1.0.2';
const CHOIR_PSR_HTTP_VERSION = '1.0.3';
// Choir TCP 连接状态
const CHOIR_TCP_INITIAL = 0;