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

Algolia Search PHP Client v4 is not Compatible #855

Open
Gautamsam3 opened this issue Aug 20, 2024 · 11 comments
Open

Algolia Search PHP Client v4 is not Compatible #855

Gautamsam3 opened this issue Aug 20, 2024 · 11 comments

Comments

@Gautamsam3
Copy link

Scout Version

10.11.1

Scout Driver

Algolia

Laravel Version

11

PHP Version

8.3.8

Database Driver & Version

No response

SDK Version

No response

Meilisearch CLI Version

No response

Description

As per Laravel's documentation, user needs to install Alogila client via following command:

composer require algolia/algoliasearch-client-php`

This by default installs latest version v4 of the Algolia Search client, which was recently released.

algolia_v41

Issue:

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

algolia_v4

Steps To Reproduce

  1. Install algolia/algoliasearch-client-php in the project.
  2. Configure model.
  3. Import php artisan scout:import "App\Models\<model name>"
@driesvints
Copy link
Member

Thanks. Welcoming PR's to make sure we're compatible with v4 👍

@alexander-schranz
Copy link

alexander-schranz commented Aug 20, 2024

If somebody require some references I did work on v3 -> v4 update in my own package. https://github.com/schranz-search/schranz-search/pull/414/files.

Linking also the Upgrade Guide from Algolia: https://www.algolia.com/doc/libraries/php/v4/upgrade/

The hard part is mostly if you want to keep V3 support then I think its lot of more work, else you can only do it for next major.

@driesvints
Copy link
Member

We can cut a new major release if need be.

@karandatwani92
Copy link

Thanks @alexander-schranz

Your links helped a lot. I think the scout repo doesn't need many changes. I have made a few changes locally. Things worked fine for now. I'll be testing a little more tomorrow before submitting the PR

I hope everything goes well. I'm very excited to submit my first PR on Laravel's repo.

@muhghazaliakbar
Copy link

Is there any update on this?

Copy link

github-actions bot commented Oct 7, 2024

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@thumbtech
Copy link

We can cut a new major release if need be.

Yes this should/could have been a major release as it does break algolia/scout-extended dependencies

algolia/scout-extended#347

@mariuscucuruz
Copy link

I've submitted PR algolia/scout-extended#348 to downgrade Laravel Scout to v10.11.5.

While we await approval and merge, you can run this Composer command in your project(s):

composer update laravel/scout v10.11.5

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@mariuscucuruz
Copy link

Is there any update on this?

Hey ThumbTech,

You can to downgrade Laravel Scout to v10.11.5 by running this Composer command in your project(s):

composer update laravel/scout v10.11.5

@thumbtech
Copy link

composer update laravel/scout v10.11.5

composer require laravel/scout v10.11.5 actually does work

(Better IMO to leave scout-extended as is and just commit to v11 on scout, as numerous others have recommended.)

@mariuscucuruz
Copy link

this compatibility issue has been addressed in #348 and subsequently with the release of v3.1.1..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants