From 227e27f386456db5752efeadab73356cae477eba Mon Sep 17 00:00:00 2001 From: WINBIGFOX Date: Fri, 23 May 2025 16:58:55 +0200 Subject: [PATCH] fix: add default values for optional parameters in update auto-updater event classes --- src/Events/AutoUpdater/Error.php | 2 +- src/Events/AutoUpdater/UpdateAvailable.php | 8 ++++---- src/Events/AutoUpdater/UpdateCancelled.php | 8 ++++---- src/Events/AutoUpdater/UpdateDownloaded.php | 8 ++++---- src/Events/AutoUpdater/UpdateNotAvailable.php | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Events/AutoUpdater/Error.php b/src/Events/AutoUpdater/Error.php index 9d2219d..3e1c29e 100644 --- a/src/Events/AutoUpdater/Error.php +++ b/src/Events/AutoUpdater/Error.php @@ -15,7 +15,7 @@ class Error implements ShouldBroadcastNow public function __construct( public string $name, public string $message, - public ?string $stack, + public ?string $stack = null, ) {} public function broadcastOn() diff --git a/src/Events/AutoUpdater/UpdateAvailable.php b/src/Events/AutoUpdater/UpdateAvailable.php index 1fb05fb..dc5ab67 100644 --- a/src/Events/AutoUpdater/UpdateAvailable.php +++ b/src/Events/AutoUpdater/UpdateAvailable.php @@ -16,10 +16,10 @@ public function __construct( public string $version, public array $files, public string $releaseDate, - public ?string $releaseName, - public string|array|null $releaseNotes, - public ?int $stagingPercentage, - public ?string $minimumSystemVersion, + public ?string $releaseName = null, + public string|array|null $releaseNotes = null, + public ?int $stagingPercentage = null, + public ?string $minimumSystemVersion = null, ) {} public function broadcastOn() diff --git a/src/Events/AutoUpdater/UpdateCancelled.php b/src/Events/AutoUpdater/UpdateCancelled.php index 09d01b6..77ae44f 100644 --- a/src/Events/AutoUpdater/UpdateCancelled.php +++ b/src/Events/AutoUpdater/UpdateCancelled.php @@ -16,10 +16,10 @@ public function __construct( public string $version, public array $files, public string $releaseDate, - public ?string $releaseName, - public string|array|null $releaseNotes, - public ?int $stagingPercentage, - public ?string $minimumSystemVersion, + public ?string $releaseName = null, + public string|array|null $releaseNotes = null, + public ?int $stagingPercentage = null, + public ?string $minimumSystemVersion = null, ) {} public function broadcastOn() diff --git a/src/Events/AutoUpdater/UpdateDownloaded.php b/src/Events/AutoUpdater/UpdateDownloaded.php index 379d62f..b5856f1 100644 --- a/src/Events/AutoUpdater/UpdateDownloaded.php +++ b/src/Events/AutoUpdater/UpdateDownloaded.php @@ -17,10 +17,10 @@ public function __construct( public string $version, public array $files, public string $releaseDate, - public ?string $releaseName, - public string|array|null $releaseNotes, - public ?int $stagingPercentage, - public ?string $minimumSystemVersion + public ?string $releaseName = null, + public string|array|null $releaseNotes = null, + public ?int $stagingPercentage = null, + public ?string $minimumSystemVersion = null, ) {} public function broadcastOn() diff --git a/src/Events/AutoUpdater/UpdateNotAvailable.php b/src/Events/AutoUpdater/UpdateNotAvailable.php index c642d82..f357b0c 100644 --- a/src/Events/AutoUpdater/UpdateNotAvailable.php +++ b/src/Events/AutoUpdater/UpdateNotAvailable.php @@ -16,10 +16,10 @@ public function __construct( public string $version, public array $files, public string $releaseDate, - public ?string $releaseName, - public string|array|null $releaseNotes, - public ?int $stagingPercentage, - public ?string $minimumSystemVersion, + public ?string $releaseName = null, + public string|array|null $releaseNotes = null, + public ?int $stagingPercentage = null, + public ?string $minimumSystemVersion = null, ) {} public function broadcastOn()