Skip to content

Commit 3fe38a0

Browse files
authored
Fix php 8.4 deprecation notices (#6)
1 parent 3d773c8 commit 3fe38a0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/ServerRequestCreator.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class ServerRequestCreator
1313
* @param ServerNormalizerInterface|null $normalizer
1414
* @return ServerRequestInterface
1515
*/
16-
public static function create(ServerNormalizerInterface $normalizer = null): ServerRequestInterface
16+
public static function create(?ServerNormalizerInterface $normalizer = null): ServerRequestInterface
1717
{
1818
return self::createFromGlobals(null, null, null, null, null, $normalizer);
1919
}
@@ -28,12 +28,12 @@ public static function create(ServerNormalizerInterface $normalizer = null): Ser
2828
* @return ServerRequestInterface
2929
*/
3030
public static function createFromGlobals(
31-
array $server = null,
32-
array $files = null,
33-
array $cookie = null,
34-
array $get = null,
35-
array $post = null,
36-
ServerNormalizerInterface $normalizer = null
31+
?array $server = null,
32+
?array $files = null,
33+
?array $cookie = null,
34+
?array $get = null,
35+
?array $post = null,
36+
?ServerNormalizerInterface $normalizer = null
3737
): ServerRequestInterface {
3838
$server ??= $_SERVER;
3939
$normalizer ??= new SapiNormalizer();

src/UploadedFileCreator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public static function create(
2828
$streamOrFile,
2929
int $size,
3030
int $error,
31-
string $clientFilename = null,
32-
string $clientMediaType = null
31+
?string $clientFilename = null,
32+
?string $clientMediaType = null
3333
): UploadedFileInterface {
3434
return new UploadedFile($streamOrFile, $size, $error, $clientFilename, $clientMediaType);
3535
}

0 commit comments

Comments
 (0)