mirror of
https://github.com/crazywhalecc/choir-psr-http.git
synced 2026-03-17 20:24:52 +08:00
Update 1.0.3, support PHP 8.4
This commit is contained in:
parent
103e88977c
commit
d7a05ac929
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user