From c3e410034aa2a1eee2fd3e0857aff8b26984bc5f Mon Sep 17 00:00:00 2001 From: Bob Soukup Date: Wed, 15 Jul 2026 14:39:02 +0200 Subject: [PATCH] PHP 8.4 compatibility: explicit nullable parameter type Under PHP 8.4, an implicitly-nullable parameter (a non-nullable type with a `null` default) emits "Implicitly marking parameter as nullable is deprecated". Downloader's constructor declared `ClientInterface $client = null`, so it fires once per class compile on 8.4. Mark the parameter explicitly nullable. The property is already documented `@var ?ClientInterface`, so this only makes the signature match the intent; behaviour is unchanged. --- src/FioApi/Downloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FioApi/Downloader.php b/src/FioApi/Downloader.php index 89682e3..0887f8f 100644 --- a/src/FioApi/Downloader.php +++ b/src/FioApi/Downloader.php @@ -21,7 +21,7 @@ class Downloader /** @var ?ClientInterface */ protected $client; - public function __construct(string $token, ClientInterface $client = null) + public function __construct(string $token, ?ClientInterface $client = null) { $this->urlBuilder = new UrlBuilder($token); $this->client = $client;