Skip to content

Commit a35abe7

Browse files
authored
Fix php 8.4 deprecated types (#688)
* Fix php 8.4 deprecated types * Change $team to mixed type * Add 8.4 in GitHub tests --------- Co-authored-by: Mickael <[email protected]> Fixes #685
1 parent 5c6f1b4 commit a35abe7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php: [8.1, 8.2, 8.3]
14+
php: [8.1, 8.2, 8.3, 8.4]
1515
laravel: [10.*, 11.*]
1616
stability: [prefer-lowest, prefer-stable]
1717
include:

src/Contracts/LaratrustUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,5 @@ public function syncPermissions(
150150
*
151151
* @return Collection<\Laratrust\Contracts\Permission>
152152
*/
153-
public function allPermissions(array $columns = null, $team = false): Collection;
153+
public function allPermissions(?array $columns = null, mixed $team = false): Collection;
154154
}

src/Traits/HasRolesAndPermissions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ public function syncPermissionsWithoutDetaching(
498498
*
499499
* @return Collection<\Laratrust\Contracts\Permission>
500500
*/
501-
public function allPermissions(array $columns = null, $team = false): Collection
501+
public function allPermissions(?array $columns = null, mixed $team = false): Collection
502502
{
503503
$columns = is_array($columns) ? $columns : null;
504504
if ($columns) {

0 commit comments

Comments
 (0)