Skip to content

Commit 530db50

Browse files
Fix PHP 8.4 deprecation (#27)
* Add explicit nullable type to $withMailable parameter * Update run-tests.yml --------- Co-authored-by: Pascal Baljet <[email protected]>
1 parent c49c24c commit 530db50

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/run-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: true
1313
matrix:
1414
php: [8.4, 8.3, 8.2]
15-
laravel: ['10.*', '11.*', '12.*']
15+
laravel: ["10.*", "11.*", "12.*"]
1616
dependency-version: [prefer-lowest, prefer-stable]
1717
include:
1818
- laravel: 10.*
@@ -26,10 +26,10 @@ jobs:
2626

2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3030

3131
- name: Cache dependencies
32-
uses: actions/cache@v2
32+
uses: actions/cache@v4
3333
with:
3434
path: ~/.composer/cache/files
3535
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

src/MustVerifyNewEmail.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ trait MustVerifyNewEmail
1414
* to the new email address.
1515
*
1616
* @param string $email
17-
* @param callable $withMailable
17+
* @param callable|null $withMailable
1818
* @return \Illuminate\Database\Eloquent\Model|null
1919
*/
20-
public function newEmail(string $email, callable $withMailable = null): ?Model
20+
public function newEmail(string $email, ?callable $withMailable = null): ?Model
2121
{
2222
if ($this->getEmailForVerification() === $email && $this->hasVerifiedEmail()) {
2323
return null;
@@ -81,10 +81,10 @@ public function clearPendingEmail()
8181
* Sends the VerifyNewEmail Mailable to the new email address.
8282
*
8383
* @param \Illuminate\Database\Eloquent\Model $pendingUserEmail
84-
* @param callable $withMailable
84+
* @param callable|null $withMailable
8585
* @return mixed
8686
*/
87-
public function sendPendingEmailVerificationMail(Model $pendingUserEmail, callable $withMailable = null)
87+
public function sendPendingEmailVerificationMail(Model $pendingUserEmail, ?callable $withMailable = null)
8888
{
8989
$mailableClass = config('verify-new-email.mailable_for_first_verification');
9090

0 commit comments

Comments
 (0)