The problem is the function setKeysForSaveQuery($query).
In the file Iluminate\Database\Eloquent\Model.php is declared function setKeysForSaveQuery($query)
And in the file Iluminate\Database\Eloquent\Relations\Concerns\AsPivot.php is declared function setKeysForSaveQuery(Builder $query)
And both should declared identically for a correct performance.
Same here after upgrade to version 8.7.0:
[2020-09-29 17:33:31] demo.ERROR: Declaration of Illuminate\Database\Eloquent\Relations\Concerns\AsPivot::setKeysForSaveQuery(Illuminate\Database\Eloquent\Builder $query) should be compatible with Illuminate\Database\Eloquent\Model::setKeysForSaveQuery($query) {"exception":"[object] (ErrorException(code: 0): Declaration of Illuminate\\Database\\Eloquent\\Relations\\Concerns\\AsPivot::setKeysForSaveQuery(Illuminate\\Database\\Eloquent\\Builder $query) should be compatible with Illuminate\\Database\\Eloquent\\Model::setKeysForSaveQuery($query) at /www/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php:91)
@taylorotwell related commit https://github.com/laravel/framework/commit/77db028225ccd6ec6bc3359f69482f2e4cc95faf
I have the same problem. Both methods does not have the same signature.
Illuminate\Database\Eloquent\Model::setKeysForSaveQuery($query)
Illuminate\Database\Eloquent\Relations\Concerns\AsPivot::setKeysForSaveQuery(Illuminate\Database\Eloquent\Builder $query)
Fixed on patch 8.7.1.
Most helpful comment
Fixed on patch 8.7.1.