From 3c306984d799f49d4f7fbef0b77343fa7ddc8f0d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 10 Feb 2026 14:24:48 +0530 Subject: [PATCH] chore: fix implicit deprecated warnings --- src/Storage/Device/Local.php | 4 ++-- src/Storage/Device/S3.php | 6 +++--- src/Storage/Device/Telemetry.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Storage/Device/Local.php b/src/Storage/Device/Local.php index 5b9d2c99..0d4018b5 100644 --- a/src/Storage/Device/Local.php +++ b/src/Storage/Device/Local.php @@ -62,7 +62,7 @@ public function getRoot(): string * @param string|null $prefix * @return string */ - public function getPath(string $filename, string $prefix = null): string + public function getPath(string $filename, ?string $prefix = null): string { return $this->getAbsolutePath($this->getRoot().DIRECTORY_SEPARATOR.$filename); } @@ -270,7 +270,7 @@ public function abort(string $path, string $extra = ''): bool * * @throws Exception */ - public function read(string $path, int $offset = 0, int $length = null): string + public function read(string $path, int $offset = 0, ?int $length = null): string { if (! $this->exists($path)) { throw new NotFoundException('File not found'); diff --git a/src/Storage/Device/S3.php b/src/Storage/Device/S3.php index c6425ae5..429543c6 100644 --- a/src/Storage/Device/S3.php +++ b/src/Storage/Device/S3.php @@ -167,7 +167,7 @@ public function getRoot(): string * @param string|null $prefix * @return string */ - public function getPath(string $filename, string $prefix = null): string + public function getPath(string $filename, ?string $prefix = null): string { return $this->getRoot().DIRECTORY_SEPARATOR.$filename; } @@ -410,12 +410,12 @@ public function abort(string $path, string $extra = ''): bool * * @param string $path * @param int offset - * @param int length + * @param int|null length * @return string * * @throws \Exception */ - public function read(string $path, int $offset = 0, int $length = null): string + public function read(string $path, int $offset = 0, ?int $length = null): string { unset($this->amzHeaders['x-amz-acl']); unset($this->amzHeaders['x-amz-content-sha256']); diff --git a/src/Storage/Device/Telemetry.php b/src/Storage/Device/Telemetry.php index 340d36a5..206aea85 100644 --- a/src/Storage/Device/Telemetry.php +++ b/src/Storage/Device/Telemetry.php @@ -54,7 +54,7 @@ public function getRoot(): string return $this->underlying->getRoot(); } - public function getPath(string $filename, string $prefix = null): string + public function getPath(string $filename, ?string $prefix = null): string { return $this->measure(__FUNCTION__, $filename, $prefix); } @@ -74,7 +74,7 @@ public function abort(string $path, string $extra = ''): bool return $this->measure(__FUNCTION__, $path, $extra); } - public function read(string $path, int $offset = 0, int $length = null): string + public function read(string $path, int $offset = 0, ?int $length = null): string { return $this->measure(__FUNCTION__, $path, $offset, $length); }