From 7acfdc010b9f3599175050ca99aac3aa82effa5e Mon Sep 17 00:00:00 2001 From: Christian Worreschk Date: Mon, 3 Mar 2025 15:33:38 +0100 Subject: [PATCH 1/2] Add explicit nullable type to $withMailable parameter --- src/MustVerifyNewEmail.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MustVerifyNewEmail.php b/src/MustVerifyNewEmail.php index dbcd867..ade427f 100644 --- a/src/MustVerifyNewEmail.php +++ b/src/MustVerifyNewEmail.php @@ -14,10 +14,10 @@ trait MustVerifyNewEmail * to the new email address. * * @param string $email - * @param callable $withMailable + * @param callable|null $withMailable * @return \Illuminate\Database\Eloquent\Model|null */ - public function newEmail(string $email, callable $withMailable = null): ?Model + public function newEmail(string $email, ?callable $withMailable = null): ?Model { if ($this->getEmailForVerification() === $email && $this->hasVerifiedEmail()) { return null; @@ -81,10 +81,10 @@ public function clearPendingEmail() * Sends the VerifyNewEmail Mailable to the new email address. * * @param \Illuminate\Database\Eloquent\Model $pendingUserEmail - * @param callable $withMailable + * @param callable|null $withMailable * @return mixed */ - public function sendPendingEmailVerificationMail(Model $pendingUserEmail, callable $withMailable = null) + public function sendPendingEmailVerificationMail(Model $pendingUserEmail, ?callable $withMailable = null) { $mailableClass = config('verify-new-email.mailable_for_first_verification'); From 8c12b3c6ae97a73eaa66ecb1bcfd7a0caa9c0151 Mon Sep 17 00:00:00 2001 From: Pascal Baljet Date: Tue, 1 Apr 2025 21:29:54 +0200 Subject: [PATCH 2/2] Update run-tests.yml --- .github/workflows/run-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 4b368e5..cbf087f 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,7 +12,7 @@ jobs: fail-fast: true matrix: php: [8.4, 8.3, 8.2] - laravel: ['10.*', '11.*', '12.*'] + laravel: ["10.*", "11.*", "12.*"] dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 10.* @@ -26,10 +26,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.composer/cache/files key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}