From 6110545c41d7746e68dbd1ba64cc852244c4ee9b Mon Sep 17 00:00:00 2001 From: Runar Sverrisson Date: Wed, 5 Nov 2025 10:20:34 +0000 Subject: [PATCH] Fix php 8.4 deprecation warnings --- src/Exceptions/DocumentParseError.php | 2 +- src/Exceptions/Path.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Exceptions/DocumentParseError.php b/src/Exceptions/DocumentParseError.php index ccf70c6..4fdeed8 100644 --- a/src/Exceptions/DocumentParseError.php +++ b/src/Exceptions/DocumentParseError.php @@ -17,7 +17,7 @@ public static function unknownFormat(string $format): self )); } - public static function invalidContent(string $file, string $errorMessage = null): self + public static function invalidContent(string $file, ?string $errorMessage = null): self { $message = sprintf( 'File "%s" don\'t seam to contain a valid json/yaml document', diff --git a/src/Exceptions/Path.php b/src/Exceptions/Path.php index 4f6d78e..db4a913 100644 --- a/src/Exceptions/Path.php +++ b/src/Exceptions/Path.php @@ -4,7 +4,7 @@ final class Path extends \RuntimeException { - public static function notFound(string $path = null): self + public static function notFound(?string $path = null): self { return new self('Json path to value not found. ' . $path); }