-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Declaration of TeamTNT\Scout\Engines\TNTSearchEngine::map($results, $model) must be compatible with Laravel\Scout\Engines\Engine::map(Laravel\Scout\Builder $builder, $results, $model) #175
Comments
Okay when creating a model I have used
Also worth noting that |
Same for me. (New user here!)
Edit: I have found the breaking change in Laravel Scout: laravel/scout@9f06b9c#diff-c0a1ec7dbf011155e6c41c1f05d39fffR60 |
Update: Downgrading to Scout v4.* works. On composer json:
Then:
|
Downgrading hasn't fixed this issue for me. When trying to create a new Model, I get
|
I really need a fix for this otherwise I'm going to have to switch to a different driver. |
Sorry, but are you sure you are using Scout 4.0.*? Maybe you run composer install instead of composer update |
|
@Krato already fixed it in the master, but there is no release yet. You can require it with
|
just published a new release with the fix https://github.com/teamtnt/laravel-scout-tntsearch-driver/releases/tag/v3.0.8 |
I've updated to
|
i ran composer update and it installed v3.0.8 but i still get the error. maybe there's something else i'm supposed to do? |
@bradley-varol it's a different error than the one in the title :) it tells us that you don't have the latest scout driver v5.0.2 is the latest |
just created another release v3.1.0 that will force laravel scout 5.0.*, so the error should be gone |
Oops, I forgot that I had downgraded my Scout version following jhm-ciberman's suggestion.
|
@bradley-varol |
@nticaric v3.1.0 will cause another problem
|
See #171 for this issue |
I had a similar issue. This fixed it for me. Thank you. |
Declaration of TeamTNT\Scout\Engines\TNTSearchEngine::map($results, $model) must be compatible with Laravel\Scout\Engines\Engine::map(Laravel\Scout\Builder $builder, $results, $model)
I am receiving this exception when calling
search()
on a model.I have temporarily fixed this by changing the signature of the map function from
public function map($results, $model)
to
public function map(Builder $builder, $results, $model)
The text was updated successfully, but these errors were encountered: