mikebronner / laravel-model-caching

Eloquent model-caching made easy.
MIT License
2.26k stars 215 forks source link

Make Buildable@paginate compatible with Laravel 10.3.0 #446

Closed joshuadwire closed 1 year ago

joshuadwire commented 1 year ago

Fixes the issue referenced in #445. Laravel 10.3.0 added a $total parameter to Illuminate\Database\Eloquent\Builder::paginate. This PR adds the same parameter to GeneaLabs\LaravelModelCaching\Traits\Buildable::paginate to eliminate PHP errors about a mismatch in function signature.

faytekin commented 1 year ago

Let's wait for the merge to happen. If it does, the code causing this breaking change will be reverted in this PR, so there will be no need for further changes.

cc: @joshuadwire @mikebronner

faytekin commented 1 year ago

@mikebronner In this PR https://github.com/laravel/framework/pull/46406, the change in Laravel has been reverted. Maybe it will be considered in the future.