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

Incompatible with laravel/scout v10.11.6 #347

Open
jayan-blutui opened this issue Nov 12, 2024 · 15 comments · Fixed by #348
Open

Incompatible with laravel/scout v10.11.6 #347

jayan-blutui opened this issue Nov 12, 2024 · 15 comments · Fixed by #348

Comments

@jayan-blutui
Copy link

  • Laravel version: 11.31.0
  • Algolia Scout Extended version: latest
  • Algolia Client Version: 3.x (same as this extension)
  • Language Version: 8.2

Description

The latest version of Laravel Scout v10.11.6 has the following error:

Class Algolia\ScoutExtended\Engines\AlgoliaEngine contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Laravel\Scout\Engines\AlgoliaEngine::performSearch, Laravel\Scout\Engines\AlgoliaEngine::deleteIndex)

A possible fix for this issue is to use the new class called Algolia3Engine which was created in laravel/scout#872 instead of the AlgoliaEngine which is now an abstract class.

Steps To Reproduce

Update to latest version of Laravel Scout.

@CNSam
Copy link

CNSam commented Nov 13, 2024

Can confirm this issue too

@kaioken
Copy link

kaioken commented Nov 13, 2024

Same, can confirm this issue too

@jonathan-bird
Copy link

+1 on this issue, running same versions including v3.x of Algolia client

@ericlbarnes
Copy link

Came to report the same. 😅

@Eyad-Bereh
Copy link

Today I've just had the same issue with my Laravel application, the way I ended up solving the issue is by hardcoding the version of laravel/scout inside the composer.json file to 10.11.5:

"laravel/scout": "10.11.5"

@kaioken
Copy link

kaioken commented Nov 14, 2024

@Eyad-Bereh same here

@avdheshsolanki
Copy link

Yes, same here, please fix it.

@Eyad-Bereh
Copy link

I don't know what I'm missing here exactly, but converting an instantiatable class into an abstract class seems like a breaking change to me, and so it should've been done in a major release and not break the entire thing by releasing this breaking change in a minor version

@mariuscucuruz
Copy link
Contributor

As suggested by Eyad-Bereh a quick fix is to downgrade Laravel Scout to v10.11.5.

#347 (comment)

composer update laravel/scout v10.11.5

I've submitted PR #348 to do just that.

@mattmcdonald-uk
Copy link

mattmcdonald-uk commented Nov 22, 2024

PR #348 is a useful workaround, but it doesn't fix this problem, so should the issue be closed ?

@el-klo
Copy link

el-klo commented Nov 22, 2024

PR #348 is a useful workaround, but it doesn't fix this problem, so should the issue be closed ?

The issue is fixed in #348. Updating through composer will fix the issue.

@mattmcdonald-uk
Copy link

mattmcdonald-uk commented Nov 22, 2024

PR #348 is a useful workaround, but it doesn't fix this problem, so should the issue be closed ?

The issue is fixed in #348. Updating through composer will fix the issue.

PR #348 just locks composer to an older version of laravel/scout which isn't a long-term solution.

@Eyad-Bereh
Copy link

PR #348 is a useful workaround, but it doesn't fix this problem, so should the issue be closed ?

The issue is fixed in #348. Updating through composer will fix the issue.

PR #348 just locks composer to an older version of laravel/scout which isn't a long-term solution.

It's definitely not a long-term solution, it's just a workaround until a permanent solution is implemented, but the current situation is somewhat severe and people are having their applications breaking down over this issue.

@DevinCodes
Copy link
Contributor

The issue is not fixed long-term indeed, the PR was a temporary fix for now. Github automatically closed the issue when merging the PR I suppose, so I'm reopening it for now!

@DevinCodes DevinCodes reopened this Nov 22, 2024
@mariuscucuruz
Copy link
Contributor

So the issue is that algolia/scout-extended v3.1.0 is not compatible with Laravel Scout v10.11.6. This is a compatibility issue with Scout (versions 10.11.6 and newer). This particular issue is now considered fixed in #348 with a minor release, i.e. v3.1.1, by limiting what version of Scout it can use - call it dependency mitigation. By my definition, this issue should be closed.

Addendum
There might be plans for future major releases that will work with newer versions of Scout (they might even come with limitations of their own). But you'll need to wait for such a release (if you want it to work with newer versions of Scout), otherwise use v3.1.1.

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

Successfully merging a pull request may close this issue.