Laravel Scout:Import Fails with Algolia Client v4
Closed this issue · 2 comments
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.
-Problem: Despite the successful installation, running the command 'php artisan scout:import "App\Models\Variant"' results in an error.
@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
Thank you @alexander-schranz
Closing the issue - reported the issue on laravel/scout