Skip to content

Commit 10d2279

Browse files
committed
[PHP 8.4] Fixes for implicit nullability deprecation
Fixes all issues that emits a deprecation notice on PHP 8.4. See: - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types) - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)
1 parent fd12ffc commit 10d2279

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Factory/Psr17Factory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function createStreamFromResource($resource): StreamInterface
5757
return Stream::create($resource);
5858
}
5959

60-
public function createUploadedFile(StreamInterface $stream, int $size = null, int $error = \UPLOAD_ERR_OK, string $clientFilename = null, string $clientMediaType = null): UploadedFileInterface
60+
public function createUploadedFile(StreamInterface $stream, ?int $size = null, int $error = \UPLOAD_ERR_OK, ?string $clientFilename = null, ?string $clientMediaType = null): UploadedFileInterface
6161
{
6262
if (null === $size) {
6363
$size = $stream->getSize();

src/Response.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Response implements ResponseInterface
3939
* @param string $version Protocol version
4040
* @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
4141
*/
42-
public function __construct(int $status = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null)
42+
public function __construct(int $status = 200, array $headers = [], $body = null, string $version = '1.1', ?string $reason = null)
4343
{
4444
// If we got no body, defer initialization of the stream until Response::getBody()
4545
if ('' !== $body && null !== $body) {

0 commit comments

Comments
 (0)