Skip to content

Conversation

incoming-th
Copy link
Contributor

Fix the PHP 8.4 warning messages:

PHP Deprecated: Laratrust\Traits\HasRolesAndPermissions::allPermissions(): Implicitly marking parameter $columns as nullable is deprecated, the explicit nullable type must be used instead in /vendor/santigarcor/laratrust/src/Traits/HasRolesAndPermissions.php on line 501

PHP Deprecated: Laratrust\Contracts\LaratrustUser::allPermissions(): Implicitly marking parameter $columns as nullable is deprecated, the explicit nullable type must be used instead in /vendor/santigarcor/laratrust/src/Contracts/LaratrustUser.php on line 153

@incoming-th
Copy link
Contributor Author

@santigarcor Let me know if something else need to be provided for the PR.

* @return Collection<\Laratrust\Contracts\Permission>
*/
public function allPermissions(array $columns = null, $team = false): Collection;
public function allPermissions(?array $columns = null, bool $team = false): Collection;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$team should be a mixed variable.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @return Collection<\Laratrust\Contracts\Permission>
*/
public function allPermissions(array $columns = null, $team = false): Collection
public function allPermissions(?array $columns = null, bool $team = false): Collection
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$team should be a mixed variable.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@santigarcor
Copy link
Owner

@incoming-th can you please add 8.4 to this php versions array https://github.com/santigarcor/laratrust/blob/master/.github/workflows/tests.yml#L14

@incoming-th
Copy link
Contributor Author

@incoming-th can you please add 8.4 to this php versions array https://github.com/santigarcor/laratrust/blob/master/.github/workflows/tests.yml#L14

@santigarcor Sure, I totally forgot about this thanks.

@santigarcor santigarcor merged commit a35abe7 into santigarcor:master Jan 16, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants