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

Laravel Scout:Import Fails with Algolia Client v4 #733

Closed
Gautamsam3 opened this issue Aug 20, 2024 · 2 comments
Closed

Laravel Scout:Import Fails with Algolia Client v4 #733

Gautamsam3 opened this issue Aug 20, 2024 · 2 comments

Comments

@Gautamsam3
Copy link

Gautamsam3 commented Aug 20, 2024

Algolia Search client v4 not compatible with Laravel 11

According to Laravel's documentation, running the command 'composer require algolia/algoliasearch-client-php' successfully installs version 4 of the Algolia Search client, which was released last week.

algolia_v41

-Problem: Despite the successful installation, running the command 'php artisan scout:import "App\Models\Variant"' results in an error.

algolia_v4

@Gautamsam3 Gautamsam3 changed the title Algolia Client Installed but Import Fails: Error During Scout Import Laravel Scout:Import Fails with Algolia Client v4 Aug 20, 2024
@alexander-schranz
Copy link

alexander-schranz commented Aug 20, 2024

@Gautamsam3 the error is not algolia php package here. The error here is on laravel/scout side. They should define there required algolia SDK PHP version correctly currently they only support V3 and for V4 they need adopt the code.

Referencing here a blog post about how to handle "optional" dependencies correctly: https://github.com/alexander-schranz/composer-optional-dependencies

For you you can only require the supported version currently via:

composer require algolia/algoliasearch-client-php:"^3.0"

So this bug / feature request should be reported to https://github.com/laravel/scout

@Gautamsam3
Copy link
Author

Thank you @alexander-schranz
Closing the issue - reported the issue on laravel/scout

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

No branches or pull requests

2 participants