From a14d9fea7d11c7c87afbf6dede0d3d06945f5fd6 Mon Sep 17 00:00:00 2001 From: Kurt B Date: Sat, 5 Apr 2025 15:35:22 -0400 Subject: [PATCH 1/2] made external id explicitly nullable --- src/Kit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kit.php b/src/Kit.php index 36fa174..43a4659 100644 --- a/src/Kit.php +++ b/src/Kit.php @@ -120,7 +120,7 @@ public static function divider(?string $blockId = null): Blocks\Divider } public static function file( - string $externalId = null, + ?string $externalId = null, ?string $source = 'remote', ?string $blockId = null, ): Blocks\File { From 9028ce6c469b41dc0997be5cf2d16b3de3377a1f Mon Sep 17 00:00:00 2001 From: Maarten Paauw Date: Mon, 7 Apr 2025 11:45:39 +0200 Subject: [PATCH 2/2] fix: make constructor parameters explicitly nullable to avoid deprecation warnings --- src/Exception.php | 2 +- src/Hydration/HydrationException.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Exception.php b/src/Exception.php index a53e211..36515f4 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -14,7 +14,7 @@ class Exception extends RuntimeException /** * @param array $args */ - public function __construct(string $message, array $args = [], Throwable $previous = null) + public function __construct(string $message, array $args = [], ?Throwable $previous = null) { $message = $args ? vsprintf($message, $args) : $message; diff --git a/src/Hydration/HydrationException.php b/src/Hydration/HydrationException.php index 78302bf..a89334b 100644 --- a/src/Hydration/HydrationException.php +++ b/src/Hydration/HydrationException.php @@ -12,7 +12,7 @@ class HydrationException extends Exception /** * @param array $args */ - public function __construct(string $message, array $args = [], Throwable $previous = null) + public function __construct(string $message, array $args = [], ?Throwable $previous = null) { parent::__construct("FromArray Error: {$message}", $args, $previous); }