diff --git a/composer.json b/composer.json index 826a277..87dde3b 100644 --- a/composer.json +++ b/composer.json @@ -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" } } diff --git a/src/Choir/Http/Response.php b/src/Choir/Http/Response.php index 3ef6052..6b952cf 100644 --- a/src/Choir/Http/Response.php +++ b/src/Choir/Http/Response.php @@ -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) { diff --git a/src/Choir/Http/UploadedFile.php b/src/Choir/Http/UploadedFile.php index 8444c33..0e66cc0 100644 --- a/src/Choir/Http/UploadedFile.php +++ b/src/Choir/Http/UploadedFile.php @@ -22,7 +22,7 @@ class UploadedFile implements UploadedFileInterface * @var null|string */ private $file; - + private string $key; private bool $moved = false; @@ -53,7 +53,7 @@ class UploadedFile implements UploadedFileInterface $this->file = $this->fileinfo['tmp_name']; } } - + public function getKey(): string { return $this->key; diff --git a/src/Choir/globals.php b/src/Choir/globals.php index 7605777..ada29b3 100644 --- a/src/Choir/globals.php +++ b/src/Choir/globals.php @@ -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;