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.1 Compatibility issue. #183

Open
laze opened this issue Dec 11, 2024 · 2 comments
Open

PHP 8.4.1 Compatibility issue. #183

laze opened this issue Dec 11, 2024 · 2 comments

Comments

@laze
Copy link

laze commented Dec 11, 2024

Deprecated: Spatie\EloquentSortable\SortableTrait::setNewOrder(): Implicitly marking parameter $primaryKeyColumn as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/spatie/eloquent-sortable/src/SortableTrait.php on line 44

The code should be like this, enabling the null attribute type not to use implicitly marking the parameter's value as null:

public static function setNewOrder(
        $ids,
        int $startOrder = 1,
        string|null $primaryKeyColumn = null,
        callable|null $modifyQuery = null
    ): void {
...
}
@freekmurze
Copy link
Member

We'd accept a PR that fixes this.

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

3 participants
@laze @freekmurze and others