framework icon indicating copy to clipboard operation
framework copied to clipboard

Declaration of Pivot::setKeysForSaveQuery() should be compatible with Model::setKeysForSaveQuery

Open PhiloNL opened this issue 13 years ago • 6 comments

I'm using the 4.0 branch and just did a composer update. After updating the following error keeps showing up.

Declaration of Illuminate\Database\Eloquent\Relations\Pivot::setKeysForSaveQuery() should be compatible with Illuminate\Database\Eloquent\Model::setKeysForSaveQuery(Illuminate\Database\Eloquent\Builder $query)

PhiloNL avatar Oct 03 '13 15:10 PhiloNL

I am getting this as well.

carbontwelve avatar Oct 03 '13 15:10 carbontwelve

It's an easy fix, on that pivot method it is missing the Builder, like setKeysForSaveQuery(Builder $query) we need to add the use Illuminate\...\Builder; at the top.

brunogaspar avatar Oct 03 '13 15:10 brunogaspar

Just pushed a fix. Composer update in a minute and let me know if it's fixed.

taylorotwell avatar Oct 03 '13 15:10 taylorotwell

awesome

arisultima avatar Oct 03 '13 15:10 arisultima

Thanks! :+1:

PhiloNL avatar Oct 03 '13 15:10 PhiloNL

Fixed it for me too :+1: thank you @taylorotwell for being so quick at releasing a fix.

carbontwelve avatar Oct 03 '13 15:10 carbontwelve