Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4 Deprecated Warning: Nullable Parameter #202

Closed
satopian opened this issue Dec 28, 2024 · 1 comment
Closed

PHP 8.4 Deprecated Warning: Nullable Parameter #202

satopian opened this issue Dec 28, 2024 · 1 comment

Comments

@satopian
Copy link

Thank you for this great library.

In PHP 8.4, I encountered the following warnings.

PHP Deprecated: eftec\bladeone\BladeOne::last(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in C:\foo\bar\lib\BladeOne.php on line 1101

PHP Deprecated: eftec\bladeone\BladeOne::first(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in C:\foo\bar\lib\BladeOne.php on line 1128

public static function last($array, ?callable $callback = null, $default = null)
Using ?callable eliminates the Deprecated warning.

@satopian
Copy link
Author

The issue does not occur in v4.17.1 so I will close the issue.
Thank you.

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

No branches or pull requests

2 participants
@satopian and others